[Xoops4-svn] r184 - in XoopsCore/branches: . 2.2.x 2.2.x/2.2-main 2.2.x/2.2-main/docs 2.2.x/2.2-main/docs/images 2.2.x/2.2-main/extras 2.2.x/2.2-main/extras/theme_x2t 2.2.x/2.2-main/extras/theme_x2t/doc 2.2.x/2.2-main/extras/theme_x2t/extras 2.2.x/2.2-main/html 2.2.x/2.2-main/html/cache 2.2.x/2.2-main/html/class 2.2.x/2.2-main/html/class/auth 2.2.x/2.2-main/html/class/calendar 2.2.x/2.2-main/html/class/calendar/CSS 2.2.x/2.2-main/html/class/calendar/doc 2.2.x/2.2-main/html/class/calendar/doc/html 2.2.x/2.2-main/html/class/calendar/lang 2.2.x/2.2-main/html/class/database 2.2.x/2.2-main/html/class/mail 2.2.x/2.2-main/html/class/mail/phpmailer 2.2.x/2.2-main/html/class/smarty 2.2.x/2.2-main/html/class/smarty/configs 2.2.x/2.2-main/html/class/smarty/core 2.2.x/2.2-main/html/class/smarty/plugins 2.2.x/2.2-main/html/class/snoopy 2.2.x/2.2-main/html/class/xml 2.2.x/2.2-main/html/class/xml/rpc 2.2.x/2.2-main/html/class/xml/rss 2.2.x/2.2-main/html/class/xoopseditor 2.2.x/2.2-main/html/cl! ass/xoopseditor/dhtmltextarea 2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/language 2.2.x/2.2-main/html/class/xoopseditor/koivi 2.2.x/2.2-main/html/class/xoopseditor/koivi/class 2.2.x/2.2-main/html/class/xoopseditor/koivi/images 2.2.x/2.2-main/html/class/xoopseditor/koivi/include 2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js 2.2.x/2.2-main/html/class/xoopseditor/koivi/language 2.2.x/2.2-main/html/class/xoopseditor/koivi/skins 2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common 2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default 2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp 2.2.x/2.2-main/html/class/xoopseditor/textarea 2.2.x/2.2-main/html/class/xoopseditor/textarea/language 2.2.x/2.2-main/html/class/xoopsform 2.2.x/2.2-main/html/images 2.2.x/2.2-main/html/images/banners 2.2.x/2.2-main/html/images/icons 2.2.x/2.2-main/html/images/subject 2.2.x/2.2-main/html/include 2.2.x/2.2-main/html/install 2.2.x/2.2-main/html/install/class 2.2.x/2.2-main/! html/install/img 2.2.x/2.2-main/html/install/language 2.2.x/2.! 2-main/h
skalpa at BerliOS
skalpa at berlios.de
Sun Jan 22 23:37:50 CET 2006
Author: skalpa
Date: 2006-01-22 23:34:51 +0100 (Sun, 22 Jan 2006)
New Revision: 184
Added:
XoopsCore/branches/2.2.x/
XoopsCore/branches/2.2.x/2.2-main/
XoopsCore/branches/2.2.x/2.2-main/docs/
XoopsCore/branches/2.2.x/2.2-main/docs/COPYING.txt
XoopsCore/branches/2.2.x/2.2-main/docs/INSTALL.html
XoopsCore/branches/2.2.x/2.2-main/docs/UPDATE.html
XoopsCore/branches/2.2.x/2.2-main/docs/changelog.txt
XoopsCore/branches/2.2.x/2.2-main/docs/images/
XoopsCore/branches/2.2.x/2.2-main/docs/images/Thumbs.db
XoopsCore/branches/2.2.x/2.2-main/docs/images/install001.gif
XoopsCore/branches/2.2.x/2.2-main/docs/images/install002.gif
XoopsCore/branches/2.2.x/2.2-main/docs/images/install003.gif
XoopsCore/branches/2.2.x/2.2-main/docs/images/install004.gif
XoopsCore/branches/2.2.x/2.2-main/docs/images/install005.gif
XoopsCore/branches/2.2.x/2.2-main/docs/images/install006.gif
XoopsCore/branches/2.2.x/2.2-main/docs/images/install007.gif
XoopsCore/branches/2.2.x/2.2-main/docs/images/install008.gif
XoopsCore/branches/2.2.x/2.2-main/docs/images/install009.gif
XoopsCore/branches/2.2.x/2.2-main/docs/images/install010.gif
XoopsCore/branches/2.2.x/2.2-main/docs/images/install011.gif
XoopsCore/branches/2.2.x/2.2-main/docs/images/install024.gif
XoopsCore/branches/2.2.x/2.2-main/extras/
XoopsCore/branches/2.2.x/2.2-main/extras/index.html
XoopsCore/branches/2.2.x/2.2-main/extras/login.php
XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/
XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/doc/
XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/doc/index.html
XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/doc/readme.htm
XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/doc/readme.txt
XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/
XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/index.html
XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/news_index.html
XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/news_item.html
XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/theme.html
XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/index.html
XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/x2t.tar.gz
XoopsCore/branches/2.2.x/2.2-main/html/
XoopsCore/branches/2.2.x/2.2-main/html/admin.php
XoopsCore/branches/2.2.x/2.2-main/html/backend.php
XoopsCore/branches/2.2.x/2.2-main/html/banners.php
XoopsCore/branches/2.2.x/2.2-main/html/cache/
XoopsCore/branches/2.2.x/2.2-main/html/cache/index.html
XoopsCore/branches/2.2.x/2.2-main/html/changelog.txt
XoopsCore/branches/2.2.x/2.2-main/html/class/
XoopsCore/branches/2.2.x/2.2-main/html/class/auth/
XoopsCore/branches/2.2.x/2.2-main/html/class/auth/auth.php
XoopsCore/branches/2.2.x/2.2-main/html/class/auth/auth_ldap.php
XoopsCore/branches/2.2.x/2.2-main/html/class/auth/auth_xoops.php
XoopsCore/branches/2.2.x/2.2-main/html/class/auth/authfactory.php
XoopsCore/branches/2.2.x/2.2-main/html/class/auth/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-blue.css
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-blue2.css
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-brown.css
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-green.css
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-system.css
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-tas.css
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-1.css
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-2.css
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-cold-1.css
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-cold-2.css
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/ChangeLog
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/README
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar-setup.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar-setup_stripped.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar.php
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar_stripped.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/field-button.jpg
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/reference-Z-S.css
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/reference.css
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/reference.html
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/img.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-af.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-al.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-bg.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-big5-utf8.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-br.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ca.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-cs-utf8.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-cs-win.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-da.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-de.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-du.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-el.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-en.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-es.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-fi.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-fr.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-he-utf8.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-hr-utf8.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-hu.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-it.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-jp.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ko-utf8.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ko.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-lt-utf8.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-lt.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-lv.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-nl.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-no.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-pl-utf8.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-pl.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-pt.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ro.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ru.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ru_win_.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-schinese.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-si.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-sk.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-sp.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-sv.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-tchinese.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-tr.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/cn_utf8.js
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/release-notes.html
XoopsCore/branches/2.2.x/2.2-main/html/class/class.tar.php
XoopsCore/branches/2.2.x/2.2-main/html/class/class.zipfile.php
XoopsCore/branches/2.2.x/2.2-main/html/class/commentrenderer.php
XoopsCore/branches/2.2.x/2.2-main/html/class/criteria.php
XoopsCore/branches/2.2.x/2.2-main/html/class/database/
XoopsCore/branches/2.2.x/2.2-main/html/class/database/database.php
XoopsCore/branches/2.2.x/2.2-main/html/class/database/databasefactory.php
XoopsCore/branches/2.2.x/2.2-main/html/class/database/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/database/mysqldatabase.php
XoopsCore/branches/2.2.x/2.2-main/html/class/database/sqlutility.php
XoopsCore/branches/2.2.x/2.2-main/html/class/downloader.php
XoopsCore/branches/2.2.x/2.2-main/html/class/errorhandler.php
XoopsCore/branches/2.2.x/2.2-main/html/class/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/logger.php
XoopsCore/branches/2.2.x/2.2-main/html/class/mail/
XoopsCore/branches/2.2.x/2.2-main/html/class/mail/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/
XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/ChangeLog.txt
XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/LICENSE
XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/README
XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/class.phpmailer.php
XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/class.smtp.php
XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/mail/xoopsmultimailer.php
XoopsCore/branches/2.2.x/2.2-main/html/class/mimetypes.inc.php
XoopsCore/branches/2.2.x/2.2-main/html/class/module.errorhandler.php
XoopsCore/branches/2.2.x/2.2-main/html/class/module.textsanitizer.php
XoopsCore/branches/2.2.x/2.2-main/html/class/pagenav.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/Config_File.class.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/Smarty.class.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/Smarty_Compiler.class.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/configs/
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/configs/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/configs/test.conf
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.assemble_plugin_filepath.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.assign_smarty_interface.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.create_dir_structure.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.display_debug_console.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.get_include_path.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.get_microtime.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.get_php_resource.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.is_secure.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.is_trusted.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.load_plugins.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.load_resource_plugin.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.process_cached_inserts.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.process_compiled_include.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.read_cache_file.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.rm_auto.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.rmdir.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.run_insert_handler.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.smarty_include_php.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_cache_file.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_compiled_include.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_compiled_resource.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_file.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/debug.tpl
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/block.textformat.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/compiler.assign.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.assign.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.assign_debug_info.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.config_load.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.counter.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.cycle.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.debug.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.eval.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.fetch.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_checkboxes.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_image.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_options.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_radios.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_select_date.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_select_time.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_table.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.mailto.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.math.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.popup.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.popup_init.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.xoops_link.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.capitalize.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.cat.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_characters.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_paragraphs.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_sentences.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_words.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.date_format.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.debug_print_var.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.default.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.escape.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.indent.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.lower.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.nl2br.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.regex_replace.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.replace.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.spacify.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.string_format.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.strip.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.strip_tags.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.truncate.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.upper.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.wordwrap.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/outputfilter.trimwhitespace.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/resource.db.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/shared.escape_special_chars.php
XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/shared.make_timestamp.php
XoopsCore/branches/2.2.x/2.2-main/html/class/snoopy.php
XoopsCore/branches/2.2.x/2.2-main/html/class/snoopy/
XoopsCore/branches/2.2.x/2.2-main/html/class/snoopy/Snoopy.class.php
XoopsCore/branches/2.2.x/2.2-main/html/class/snoopy/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/tardownloader.php
XoopsCore/branches/2.2.x/2.2-main/html/class/template.php
XoopsCore/branches/2.2.x/2.2-main/html/class/theme.php
XoopsCore/branches/2.2.x/2.2-main/html/class/tree.php
XoopsCore/branches/2.2.x/2.2-main/html/class/uploader.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xml/
XoopsCore/branches/2.2.x/2.2-main/html/class/xml/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/
XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/bloggerapi.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/metaweblogapi.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/movabletypeapi.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xmlrpcapi.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xmlrpcparser.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xmlrpctag.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xoopsapi.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rss/
XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rss/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rss/xmlrss2parser.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xml/saxparser.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xml/themesetparser.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xml/xmlatomparser.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xml/xmltaghandler.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsblock.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopscomments.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/dhtmltextarea.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/editor_registry.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/language/
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/language/english.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/language/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/class/
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/class/borderfieldset.class.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/class/colorpalette.class.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/class/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/dialogs.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/editor_registry.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/formwysiwygtextarea.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/I.png
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/L.png
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/Link.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/Lminus.png
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/Lplus.png
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/T.png
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/Tminus.png
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/Tplus.png
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/blank.png
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/class.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/classFolder.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/classGhost.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/error.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/extends.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/file.png
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/folderClosed.png
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/folderOpened.png
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/goTop.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/help-book.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/helpIndex.png
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/iconClass.png
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/iconFile.png
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/iconGhostClass.png
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/methodConstructor.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/methodDestructor.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/methodPrivate.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/methodProtected.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/methodPublic.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/minus.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/msgError.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/msgFatalError.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/msgHint.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/msgInformation.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/msgWarning.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/plus.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/propertyPrivate.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/propertyProtected.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/propertyPublic.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/spacer.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/functions.inc.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/cntextmenu.js
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/dialogs.js
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/editor.js
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/table_tools.js
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/xhtml.js
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/language/
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/language/english.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/language/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/preferences.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/anchor.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/blank.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/borders.css
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/xoops.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/bold.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/cellalign.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/cellborders.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/cellcolor.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/centerbottom.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/centermiddle.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/centertop.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/code.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/copy.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/createlink.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/createtable.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/cut.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/default.css
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/delcell.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/delcol.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/delrow.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/email.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/floating.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/forecolor.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/fullscreen.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/hideback.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/hilitecolor.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/ident.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/imagemanager.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/imageprops.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/indent.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertanchor.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertcell.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertcol.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertdate.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/inserthorizontalrule.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertimage.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertorderedlist.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertrow.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertunorderedlist.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/italic.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/justifycenter.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/justifyfull.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/justifyleft.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/justifyright.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/leftbottom.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/leftmiddle.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/lefttop.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/lessspan.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/ltr.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/minimize.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/morerowspan.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/morespan.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/none.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/outdent.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/paste.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/pastespecial.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/popup.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/print.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/quote.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/redo.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/removeformat.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/rightbottom.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/rightcenter.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/righttop.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/rtl.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/separator.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/spellcheck.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/spelling.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/strikethrough.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/subscript.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/superscript.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/tableprops.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/toggletableborders.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/underline.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/undo.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/unlink.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/bold.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/borderall.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/borderbottom.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/borderleft.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/bordernone.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/borderright.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/bordertop.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/cellalign.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/cellborders.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/cellcolor.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/centerbottom.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/centermiddle.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/centertop.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/code.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/copy.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/createlink.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/createtable.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/cut.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/delcell.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/delcol.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/delrow.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/email.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/floating.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/forecolor.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/fullscreen.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/hilitecolor.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/imagemanager.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/imageprops.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/indent.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertanchor.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertcell.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertcol.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertdate.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/inserthorizontalrule.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertimage.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertorderedlist.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertrow.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertunorderedlist.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/italic.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/justifycenter.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/justifyfull.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/justifyleft.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/justifyright.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/leftbottom.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/leftmiddle.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/lefttop.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/lessspan.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/ltr.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/minimize.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/morerowspan.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/morespan.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/none.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/outdent.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/paste.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/pastespecial.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/popup.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/print.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/quote.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/redo.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/removeformat.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/rightbottom.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/rightcenter.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/righttop.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/rtl.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/separator.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/spellcheck.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/strikethrough.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/subscript.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/superscript.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/t.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/tableprops.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/toggletableborders.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/underline.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/undo.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/unlink.gif
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/xp.css
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/sampleform.inc.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/editor_registry.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/language/
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/language/english.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/language/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/textarea.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/xoopseditor.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/form.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formbutton.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formcalendar.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formcheckbox.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formdatetime.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formdhtmltextarea.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formeditor.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formelement.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formelementtray.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formfile.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formhidden.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formhiddentoken.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formlabel.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formpassword.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formradio.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formradioyn.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselect.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectcountry.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselecteditor.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectgroup.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectlang.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectlist.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectmatchoption.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselecttheme.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselecttimezone.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectuser.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formtext.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formtextarea.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formtextdateselect.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/grouppermform.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/index.html
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/simpleform.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/tableform.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/themeform.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsformloader.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopslists.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsmailer.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsmodule.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsobject.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopssecurity.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsstory.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopstopic.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopstree.php
XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsuser.php
XoopsCore/branches/2.2.x/2.2-main/html/class/zipdownloader.php
XoopsCore/branches/2.2.x/2.2-main/html/edituser.php
XoopsCore/branches/2.2.x/2.2-main/html/error.php
XoopsCore/branches/2.2.x/2.2-main/html/favicon.ico
XoopsCore/branches/2.2.x/2.2-main/html/footer.php
XoopsCore/branches/2.2.x/2.2-main/html/header.php
XoopsCore/branches/2.2.x/2.2-main/html/image.php
XoopsCore/branches/2.2.x/2.2-main/html/imagemanager.php
XoopsCore/branches/2.2.x/2.2-main/html/images/
XoopsCore/branches/2.2.x/2.2-main/html/images/aligncenter.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/alignleft.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/alignright.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/await.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/banners/
XoopsCore/branches/2.2.x/2.2-main/html/images/banners/banner.swf
XoopsCore/branches/2.2.x/2.2-main/html/images/banners/index.html
XoopsCore/branches/2.2.x/2.2-main/html/images/banners/xoops_banner.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/banners/xoops_banner_2.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/blank.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/bold.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/code.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/download.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/email.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/icons/
XoopsCore/branches/2.2.x/2.2-main/html/images/icons/aim.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/icons/delete.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/icons/edit.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/icons/em_small.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/icons/email.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/icons/icq_add.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/icons/index.html
XoopsCore/branches/2.2.x/2.2-main/html/images/icons/ip.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/icons/msnm.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/icons/no_posticon.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/icons/pm_small.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/icons/posticon.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/icons/posticon2.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/icons/profile.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/icons/reply.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/icons/www.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/icons/yim.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/image.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/imgsrc.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/index.html
XoopsCore/branches/2.2.x/2.2-main/html/images/italic.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/linethrough.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/logo.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/pagact.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/paginact.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/pagneutral.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/pointer.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/poweredby.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/quote.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/s_poweredby.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/subject/
XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon1.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon2.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon3.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon4.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon5.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon6.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon7.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/subject/index.html
XoopsCore/branches/2.2.x/2.2-main/html/images/underline.gif
XoopsCore/branches/2.2.x/2.2-main/html/images/url.gif
XoopsCore/branches/2.2.x/2.2-main/html/include/
XoopsCore/branches/2.2.x/2.2-main/html/include/checklogin.php
XoopsCore/branches/2.2.x/2.2-main/html/include/comment_constants.php
XoopsCore/branches/2.2.x/2.2-main/html/include/comment_delete.php
XoopsCore/branches/2.2.x/2.2-main/html/include/comment_edit.php
XoopsCore/branches/2.2.x/2.2-main/html/include/comment_form.php
XoopsCore/branches/2.2.x/2.2-main/html/include/comment_new.php
XoopsCore/branches/2.2.x/2.2-main/html/include/comment_post.php
XoopsCore/branches/2.2.x/2.2-main/html/include/comment_reply.php
XoopsCore/branches/2.2.x/2.2-main/html/include/comment_view.php
XoopsCore/branches/2.2.x/2.2-main/html/include/commentform.inc.php
XoopsCore/branches/2.2.x/2.2-main/html/include/common.php
XoopsCore/branches/2.2.x/2.2-main/html/include/cp_functions.php
XoopsCore/branches/2.2.x/2.2-main/html/include/cp_header.php
XoopsCore/branches/2.2.x/2.2-main/html/include/functions.php
XoopsCore/branches/2.2.x/2.2-main/html/include/index.html
XoopsCore/branches/2.2.x/2.2-main/html/include/notification_constants.php
XoopsCore/branches/2.2.x/2.2-main/html/include/notification_functions.php
XoopsCore/branches/2.2.x/2.2-main/html/include/notification_select.php
XoopsCore/branches/2.2.x/2.2-main/html/include/notification_update.php
XoopsCore/branches/2.2.x/2.2-main/html/include/old_theme_functions.php
XoopsCore/branches/2.2.x/2.2-main/html/include/registerform.php
XoopsCore/branches/2.2.x/2.2-main/html/include/searchform.php
XoopsCore/branches/2.2.x/2.2-main/html/include/version.php
XoopsCore/branches/2.2.x/2.2-main/html/include/xoops.js
XoopsCore/branches/2.2.x/2.2-main/html/include/xoopscodes.php
XoopsCore/branches/2.2.x/2.2-main/html/index.php
XoopsCore/branches/2.2.x/2.2-main/html/install/
XoopsCore/branches/2.2.x/2.2-main/html/install/class/
XoopsCore/branches/2.2.x/2.2-main/html/install/class/cachemanager.php
XoopsCore/branches/2.2.x/2.2-main/html/install/class/dbmanager.php
XoopsCore/branches/2.2.x/2.2-main/html/install/class/mainfilemanager.php
XoopsCore/branches/2.2.x/2.2-main/html/install/class/settingmanager.php
XoopsCore/branches/2.2.x/2.2-main/html/install/class/textsanitizer.php
XoopsCore/branches/2.2.x/2.2-main/html/install/img/
XoopsCore/branches/2.2.x/2.2-main/html/install/img/bg_content_left.gif
XoopsCore/branches/2.2.x/2.2-main/html/install/img/bg_content_right.gif
XoopsCore/branches/2.2.x/2.2-main/html/install/img/bg_darkblue.gif
XoopsCore/branches/2.2.x/2.2-main/html/install/img/bg_table.gif
XoopsCore/branches/2.2.x/2.2-main/html/install/img/dummy.gif
XoopsCore/branches/2.2.x/2.2-main/html/install/img/hbar_installer_right.gif
XoopsCore/branches/2.2.x/2.2-main/html/install/img/hbar_left.gif
XoopsCore/branches/2.2.x/2.2-main/html/install/img/hbar_middle.gif
XoopsCore/branches/2.2.x/2.2-main/html/install/img/hbar_right.gif
XoopsCore/branches/2.2.x/2.2-main/html/install/img/logo.gif
XoopsCore/branches/2.2.x/2.2-main/html/install/img/no.gif
XoopsCore/branches/2.2.x/2.2-main/html/install/img/xoops2.gif
XoopsCore/branches/2.2.x/2.2-main/html/install/img/yes.gif
XoopsCore/branches/2.2.x/2.2-main/html/install/index.php
XoopsCore/branches/2.2.x/2.2-main/html/install/install_tpl.php
XoopsCore/branches/2.2.x/2.2-main/html/install/language/
XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/
XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/finish.php
XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/install.php
XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/install2.php
XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/mysql.lang.data.sql
XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/welcome.php
XoopsCore/branches/2.2.x/2.2-main/html/install/makedata.php
XoopsCore/branches/2.2.x/2.2-main/html/install/passwd.php
XoopsCore/branches/2.2.x/2.2-main/html/install/sql/
XoopsCore/branches/2.2.x/2.2-main/html/install/sql/mysql.data.sql
XoopsCore/branches/2.2.x/2.2-main/html/install/sql/mysql.structure.sql
XoopsCore/branches/2.2.x/2.2-main/html/install/style.css
XoopsCore/branches/2.2.x/2.2-main/html/kernel/
XoopsCore/branches/2.2.x/2.2-main/html/kernel/avatar.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/block.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/blockinstance.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/comment.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/config.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/configcategory.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/configitem.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/configoption.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/editor.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/group.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/groupperm.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/handlerregistry.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/image.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/imagecategory.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/imageset.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/imagesetimg.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/index.html
XoopsCore/branches/2.2.x/2.2-main/html/kernel/member.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/module.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/notification.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/object.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/online.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/privmessage.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/profile.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/profilefield.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/rank.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/session.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/tplfile.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/tplset.php
XoopsCore/branches/2.2.x/2.2-main/html/kernel/user.php
XoopsCore/branches/2.2.x/2.2-main/html/language/
XoopsCore/branches/2.2.x/2.2-main/html/language/english/
XoopsCore/branches/2.2.x/2.2-main/html/language/english/admin.php
XoopsCore/branches/2.2.x/2.2-main/html/language/english/calendar.php
XoopsCore/branches/2.2.x/2.2-main/html/language/english/comment.php
XoopsCore/branches/2.2.x/2.2-main/html/language/english/error.php
XoopsCore/branches/2.2.x/2.2-main/html/language/english/global.php
XoopsCore/branches/2.2.x/2.2-main/html/language/english/index.html
XoopsCore/branches/2.2.x/2.2-main/html/language/english/local.php
XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail.php
XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/
XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/activated.tpl
XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/adminactivate.tpl
XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/comment_notify.tpl
XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/commentsubmit_notify.tpl
XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/default_notify.tpl
XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/index.html
XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/lostpass1.tpl
XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/lostpass2.tpl
XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/register.tpl
XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/tellfriend.tpl
XoopsCore/branches/2.2.x/2.2-main/html/language/english/misc.php
XoopsCore/branches/2.2.x/2.2-main/html/language/english/notification.php
XoopsCore/branches/2.2.x/2.2-main/html/language/english/search.php
XoopsCore/branches/2.2.x/2.2-main/html/language/english/timezone.php
XoopsCore/branches/2.2.x/2.2-main/html/language/english/user.php
XoopsCore/branches/2.2.x/2.2-main/html/language/index.html
XoopsCore/branches/2.2.x/2.2-main/html/lostpass.php
XoopsCore/branches/2.2.x/2.2-main/html/mainfile.dist.php
XoopsCore/branches/2.2.x/2.2-main/html/mainfile.php
XoopsCore/branches/2.2.x/2.2-main/html/misc.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/
XoopsCore/branches/2.2.x/2.2-main/html/modules/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/admin.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/menu.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/prune.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/class/
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/class/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/class/privmessage.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/images/
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/images/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/images/pm.gif
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/images/pm_logo.jpg
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/images/read.gif
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/include/
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/include/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/include/install.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/index.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/admin.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/main.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/modinfo.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/pmlite.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/readpmsg.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/sql/
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/sql/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/sql/mysql.sql
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/pm_pmlite.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/pm_readpmsg.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/pm_viewpmsg.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/viewpmsg.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/xoops_version.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/activate.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/admin.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/category.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/field.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/menu.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/permissions.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/user.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/changemail.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/changepass.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/class/
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/class/category.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/class/fieldcategory.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/class/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/edituser.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/images/
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/images/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/images/profile_logo.jpg
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/include/
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/include/forms.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/include/functions.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/include/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/index.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/admin.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/error.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/activated.tpl
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/adminactivate.tpl
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/changemail.tpl
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/register.tpl
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/main.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/modinfo.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/register.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/search.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/sql/
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/sql/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/sql/mysql.sql
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_admin_categorylist.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_admin_fieldlist.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_results.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_search.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_userinfo.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/userinfo.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/xoops_version.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/avatars/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/avatars/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/avatars/main.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/avatars/xoops_version.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/banners.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/main.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/xoops_version.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/blockform.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/blocksadmin.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/main.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/xoops_version.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/admin_header.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/comment_delete.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/comment_edit.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/comment_post.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/main.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/xoops_version.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/findusers/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/findusers/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/findusers/main.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/findusers/xoops_version.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groupperm.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/groupform.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/groups.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/main.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/xoops_version.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/images/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/images/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/images/main.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/images/xoops_version.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/mailform.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/mailusers.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/main.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/xoops_version.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/main.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/modulesadmin.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/xoops_version.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/preferences/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/preferences/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/preferences/main.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/preferences/xoops_version.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/main.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/smileform.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/smilies.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/xoops_version.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/main.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/themeimgform.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/tplform.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/xoops_version.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/main.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/rankform.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/userrank.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/xoops_version.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/version/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/version/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/version/main.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/version/s_poweredby.gif
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/version/xoops_version.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/blocks/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/blocks/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/blocks/system_blocks.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/constants.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/bg_content.gif
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/bg_menu.gif
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/check.gif
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/hbar_left.gif
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/hbar_middle.gif
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/hbar_right.gif
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/info.gif
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/install.gif
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/logo.gif
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/lookup.png
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/menu.gif
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/powered_by_xoops.gif
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/system_slogo.png
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/uninstall.gif
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/update.gif
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/xoops2.gif
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/include/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/include/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/include/update.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/include/userselect.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/avatars.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/banners.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/blocksadmin.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/comments.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/findusers.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/groups.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/images.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/mailusers.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/modulesadmin.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/preferences.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/smilies.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/tplsets.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/userrank.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/version.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/blocks.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/error.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/main.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/modinfo.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/menu.php
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/sql/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/sql/upgrade.sql
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/sql/upgrade205.sql
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/style.css
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_comments.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_dummy.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_login.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_mainmenu.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_newusers.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_notification.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_online.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_search.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_siteinfo.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_themes.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_topusers.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_user.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_waiting.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/index.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_admin_block.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comment.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comments_flat.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comments_nest.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comments_thread.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_dummy.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_error.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_imagemanager.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_imagemanager2.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_notification_list.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_notification_select.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_plain.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_redirect.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_rss.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_siteclosed.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_userform.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_userinfo.html
XoopsCore/branches/2.2.x/2.2-main/html/modules/system/xoops_version.php
XoopsCore/branches/2.2.x/2.2-main/html/notifications.php
XoopsCore/branches/2.2.x/2.2-main/html/pda.php
XoopsCore/branches/2.2.x/2.2-main/html/pmlite.php
XoopsCore/branches/2.2.x/2.2-main/html/readpmsg.php
XoopsCore/branches/2.2.x/2.2-main/html/recovery.php
XoopsCore/branches/2.2.x/2.2-main/html/register.php
XoopsCore/branches/2.2.x/2.2-main/html/robots.txt
XoopsCore/branches/2.2.x/2.2-main/html/search.php
XoopsCore/branches/2.2.x/2.2-main/html/templates_c/
XoopsCore/branches/2.2.x/2.2-main/html/templates_c/index.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/README.txt
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/index.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockcenter_c.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockcenter_l.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockcenter_r.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockleft.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockright.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/calendar.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/index.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/style.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleAdmin.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleAdminMAC.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleAdminNN.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleMAC.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleNN.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/bg.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/delete_small.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/edit_small.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/head_bg.jpg
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/index.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/item_new.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/left_both.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/logo.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/logo.jpg
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/mail.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/menuarrow1.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/menuarrow2.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/minus.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/modadminbg.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/news_bl.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/news_br.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/news_tl.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/news_tr.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/pdf.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/plus.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/print.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/reply_small.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/right_both.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/index.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/js/
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/js/adminmenu.js
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/js/adminmenu_src.js
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/js/ie5.js
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/js/index.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/english/
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/english/admin.php
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/english/index.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/english/main.php
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/index.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/index.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/theme_adminnav.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/theme_moduleadmin.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/theme_usernav.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/theme.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/default/themeadmin.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/index.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/index.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/left_both.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/leftbar.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/logo.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/mainbar.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/modadminbg.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/right_both.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/rightbar.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/index.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/js/
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/js/admin.js
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/js/index.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/style.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/styleAdmin.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/styleMAC.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/styleNN.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/theme.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/theme_adminnav.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/theme_moduleadmin.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/themeadmin.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_cellpic_cat.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_foot_bg.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_foot_left.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_foot_right.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_toprow_bg.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_toprow_left.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_toprow_right.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/avatar.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/bg_left.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/bg_left_blocktitle.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/bg_right.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/bg_right2.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/bg_right_blocktitle.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/bookopen.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/center_bg.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/center_left.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/center_right.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/deleteuser.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/dots.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/down.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/dummy.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/edityp.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/folder.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/hbar_bg.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/hbar_left.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/hbar_middle.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/hbar_right.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/images/
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/images/index.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/images/left_both.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/images/modadminbg.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/images/right_both.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/index.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/inputbg.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/js/
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/js/admin.js
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/js/index.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/klipper.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/logo.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/logout.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/lostpass.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/mainmenu_admin.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/mainmenu_close.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/mainmenu_home.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/menu_arrow_norm.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/online_guests.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/online_members.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/page.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/pm.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/searchButton.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/style.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/styleAdmin.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/styleMAC.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/styleNN.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/submenu_box_norm.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_adminnav.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockcenter_c.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockcenter_l.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockcenter_r.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockleft.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockright.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_moduleadmin.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/themeadmin.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/up.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/user_admin.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/user_editaccount.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/user_inbox.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/user_logout.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/user_notifications.gif
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/README.txt
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockcenter_c.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockcenter_l.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockcenter_r.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockleft.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockright.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/calendar.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/style.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleAdmin.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleAdminMAC.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleAdminNN.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleMAC.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleNN.css
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/bl.png
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/br.png
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/header_logo.jpg
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/menubullet.png
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/ml.png
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/mr.png
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/tl.png
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/tr.png
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/js/
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/js/adminmenu.js
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/js/adminmenu_src.js
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/js/ie5.js
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/language/
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/language/english/
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/language/english/admin.php
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/language/english/main.php
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/navigation/
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/navigation/theme_adminnav.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/navigation/theme_moduleadmin.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/navigation/theme_usernav.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/theme.html
XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/themeadmin.html
XoopsCore/branches/2.2.x/2.2-main/html/uploads/
XoopsCore/branches/2.2.x/2.2-main/html/uploads/blank.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/index.html
XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3dbf8e94a6f72.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3dbf8e9e7d88d.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3dbf8ea81e642.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3dbf8eb1a72e7.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3dbf8edf15093.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3dbf8ee8681cd.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3e632f95e81ca.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4bf386b36.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4d4e4c4f2.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4d6422f04.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4d75edb5e.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4d8676346.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4d99c6eaa.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4daabd491.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4dbc14f3f.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4dcd7b9f4.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4ddd6835f.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4df1944ee.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e02c5440.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e1748cc9.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e29bbcc7.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e398ff7b.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e4c2e742.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e5e7563a.gif
XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e7853679.gif
XoopsCore/branches/2.2.x/2.2-main/html/user.php
XoopsCore/branches/2.2.x/2.2-main/html/userinfo.php
XoopsCore/branches/2.2.x/2.2-main/html/viewpmsg.php
XoopsCore/branches/2.2.x/2.2-main/html/xmlrpc.php
XoopsCore/branches/2.2.x/2.2-main/html/xoops.css
XoopsCore/branches/2.2.x/2.2-main/html/xoopsupdate.php
Log:
Adding a separate branch for 2.2 to prepare 2.2.4
Added: XoopsCore/branches/2.2.x/2.2-main/docs/COPYING.txt
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/docs/COPYING.txt 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/docs/COPYING.txt 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,88 @@
+GNU GENERAL PUBLIC LICENSE Version 2, June 1991
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
+
+When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and modification follow.
+
+GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
+
+1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+
+a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
+
+b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
+
+c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+
+3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
+
+a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+
+b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+
+c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+
+If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
+
+4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+
+5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
+
+6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
+
+7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
+
+This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+
+8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
+
+9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
+
+10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+
+NO WARRANTY
+
+11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+END OF TERMS AND CONDITIONS
+
Added: XoopsCore/branches/2.2.x/2.2-main/docs/INSTALL.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/docs/INSTALL.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/docs/INSTALL.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,120 @@
+<html>
+<head>
+ <title>Xoops Install Guide</title>
+ <meta name="keywords" content="XOOPS docs" />
+ <meta name="description" content="XOOPS" />
+ <style>
+ P, TD, LI, INPUT, BODY, SELECT, TEXTAREA { font-family: Verdana; font-size: 13px; line-height: 1.3 }
+ .error { color: #CC3333; font-weight: bold; }
+ UL { margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; }
+ OL { margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; }
+ .indent { margin-left: 40px; }
+ FORM { margin: 0px; padding: 0px; }
+
+ H1, H2, H3, H4, H5 { margin: 0px; padding: 0px; }
+
+ .additions { color: #008800; }
+ .deletions { color: #880000; }
+
+ .header { padding: 10px; padding-top: 0px }
+ .page { background-color: #FFFFFF; padding: 10px; border: 1px inset;}
+ .footer { background-color: #DDDDDD; padding: 5px 10px; border: 1px inset; border-top: none; border-top: 1px solid #CCCCCC }
+ .code { background: #FFFFFF; border: solid #888888 2px; font-family: "Courier New"; color: black; font-size: 10pt; width: 100%; height: 400px; overflow: scroll; padding: 3px; }
+
+ .revisioninfo { color: #AAAAAA; padding-bottom: 20px; }
+
+ .copyright { font-size: 11px; color: #AAAAAA; text-align: right; }
+ .copyright A { color: #AAAAAA; }
+</style>
+</head>
+
+<body
+ bgcolor="#F8F8F8" text="#000000">
+
+<div class="page">
+<h3>Installing XOOPS</h3>
+<hr noshade size="1" />
+<br />
+<h4>First time installation</h4>
+<br />
+<h4>Preface:</h4>
+Before begining the install process, we (the XOOPS team) ask that you have a good understanding of how to install and support server/hosted based software. As with anything in life, there's no easy answer or way. Sinice XOOPS is server based, it's not as easy to install as normal desktop software which in itself can be daunting to install so, please be familiar with setting up and installing the software listed below. Be familiar with how to configure CGI scripts and HTTP server software. It can easily be demonstrated that 80% of our support questions wind up being improper configurations with the server componenets or two pieces of software conflict. No two servers are configured alike.<br />
+<br />
+<br />
+To install XOOPS for the first time, you'll need to have the minimum following server software pre-installed:<br />
+<div class="indent">* HTTP Server (<a href="http://www.apache.org">Apache</a> or IIS) "Note, XOOPS only officially supports Apache"<br />
+* <a href="http://www.php.net">PHP</a> 4.1.0 and higher (4.1.1 or higher recommended)<br />
+* <a href="http://www.mysql.com">MySQL</a> Database 3.23.XX</div>
+<br />
+Before starting the install, be sure to have:<br />
+<div class="indent">* Setup the HTTP, PHP and database server properly.<br />
+* Create a database for your <a href="http://www.xoops.org">XOOPS 2</a> installation <br />
+<div class="indent">(Have your hosting company create one if you can't. The install script does provide this capability with the proper privileges).<br />
+</div>* A user account with the proper database permissions.<br />
+* The ability to set the following directories and files world writeable: uploads/, cache/ and templates_c/ and the file mainfile.php<br />
+* Turn cookie and <span class="missingpage">JavaScript</span><a href="http://wiki.xoops.org/wakka.php?wakka=JavaScript/edit">?</a> support in your browser on.</div>
+<br />
+<br />
+<h4>Installing locally</h4>
+If your running a local environment for development or testing, make sure that you have the previous requirements met. Once this is done, copy the contents of the HTML directory (from the XOOPS 2 distribution file or CVS) to the root document path of your web environment. Once the files are copied there, you can start the install by typing <a href="http://yoursite.com">http://yoursite.com</a>. This will start the install process.<br />
+<br />
+<h4>Installing on a hosted platform</h4>
+If your running in a hosted environment, unpack the XOOPS 2 files locally or on the server if you have telnet or SSH access. Once you done this, make sure to move or copy all XOOPS 2 files from the HTML directory to your root web directory (your provider usually provides this location with directions). Once the files are copied there, you can start the install by typing <a href="http://yoursite.com">http://yoursite.com</a>. This will start the install process.<br />
+<br />
+<h4>Continuing the install</h4>
+<img src="images/install001.gif" /><br />
+<br />
+After performing the above procedures, your ready to continue installing XOOPS 2 with the Install Wizard. The first screen in the install Wizard takes you to will be the welcome screen. <br />
+<br />
+<img src="images/install002.gif" /><br />
+<br />
+Click the Next button to continue on to the next screen. <br />
+<br />
+The next part of the install Wizard is designed to check your file and directory permissions. If your running in a <span class="missingpage">Win32</span><a href="http://wiki.xoops.org/wakka.php?wakka=Win32/edit">?</a> environment, this should be a pretty painless install. If you running in a UNIX environment, the Wizard will display any problems and the corrective actions to take if there are problems. <br />
+<br />
+<img src="images/install003.gif" /><br />
+<br />
+If all lights are green on the Wizard, click Next to continue. If not, please read the screen and perform the necessary actions recommended by the Wizard<br />
+<br />
+The next part of the Wizard is for writing the settings to the mainfile.php file. <br />
+<br />
+<img src="images/install004.gif" /><br />
+<br />
+The General Settings screen is self explanatory so, input the required information into the files and click next. <br />
+<br />
+The next four Wizard screens are informational displaying the settings from the General Settings screen for your confirmation and to show that the values were written correctly. <br />
+<br />
+<img src="images/install005.gif" /><br />
+<br />
+<img src="images/install006.gif" /><br />
+<br />
+<img src="images/install007.gif" /><br />
+<br />
+<img src="images/install008.gif" /><br />
+<br />
+If you seen any Red lights, please click the Back button to make the proper corrections.<br />
+<br />
+The next Wizard screen is will be to show the progress for accessing the database.<br />
+ <br />
+<img src="images/install009.gif" /><br />
+<br />
+If your in a hosted environment with out the proper access to create databases, please check with your provider for help in getting a database. If your provider (or you) created the database, all lights should be green. If you get a red light stating the DB does not exist and your user name has the ability to create databases, then click next and the install Wizard will attempt to create the database for you. If your user id does not have the rights to create a database, please correct this and continue the install. The next two screens are informational on trying to create and access the database. Click Next or Back depending on the Wizard screen.<br />
+<br />
+After clicking next a couple of times, you will come to an informational screen showing the results of table creation. If there is a problem, please refer to the <a href="http://wiki.xoops.org/wakka.php?wakka=Installation">FAQ</a> or <a href="http://www.xoops.org">XOOPS Forums</a> for further assistance. <br />
+<br />
+<img src="images/install011.gif" /><br />
+<br />
+ If all lights are green, your ready to proceed by clicking Next.<br />
+<br />
+The next Wizard screen is for inputting site administrative information. <br />
+<br />
+<img src="images/install024.gif" /><br />
+<br />
+Please be careful here and write down or remember your administrative password. You'll need this after the install to continue setting up your XOOPS 2 site. Once you have completed inputting the correct information, click Next to continue. * Note, try to refrain from using names with spaces for the Admin name. *<br />
+<br />
+The next screen is informational. If all the lights are green, click Next to continue.
+<br /><br />
+<h4>Congratulations!</h4>
+Your installation should now be complete. You can check the site out by clicking the "HERE" text on the last screen. If all went well, then your new site should be up and running. If not, please refer to the <a href="http://www.xoops.org/modules/smartfaq">FAQ</a> or <a href="http://www.xoops.org">XOOPS Forums</a> for further assistance.</div>
+</body>
+</html>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/docs/INSTALL.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/docs/UPDATE.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/docs/UPDATE.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/docs/UPDATE.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,59 @@
+<html>
+<head>
+ <title>Xoops Upgrade Guide</title>
+ <meta name="keywords" content="XOOPS docs" />
+ <meta name="description" content="XOOPS" />
+ <style>
+ P, TD, LI, INPUT, BODY, SELECT, TEXTAREA { font-family: Verdana; font-size: 13px; line-height: 1.3 }
+ .error { color: #CC3333; font-weight: bold; }
+ UL { margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; }
+ OL { margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; }
+ .indent { margin-left: 40px; }
+ FORM { margin: 0px; padding: 0px; }
+
+ H1, H2, H3, H4, H5 { margin: 0px; padding: 0px; }
+
+ .additions { color: #008800; }
+ .deletions { color: #880000; }
+
+ .header { padding: 10px; padding-top: 0px }
+ .page { background-color: #FFFFFF; padding: 10px; border: 1px inset;}
+ .footer { background-color: #DDDDDD; padding: 5px 10px; border: 1px inset; border-top: none; border-top: 1px solid #CCCCCC }
+ .code { background: #FFFFFF; border: solid #888888 2px; font-family: "Courier New"; color: black; font-size: 10pt; width: 100%; height: 400px; overflow: scroll; padding: 3px; }
+
+ .revisioninfo { color: #AAAAAA; padding-bottom: 20px; }
+
+ .copyright { font-size: 11px; color: #AAAAAA; text-align: right; }
+ .copyright A { color: #AAAAAA; }
+</style>
+</head>
+
+<body
+ bgcolor="#F8F8F8" text="#000000">
+
+<div class="page">
+<h3>Upgrade to XOOPS 2.2.x From 2.0.x</h3>
+<hr noshade size="1" />
+<br />
+<h4>Enable PHP debug</h4>
+Go to your administration area => system module => preferences => general settings and enable PHP debug
+<h4>Run pre-upgrade script</h4>
+After uploading all files in the patch archive, access www.example.com/xoopsupdate.php, replacing www.example.com with your site's URL. This will show error messages and no real content, but don't worry, just proceed to next step<br />
+<h4>Reload the page</h4>
+<h4>Press the submit button to update the system</h4>
+
+<h3>Upgrade From 2.2.x</h3>
+<hr noshade size="1" />
+<br />
+<h4>Enable PHP debug</h4>
+Go to your administration area => system module => preferences => general settings and enable PHP debug
+<h4>Upload XOOPS 2.2.x files</h4>
+Upload the 2.2.x files, overwriting existing files
+<h4>Update the System Module through the administration area</h4>
+
+<br /><br />
+<h4>Congratulations!</h4>
+Your update should now be complete. If all went well, then your updated site should be up and running. If not, please refer to the <a href="http://www.xoops.org/modules/smartfaq">FAQ</a> or <a href="http://www.xoops.org">XOOPS Forums</a> for further assistance.</div>
+
+</body>
+</html>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/docs/UPDATE.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/docs/changelog.txt
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/docs/changelog.txt 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/docs/changelog.txt 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,586 @@
+============================
+2005/10/30: Version 2.2.3 Final
+============================
+- SECURITY: Fix to prevent mail headers injection (Skalpa/XOOPS Cube)
+- SECURITY: Fix to prevent endless loop in PHPMailer (Skalpa/Minahito)
+- SECURITY: Fix to prevent XSS in the textsanitizer (Skalpa/XOOPS Cube)
+- SECURITY: Fix to prevent XSS in newbb and the comments system (Skalpa/Keigo Yamazaki of Little eArth Corporation Co., Ltd.)
+- SECURITY: Vaporfix to prevent uploading of invalid images (Skalpa/XOOPS Cube)
+
+- Added fallback in Authfactory to use XOOPS auth in case of the selected method's class file is inaccessible (phppp)
+- Changed quoteString() to put ' on all non-integers instead of just all strings (Mithrandir)
+- Changed XTheme::display() to use caching correctly and set page title and module header from $xoopsOption (phppp)
+- Fixed typo in XTheme::addCSS where <script> was used instead of <style> (phppp)
+- Added explanatory comments in XTheme::loadTheme and fixed $xoopsRequestUri to the correct $_SERVER['REQUEST_URI'] (phppp)
+- Added missing global declaration of $xoopsLogger in XTheme::checkCache() (phppp)
+- Fixed typos in class/xml/xmlatomparser.php and modules/profile/search.php (phppp/ymbo @ Xoops China)
+- Added patch #1267386 - Group perm form improvement (phppp/zollou)
+- Added {LOGINNAME} to mailer string-replace routine (Mithrandir)
+- Fixed bug #1285967 - bug with http://IP:PORT/ configured sites, XoopsSecurity::checkReferer now takes the port into consideration (phppp)
+- Added global declaration of $xoopsTpl in footer.php (phppp)
+- Changed include/checklogin.php to disallow everyone with a level below 1 instead of equalling zero (disabled users have level -1) (Mithrandir)
+- Cosmetic changes in xoops_confirm() function in include/functions.php (phppp)
+- Fixed bug/typo in include/functions.php function xoops_array_diff_assoc() (phppp)
+- Fixed bug in system installation where login, main menu and user menu blocks were not created correctly (Mithrandir)
+- Added pre-selected modules for the step of module selection and language files for the step of module installation (phppp)
+- Block bid assignment added so both block and instance has the right value for bid in XoopsBlockInstanceHandler::getLinkedObjects() (phppp)
+- Modified kernel/module.php regexp for page detection in getCurrentPage() (phppp)
+- Changed order of error messages in module installation (phppp)
+- Fixed bug in kernel/module.php where config unused options would not be removed if a config has no options any more (phppp)
+- Fixed bug in kernel/object.php where whereclause is wrongly generated for multiple keyname (phppp)
+- Fixed missing language definition for profile edit by adding multi-languge processing for profile fields in kernel/profilefield.php (phppp)
+- Added missing process for forcing update profile data in kernel/profilefield.php "function loadFields" (phppp)
+- Changed custom time computation in XoopsLocal class language/english/local.php (phppp)
+- Fixed lostpass.php to properly set new password when clicking on e-mailed link (Mithrandir)
+- Fixed bug #1276917 - 2.2.3: Edit User won't save Group change
+- Fixed bug #1262813 - Add User, some fields are reset when error occur (Mithrandir/marook)
+- Added password length check in modules/profile/register.php (phppp/Aries)
+- Modified error message rendering in modules/profile/register.php (phppp)
+- Fixed bug #1250347 - search in profiles doesnt work properly (Mithrandir/irmtfan)
+- Fixed bug #1247398 - Error in modules/profile/search.php (Mithrandir/edomch)
+- Added button to change password in user profile (phppp)
+- Fixed bug in system/admin/banners/main.php where it was impossible to edit banner clients (Mithrandir/Peekay)
+- Fixed bug #1253289 - Can't make blocks invisible (Mithrandir/barrycooper)
+- Added safety in blocks administration for blocks that come from modules that no longer exist (database inconsistency) (Mithrandir)
+- Added safety in template administration for templates that come from modules that no longer exist (database inconsistency) (Mithrandir)
+- XHTML Fix in XMT theme (phppp)
+- Added overflow treatment for xoopsCode/xoopsQuote (phppp)
+- Added update procedure to System module update, where blocks and templates without corresponding modules will be removed (Mithrandir)
+- Fixed deprecated variable ("name" => "uname") in system/blocks/system_blocks.php function b_system_info_show() (phppp)
+- Added Patch #1281295 - wrong error_reporting in smilies administration (phppp/birdseed)
+- Fixed bug in system/admin/modulesadmin/modulesadmin.php where configuration categories were not removed on module uninstallation (Mithrandir)
+- Fixed bug in system/admin/modulesadmin/modulesadmin.php where block templates could remain in the database after module uninstall (Mithrandir)
+- Interface improvements in module installation (phppp)
+- Changed XoopsFormSelectUser constructor signature to follow convention from XOOPS 2.0.x (Mithrandir)
+- Moved hidden fields from bottom of <form> tag to the top in XoopsThemeForm::render() for backwards compatibility and XHTML compliance (Mithrandir)
+- Changed XOOPS_URL detection and checking during installation to require an absolute URI and not a relative one (Mithrandir)
+- Fixed the mysql class quoteString() so it unconditionnally quotes the parameter again (back to 2.0.x behavior) (Skalpa)
+- Fixed handling of array vars in XPOH insert and insertAll (Skalpa)
+- Fixed bad references use in XoopsObject and XOPH classes (Skalpa)
+- Fixed bad references use in sanitizer (Skalpa)
+- Fixed bad references use in installer sanitizer (Skalpa)
+- Fixed user search in Extended Profile module, when searching for values in select and radio type fields (Mithrandir/miscellone)
+- Fixed Bug #1294569 - Magic Quote Issue when registering users, additional slashes were added (Mithrandir/Monique)
+- Fixed bug where profiles would not be deleted on user deletion (Mithrandir)
+- Added routine to System Module update to set default values for comments, timezone and theme fields to system values (phppp)
+- Fixed Bug #1298674 - Block caching isn't running (Mithrandir/mcleines)
+- Fixed Bug #1303864 - Delete user account frontside(Mithrandir/MarcoFr)
+- Fixed Bug #1303810 - Main admin account deletion control 2.2.3RC2 (Mithrandir/MarcoFr)
+- Fixed Bug #1262806 - 2.2.x: Default TZ is not used in Add User (Mithrandir/Marook)
+- Fixed Bug #1306176 - 2.2.3RC2 - User update fails (Mithrandir/rlinfoot)
+- Changed module installation and update routine so it now halts, when xoops_module_pre_xxx function fails (Mithrandir)
+- Fixed security problem in Koivi editor (phppp/Marijuana)
+
+============================
+2005/08/12: Version 2.2.2
+============================
+- SECURITY: Fixed several path disclosure issues (Mithrandir/ajaxbr+Dave_l)
+- Fixed bug #1253433 - Outbox to-link wrong (Mithrandir/Dave_l)
+- Fixed bug #1256352 - insertConfigCategories (Mithrandir/Pnooka)
+- Fixed bug #1255004 - malformed uri in class/theme.php (Mithrandir/Frankblack)
+- Fixed bug #1252898 - SMTP, SMTPAuth Fsockopen error (Mithrandir/fatalsaint)
+- Fixed wrong call to loginUser() with uname instead of loginname (Mithrandir/ef11cornell)
+- Fixed bug #1249880 - Change Email function can't be disabled (Mithrandir/Dave_l)
+- Added "font styles" to language files in xoopseditor/koivi (phppp)
+- Added empty $text check for encoding conversion in languages/english/local.php (phppp)
+- Removed language files other than English (phppp)
+
+============================
+2005/08/08: Version 2.2.1
+============================
+- Manually applied the PHPMailer 1.73 SMTP fix to prevent potential issues (skalpa)
+- Fixed a bug in the installer that could prevent mainfile.php to be created correctly on PHP5 (skalpa)
+- Moved module-admin item to the top of the admin menu (phppp)
+- Fixed a typo for constant variable check in error.php (phppp)
+- Commented out the "showrblock" from functions.php (phppp)
+- Added error message for user not found in auth service (phppp)
+- Corrected Header set Charset in installer (phppp)
+- Moved auth language defination to its right place (phppp)
+- Fixed typo in XoopsLogger->addblock (phppp)
+- Minor fix on reference usage in textsanitizer (phppp)
+- Changed default config for use-realname to false (phppp)
+- Fixed loginUserMd5() typo in member handler (phppp)
+- Changed reference to make it work when calling another module's install on a module's update (phppp)
+- Rolled back system-info block (phppp)
+- Dix for icon url in comment block (phppp)
+- Add new PM prompt to user-menu block (phppp)
+- Changed user name (which is not always available and not much infomative) to user uname in userselect (phppp)
+- Added install function for inserting PM link to existing users' profile (phppp)
+- Ensure to use username and not real name in PM composer (phppp)
+- PM module: Bugfix for setting message as "read" (phppp)
+- PM module: Bugfix for icon url (phppp)
+- Fix to display profile items with value only in userinfo page (phppp)
+- Fix where language file was not included in profile activation page (phppp)
+- Fix for error message in changemail (phppp)
+- Fixed problems with Admin right in edituser.php (phppp)
+- Added possibility for admin to change users email (phppp)
+
+============================
+2005/07/27: Version 2.2
+============================
+
+???
+
+============================
+2005/07/21: Version 2.2 RC2
+============================
+- Fixed registration issues with dynamic user profile fields (Mithrandir)
+- Added login name property for a user, so login name and displayed username is now (potentially) differerent (Mithrandir)
+- Refinements in PM module (phppp)
+- Refinements in Profile module (Mithrandir)
+- Refinements in XoopsForm classes (phppp)
+- Fixed bug where comments would not show if the user had no settings for mode and order (Mithrandir/Rowdie)
+- Fixed bug in LDAP authentication where configuration values were not fetched correctly (Mithrandir)
+
+Language constant changes:
+- _PROFILE_MA_REALNAME added to modules/profile/language/english/main.php
+- _PM_RUSUREEMPTY and _PM_RUSUREDELETE added to modules/pm/language/english/main.php
+- _INSTALL_L37 and _INSTALL_L167 added to install/language/english/install.php
+- {X_UNAME} changed to {LOGINNAME} in language/english/mail_template/lostpass2.tpl
+============================
+2005/07/14: Version 2.2 RC
+============================
+- Fixed security hole in XML-RPC for both magic_quotes_gpc on and off (Mithrandir/James at Gulftech, Onokazu)
+- Fixed sanitation in Criteria class for both magic_quotes_gpc on and off (Mithrandir/Onokazu)
+- Fixed sanitation bug in include/checklogin.php (Mithrandir)
+- Fixed bug in comments, where editing a comment would post a new one
+- Removed PHP parsing in Saxparser's handleProcessingInstruction() method (Thanks to GIJOE)
+- Fixed parse error in modules/newbb/post.php
+- Fixed sanitation bug in include/comment_form.php and include/comment_post.php (Mithrandir/James at Gulftech)
+- Fixed sanitation bug in class/xml/rpc/xmlrpcapi.php and class/criteria.php (Mithrandir/James at Gulftech/XOOPS JP)
+- Changed admin.php to fetch news from xoops.org via Snoopy (Mithrandir/XOOPS JP)
+- Fixed possible XSS hole in redirect_header (Mithrandir/XOOPS JP)
+- Security fixes in pda.php and misc.php (Mithrandir/XOOPS JP)
+- Fixed typos in kernel/object.php (Mithrandir/brandycoke)
+- Fixed bug where lostpass.php would not accept emails and send new password (Ackbarr)
+- Fixed bug where search result links would be wrong if the item was in another module than the searched one (Ackbarr)
+- Fixed bug in groups admin where it was impossible to add users to a group if the site had 200+ users (Ackbarr)
+- Fixed bug with uploading smilies (Ackbarr)
+
+Other Additions:
+- PM Module functionality expanded (phppp)
+
+============================
+2005/05/21: Version 2.1.1
+============================
+- Fixed bug #970474 - class/zipdownloader.php (Mithrandir/AC-Ibu)
+- Fixed bug #1087786 - Can't assign to $this in PHP5 (Mithrandir)
+- Fixed bug #1156510 - Typo Fixes in XoopsObject (Mithrandir/NS Tai, Brandycoke)
+- Fixed bug #962025 - Word Censoring Options (Mithrandir/Tom Hayakawa)
+- Fixed bug #1168850 - activateUser method is not used in admin panel (Mithrandir/Andrey)
+- Fixed bug #1167596 - Hardcoded texts in XoopsObject (Mithrandir/hthouzard)
+- Fixed bug #1166354 - image.php - undefined constant (Mithrandir/dave_l)
+- Fixed bug #1164226 - improvement in function xoops_refcheck (Mithrandir/sudhaker)
+- Fixed bug #1163599 - Big sessions error (Mithrandir)
+- Fixed bug #1162290 - The xoops_config (config_id field) reaches its max (Mithrandir)
+- Fixed bug #1151930 - index.php - use "require" instead of "include" (Mithrandir/dave_l)
+- Fixed bug #1144690 - XoopsFormHidden does not conform HTML rule (Mithrandir/suin)
+- Fixed bug #1122854 - cannot be set up version 2.05 of module (Mithrandir/ohwada)
+- Fixed bug #1122253 - show notice message when post comment (Mithrandir/ohwada)
+- Fixed bug #1120729 - xoops_footer not in default theme (Mithrandir/dave_l)
+- Fixed bug #1118908 - 1 html-bug in xoopscodes.php (Mithrandir/frankblack)
+- Fixed bug #1098445 - problem with clickable links (dave_l/hthouzard)
+- Fixed bug #1083928 - XoopsErrorHandler_HandleError - regex usage (Mithrandir/dave_l)
+- Fixed bug #1082042 - Error in parsing date in calendar.js (Mithrandir/puff_daweed)
+- Fixed bug #1059216 - gzip compression & php debugging Conflict (Mithrandir/Liquid, WF)
+- Fixed bug #1054221 - xoops_module_header can not be cached (Mithrandir/phppp)
+- Fixed bug #1020494 - Uninformative error message if admin passwords differ (Mithrandir)
+- Fixed bug #1014438 - Admin popup menu when mouse over (Mithrandir)
+- Fixed bug #1014408 - XoopsGroupPermForm forms req. sys admin rights to use (Mithrandir/jegelstaff)
+- Fixed bug #1011296 - include/checklogin.php calculates a wrong url (Mithrandir/puntoexe)
+- Fixed bug #980100 - Variable substitution in db password (dave_l/dcinege)
+- Fixed bug #973918 - showImgSelected - Proposed change (Mithrandir)
+- Fixed bug #972552 - stopping install without error message (PHP without mysql) (Mithrandir/snagai)
+- Fixed bug #894799 - [fix] No JS validation of required fields in PM (Mithrandir/masi)
+- Fixed bug - Don't show preferences link to users without permission (Mithrandir)
+- Fixed bug #1174230 - wrong formatTimestamp() syntax in formtextdateselect.php (Mithrandir/ZPC)
+- Fixed bug #967076 - xoops_version and templates! (Mithrandir/w4z004)
+- Fixed bug #1174626 - phpkaox style sheet (Mithrandir/wardick)
+- Fixed bug #1196034 - getSmileys (Mithrandir/phppp)
+
+- Added patch #1162913 - xoops_getLinkedUnameFromId (Mithrandir/hthouzard)
+- Added patch #1124749 - Module cache and one-column full-screen display (Mithrandir/phppp)
+- Added patch #1105492 - CSS for backend.php (system_rss.html) (Mithrandir/ajaksu2)
+- Added patch #1099086 - who's online popup (Mithrandir/banned)
+- Added patch #1096514 - Activation of new user (Mithrandir/gibaphp)
+- Added patch #1090132 - functions.php, redirect_header (Mithrandir/banned)
+- Added patch #1065669 - Slight enhancement to XoopsPageNav::renderImageNav() (Mithrandir)
+- Added patch #1052866 - language detection in install.php (Mithrandir/phppp)
+- Added patch #989376 - Use REQUEST_URI instead of PHP_SELF generally (Mithrandir/mrmx)
+- Added patch #944710 - Extra Cookie for the newbb (Mithrandir/Predator)
+- Added patch #912823 - Saving one query per request (Mithrandir/sudhaker)
+- Added patch #963071 - Random password generator (Mithrandir/dave_l)
+- Added patch #1056514 - SQL Generation Time (Mithrandir/bd_csms)
+- Added patch #920059 - XOOPS reports why people can't login (Mithrandir/Herko)
+- Added patch #1181607 - Update jsCalendar to 1.0 (Mithrandir/reddshack)
+- Added patch #1181328 - Getting rid of negative information on search results page (Mithrandir/frankblack)
+- Added patch #1077123 - Make YYYY-mm-dd default for dateboxes when no date passed (Mithrandir/jegelstaff)
+- Added patch #1194690 - Show all required fields in every forms (Mithrandir/hthouzard)
+- Added patch #919353 - Permanent selectable theme (Mithrandir/frankblack)
+- Added patch #1019464 - Extended renderldap function in class criteria (Mithrandir/pemen)
+
+Other fixes:
+- Search block now defaults to searching in current module (Mithrandir)
+- XoopsPersistableObjectHandler added, making it much easier making database access classes (Mithrandir)
+- Fixed rare case, where search results that gave full path would have XOOPS_URL."/modules/dirname" prepended - Only relevant for modules that search other modules (Mithrandir)
+
+Additions:
+- Dynamic User Profiles (Mithrandir/Ackbarr)
+- Administration area themeable + new theme (Ralf57)
+- Error page when referer is blocked and the user attempts to change content in the database (Mithrandir)
+- Configuration categories - modules can now categorise their configuration items (Mithrandir/Malanciault)
+- XoopsUser::uname is now used solely for login purposes, real name is used for display on screen (Mithrandir)
+- PM functionality moved into a module instead of in the core (Mithrandir/Wanikoo)
+
+
+============================
+2005/04/23: Version 2.0.10
+============================
+- Fixed typo in newbb/post.php
+
+============================
+2005/04/03: Version 2.0.10 RC
+============================
+- Implemented new token system for validating form origination and increased protection against CSRF (Mithrandir/Onokazu)
+- Security fix to avoid the usage of fopen and unlink when previewing (Onokazu)
+- Fixed bug - Missing </a> in news/templates/blocks/news_block_bigstory.html (Mithrandir/blacKurd)
+- Fixed bug in header.php assign $xoops_lblocks (Mithrandir/phppp)
+- Fixed bug #1087786 Can"t assign to $this in PHP5 (Mithrandir)
+- Included 2.0.9.3 fixes in 2.0.10 patch for easy upgrade from 2.0.9.2 (Mithrandir/rowd)
+- Fixed bug #1157029 - Bug in include/checklogin.php (Onokazu/sudhaker)
+- Fixed bug #1060061 - renderValidationJS showing htmlentities instead of intended characters (Onokazu/theCat)
+
+2005/03/20: Version 2.0.9.3
+===============================
+- Security fix to prevent uploading of executable files (pokleyzz, GIJOE and the JP XOOPS community)
+
+2004/12/30: Version 2.0.9.2
+===============================
+- Security fix to prevent session hijacking (thanks goes to GIJOE and the JP XOOPS community)
+- Fixed duplicated blocks bug on module update
+- phpmailer back to the version included in 2.0.7.3, as it is more stable (onokazu)
+
+
+2004/12/25: Version 2.0.9
+===============================
+- Security fix in the newbb module for PHP version < 4.3.10 (GIJOE & onokazu)
+- Security fix in the newbb module to prevent XSS attacks (minahito)
+- Fixed various problems related to XoopsUser::isAdmin() and $xoops_isadmin patch in 2.0.7.1 (bugs #1014203/#1014403) (onokazu)
+- Fixed incorrect parameters being passed to CriteriaCompo in modulesadmin.php (onokazu)
+- Fixed incorrect parameters being passed to XoopsXmlRpcStruct::add() in BloggerApi::getUserInfo() (onokazu)
+- Fixed Bug #1023022 - XoopsFormDhtmlTextArea and array_push() error (Mithrandir)
+- Fixed Bug #1013989 - Inbox title shoud be plural "Private Messages" (Mithrandir)
+- Fixed Bug #1004998 - readpmsg.php typo:</th> html tag of subject is nothing (Mithrandir)
+- Fixed Bug #1035707 - Enable array type options in blocks (Mithrandir)
+- Fixed a typo in include/comment_form.php, patch #1041993 (Dave_l)
+- Fixed Bug #1044957 - xoopsmultimailer.php Username typo when SMTP-Auth (Mithrandir)
+- Fixed RFE #900348 - Sort user list alphabetically in System -> Groups. Also changed the way it fetches the users in the group so it fetches all of them with 2 queries instead of 1 + (1 per user in the group) (Mithrandir
+)
+- Added patch #1048384 - mysql_field_name and others, added (Mithrandir)
+- Fixed bug #1049017 - Blocks sharing a template are cached wrong (Mithrandir)
+- Added patch #1048382 - Module onUpdate function (Mithrandir)
+- Fixed bug #989462 - Handler object caching not working (Mithrandir)
+- Added RFE #900345 - View/Edit group membership in Admin -> System -> Edit User (Mithrandir)
+- Fixed Bug #1055901 - group.php(IN phrase is used ,query) (Mithrandir)
+- Fixed bug #1052403 - block update in module update (Mithrandir)
+- More fixes for register_globals off in the top 10 page of mylinks/mydownloads modules
+- Fixed a typo in modules/xoopsheadline/admin/index.php (onokazu)
+- Fixed bug where 2 headline forms were using the same form name/id, causing JS error (onokazu)
+- Fixed some html problems in mylinks/mydownloads admin page (onokazu)
+- Secured mainfile.dist.php from disclosing paths (Mithrandir)
+- Fixed bug #1073029 (onokazu)
+- Fixed bug #1073532 (onokazu)
+- Fixed bug #1080791 (onokazu)
+- Fixed lang phrase _NOT_ACTIVENOTIFICATIONS not being assing to template (onokazu)
+- Some PHP5 fixes (Mithrandir)
+- Updated Smarty to version 2.6.5
+- Updated PHPMailer to version 1.72
+
+
+2004/09/11: Version 2.0.7.3
+===============================
+!! SECURITY FIX !! fixed more bugs that allowed session hijacking under a certain circumstance (onokazu)
+
+
+2004/09/10: Version 2.0.7.2
+===============================
+!! SECURITY FIX !! fixed bugs that allowed session hijacking under a certain circumstance (onokazu)
+
+
+2004/08/21: Version 2.0.7.1
+===============================
+Fixed bug #1006511 about $xoops_isadmin misuse (skalpa/the jp.xoops.org community):
+- Changed XoopsUser::isAdmin() behavior to prevent problems with modules that misuse this function
+- Fixed permission checking in user profile page, to only show admin links to people who are supposed to see them
+- Fixed permission checking in the comments system, to only show admin links to people who are supposed to see them
+Fixed incorrect escaping of configuration values in 2.0.7 (skalpa)
+Changed db proxy class error message from "Action not allowed" to "Database update not allowed during a GET request" (skalpa)
+Fixed bug #964084: if comment title is long multi-byte character.last byte loss (Mithrandir/domifara)
+Fixed bug #977360: Wrong icon in comment bloc (Mithrandir/zoullou)
+Fixed bug #976534: modules incompatibilities in 2.0.7 (Mithrandir/gijoe_peak)
+Fixed bug #975803: Typo in class/pagenav.php (Mithrandir/Dave_l)
+Fixed bug #974655: slogan variable with Xoops 2.0.7 (Mithrandir/brashquido)
+Fixed bug #987171: typo in edituser.php (Mithrandir)
+Applied patch #928503: Search results for modules with granted permissions optimised (Mithrandir/malanciault)
+Applied patch #988715: cp_header.php language (Mithrandir/phppp)
+Fixed MyTextSanitizer PHP notices (Mithrandir)
+Fixed XoopsForm PHP Notices about an unset _extra property (Mithrandir)
+
+
+2004/06/14: Version 2.0.7
+===============================
+!! SECURITY FIX !! preventing code injection in media uploader (skalpa)
+!! SECURITY FIX !! preventing execution of external scripts in shared environments (skalpa/ackbarr)
+
+Fixed bug #963937: Typo in modules/system/admin/findusers/main.php (mithrandir/tom_g3x)
+Fixed typo in x2t theme css colteaser class definition (w4z004)
+Set formButton class to Xoops popups buttons (w4z004)
+Fixed bug #960970: Incorrect display of the graphical pagenav (w4z004)
+Modified the Word Censoring fix (#962025) for MySQL 4.x compat (skalpa + quick thx 2 hervet 4 help)
+Ensured page title and slogan are escaped for HTML (onokazu)
+Fixed bug #961565: Search form keywords not checked by JS (mithrandir/tom_g3x)
+Fixed bug #961118 in XoopsFormElementTray::getElements() (mithrandir/luckec)
+Fixed bug #961311: Incorrect definition of headers var in XoopsMailer class (mithrandir/tom_g3x)
+XoopsForm::assign() now indexes elements by name if possible (mithrandir/kerkness)
+Fixed bug #963197: xoopsHiddenText is hardcoded in formdhtmlarea (mithrandir/tom_g3x)
+Fixed bug #963301: XoopsMediaUploader checkMaxHeight() doesn't work (skalpa/onokazu)
+Fixed bug #963327: XoopsImageHandler delete() keeps rows in imagebody table (skalpa/tom_g3x)
+Fixed bug #962025: Word censoring can mess db config options up (skalpa/tom_g3x)
+Fixed bug #961313: XoopsMailer custom headers are duplicated (skalpa/tom_g3x)
+Fixed bug #960683: [code] wrong translation (skalpa/ryuji+gi_joe)
+Fixed snoopy bug due to language specific characters (onokazu)
+Fixed a bug preventing deletion of users from the admin user search results (onokazu)
+Fixed a bug preventing deletion of admin users (onokazu)
+Fixed bug #915976: module onInstall feature doesn't display module messages correctly (skalpa/feugy+dave_l)
+Fixed bug #898776: Xoops module resolution for www.host.com and host.com (wulff_dk)
+Fixed bug #906282: XoopsGroupPermForm::render() - throws Undefined variable (mithrandir)
+Fixed bug #946621: Comments system extra_param not working with register_globals off (mithrandir/gstarrett)
+Fixed bug #932200: Admin > Edit user shows wrong username :-(mithrandir)
+Fixed bug #936753: $xoops_module_header not in all themes (w4z004)
+Fixed bug #921930: SQL queries with leading whitespace don't work (mithrandir)
+Fixed bug #920480: xoops_substr always adds three dots (skalpa)
+Fixed bug #921448: Undefined variable in xoopscodes.php (skalpa/dave_l)
+Applied patch #953063: js Calendar first popup date bug fix (mithrandir/venezia)
+Applied patch #953060: xoopstree.php selbox - subcategories not ordered (mithrandir/venezia)
+Applied patch #928503: Only show search results for modules with granted permissions (mithrandir/malanciault)
+Fixed bug #922152 preventing notifications to work with some Windows configurations (skalpa/robekras)
+Fixed bug #930351 preventing XoopsThemeForm::insertBreak() to work
+Corrected the content of $xoopsRequestUri on IIS fixing bug #895984 (skalpa)
+
+
+2/6/2004: Version 2.0.6
+===============================
+- Removed calls to XoopsHandlerRegistry class (onokazu)
+- Fixed loop problem after retrieving a lost password (onokazu)
+- Changed all include() calls to include_once() for xoopscodes.php (onokazu)
+- Added routines to remove users from the online member list when a user is deleted (onokazu)
+- Added parameters to the Critreria class constructor to allow the use of DB functions in SQL criteria (skalpa)
+- Added fetchBoth() method to the XoopsDatabase class (skalpa)
+- Fixed typos in class/smarty/plugins/resource.db.php (skalpa)
+- Refactoring in /class/xoopsform/form.php (skalpa)
+- Added some methods to /class/xoopsform/formelement.php to allow the use of accesskey and class attributes in form element tags (skalpa)
+- Fixed extra HTML tags not being displayed when using the XoopsThemeForm::insertBreak() method (Catzwolf)
+- Changed the default HTTP method of the search form to GET (onokazu)
+- Fixed notification constants not being included during installation (onokazu)
+- Fixed session data not being properly escaped before inserting to the database (onokazu)
+- Some useful changes to the group permission form (onokazu)
+- Fixed the block cachetime selection being reset after preview (onokazu)
+- Fixed invalid regex patterns used for username filtering, also added fix to allow the safe use of multi-byte characters in username (contributed by GIJOE)
+- Fixed bug where some blocks were not being displayed in block admin page on certain occasions (onokazu)
+- Fixed the problem of system admin icon disappearing on certain occasions (onokazu)
+- Fixed the errorhandler class to check the current error_reporting level before handleing errors (onokazu)
+- Re-activated the errorhandler class (onokazu)
+- Updated class/Snoopy.php to the latest version, v1.01 (onokazu)
+- Fixed a typo in kernel/online.php (onokazu)
+- Added some useful functions to include/xoops.js (skalpa)
+- Fix for Opera in include/xoops.js (onokazu)
+- Fixed user bio and signature values causing corruption in the edit profile form on certain occasions (onokazu)
+- Fixed the module name being reset to the default value after module update (onokazu)
+- Fixed invalid regex patterns in xoopslists.php (onokazu)
+- Fixed a few issues with register_globals setting
+- Fix for the auto-login feature (not activated)
+- Fixed image categories not being displayed in the order set by admin (onokazu)- Fixed a typo in kernel/config.php (onokazu)
+- Fixed comments not being displayed in the order as requested (onokazu)
+- Fixed the mailer class not setting some header values (onokazu)
+- Fixed chmod problem in class/uploader.php
+- Fixed magic_quotes related problems in class/uploader.php
+- Fixed notification routines causing a fatal error while trying to notify non-existent users (onokazu)
+- Added fix to convert & to & within mail messages (onokazu)
+- Fixed html special characters causing problem when submitting a new module name (onokazu)
+- Fixed javascript error in mailuser form (onokazu)
+- Fixed javascript error in calendar date select form
+- Added a new Smarty function <{xoops_link}> (skalpa)
+- Added check to prevent webmaster user/group from being removed completely (contributed by Ryuji)
+
+newbb
+- Security fix in modules/newbb/viewtopic.php (onokazu)
+- Security fix in modules/newbb/viewforum.php (onokazu)
+- Added register_globals related fix to topicmanager.php (onokazu)
+- Fixed topic moderation icons not being displayed for moderators in templates/newbb_thread.html (onokazu)
+- Fixed topic time not being displayed in recent posts block on certain occasions in blocks/newbb_new.php (onokazu)
+- Added fix to correctly navigate to the requested post even when the post is not on the first page of flat view (contrib by GIJOE in class/forumpost.php, viewtopic.php, viewforum.php)
+
+sections
+- Added missing global variable declarations to index.php (onokazu)
+
+mydownloads
+- Added register_globals related fix to modfile.php (onokazu)
+
+news
+- Added fix to always display published date in each article (onokazu)
+- Added missing ?> at the end of file in xoops_version.php (onokazu)
+- Some fixes in admin/index.php
+
+xoopspolls
+- Fixed color bar selections not working when creating/editing a new poll (onokazu)
+
+xoopsmembers
+- Fixed 'more than X posts' not working when set to 0 (onokazu)
+- Added a new language constant to language/english/main.php (Catzwolf)
+- Removed invalid HTML tags in templates/xoopsmembers_searchresults.html (Catzwolf)
+
+
+1/5/2004: Version 2.0.5.2
+===============================
+- Security fix in modules/mylinks/myheader.php
+- Security fix in modules/mylinks/visit.php
+- Security fix in modules/mylinks/admin/index.php
+
+
+11/22/2003: Version 2.0.5.1
+===============================
+- Added $option parameter to xoops_gethandler function (skalpa)
+- Security fix in banners.php (onokazu)
+- Security fix in modules/newss/include/forumform.inc.php (onokazu)
+- Security fix in include/common.php (onokazu)
+- Temporarily disabled XoopsErrorHandler class (onokazu)
+- Security fix in include/functions.php (onokazu)
+- Removed XoopsHandlerRegistry class (onokazu)
+- Added fix for preventing users entering infinite loop when recovering a lost password (onokazu)
+
+
+10/8/2003: Version 2.0.5
+===============================
+- Fixed template files not being updated even when the 'allow update from themes directory' option was enabled in preferences
+- Fixed RSS channel title being cutoff at special characters
+- Minor bug fix in pagenav.php
+- Fixed blocks disappearing from the block admin page on certain occasion
+- Additional fixes to work with register_globals off
+- Fixed problem with XoopsCode Img button not working on certain occasion
+- Added missing SQL query in kernel/avatar.php
+- Fixed problem with the newbb module where users could post without a thread title on certain occasion
+- Fixed problem in banner admin page where banner edit form not being displayed on certain occasion
+- Fixed group selection option in the blocks admin page not being selected on certain occasion
+- Fixed poll option textbox forms not displaying the correct values
+- Fixed show all link in user profile page not working in 2.0.5RC
+- Additional phrases in language/english/global.php(_NOTITLE), language/english/search.php(_SR_IGNOREDWORDS), install/language/english/install.php(_INSTALL_L128, _INSTALL_L200)
+- Added check in install/index.php to read $HTTP_ACCEPT_LANGUAGE on initial load
+
+
+9/30/2003: Version 2.0.5 RC
+===============================
+- Fixed email checking bug mentioned in http://www.xoops.org/modules/newbb/viewtopic.php?topic_id=12288&forum=2 (mvandam)
+- Fixed a number of bugs in blocks admin page (onokazu)
+- More usability fix in blocks admin page (onokazu)
+- Fixed forum topic links to correctly use the # feature in url (onokazu)
+- Fixed password checking bug mentioned in http://www.xoops.org/modules/newbb/viewtopic.php?topic_id=12301&post_id=49369&order=0&viewmode=flat&pid=49203&forum=21#forumpost49369
+- Fixed database connection error when creating database during install (onokazu)
+- Fixed mb_output_handler causing problems in backend.php/image.php/downloader (onokazu)
+- Fixed search feature to use GET requests for prev/next/showall links (onokazu)
+- Register_globals related fix in /include/comment_post.php (contrib by gstarrett)
+- Added $xoopsUserIsAdmin global variable (onokazu)
+- Added xoops_getLinkedUnameById function to /include/functions.php (Catzwolf)
+- Fixed invalid Smarty tags in /modules/system/templates/system_siteclosed.html, /modules/system/templates/system_redirect.html, /modules/system/templates/system_imagemanager2.html (onokazu)
+
+
+9/19/2003: Version 2.0.4
+===============================
+- XOOPS_CACHE_PATH, XOOPS_UPLOAD_PATH, XOOPS_THEME_PATH", XOOPS_COMPILE_PATH, XOOPS_THEME_URL, XOOPS_UPLOAD_URL are now set in include/common.php (onokazu)
+- Added [siteurl][/siteurl] tag to XoopsCode (mvandam)
+- Fixed a typo in class/uploader.php (onokazu)
+- Fixed some redirect problems after login (onokazu)
+- registre_globals fix in include/comment_view.php (onokazu)
+- Xoops.org news is disabled by default in the admin section (onokazu)
+- Added a new error handler class (class/errorhandler.php) (mvandam)
+- Fixed XoopsGroupPermHandler returning duplicate permissions (onokazu)
+- Fixed block-disappearing problem in blocks admin (onokazu)
+- Fixed typo in kernel/notification.php (mvandam)
+- Added XoopsGuestUser class in kernel/user.php (onokazu)
+- Fixed newbb module to correctly use the # feature in URL (onokazu)
+- Improved usability in blocks admin section
+- Reduced number of users to display in group/edituser page to max 200 users (onokazu)
+- Fixed bug where admins could add users with a existing username (onokazu)
+- Added files for module developers to easily add group permisson feature (modules/system/groupperm.php, class/xoopsform/groupperm.php) (onokazu)
+- Fixed typo in register.php (onokazu)
+
+
+6/17/2003: Version 2.0.3
+===============================
+- fixed CSS related bug in global search page
+- register_globals bug fix in comments
+- Smarty updated to 2.5.0
+- fixed typo in kernel/object.php
+- fixed group permission bug
+- fixed bug where image categories were deleted after group permission update
+- fixed bug where user votes could not be deleted in the mylinks module
+- fixed some language typos
+- changed XoopsGroupPermHandler::getItemIds to accept an array fot the second parameter (gperm_groupid), which was required in certain places..
+- removed avatar image files
+
+
+4/25/2003: Version 2.0.2
+===============================
+- security fix to prevent malicious cross site scripting attacks (onokazu)
+- fixed character encoding problem for some languages when using the mailer class (onokazu)
+- fixed some major bugs in the xoopsheadline module (onokazu)
+- fixed some cookie related problems in the forums module (mvandam)
+
+
+4/18/2003: Version 2.0.1
+===============================
+- fixed bug where notification feature could not be turned on
+- fixed character encoding problem for some languages when using the mailer class (onokazu)
+- fixed the theme selection block to work again
+- fixed typo in kernel/module.php
+- fixed incorrect table name in xoops_version.php of the new headline module
+- changed max limit size of some columns in the configoption table
+- fixed image manager bug when using db store method
+- xoops.org can now be disabled by adding nonews=1
+
+
+4/16/2003: Version 2.0.0
+===============================
+- xoopsheadlines module replaced with xoopsheadline module to fix character encoding problems
+- numerous bug fixes
+
+
+3/19/2003: Version 2.0.0 RC3
+===============================
+- a major change in the handling of theme files, the detail of which you can read in this [url=http://www.xoops.org/modules/news/article.php?storyid=677]article[/url] (onokazu)
+- a new global notification feature that can easily be incorporated into modules (that use Smarty) by only modifying xoops_version.php and template files (mvandam)
+- SMTP support using phpMailer (bunny)
+- group permission tables merged into one table (onokazu)
+- code refactoring
+
+
+2/9/2003: Version 2.0.0 RC2
+===============================
+A bug fix release..
+- avatar upload bug
+- themeset image upload bug
+- register_globals fix
+- recommend us block error
+- error message displayed upon submit of news article
+- page navigation bug in some modules
+- blank page bug on some servers
+- SQL displayed in blocks admin
+
+
+1/31/2003: Version 2.0.0 RC1
+===============================
+The first public release of 2.0 series.
+For new features that have been added from 1.3.x, please refer to
+the articles listed below:
+http://www.xoops.org/modules/news/article.php?storyid=486
+http://www.xoops.org/modules/news/article.php?storyid=549
+http://www.xoops.org/modules/xoopsdocs/index.php?cat_id=6
\ No newline at end of file
Added: XoopsCore/branches/2.2.x/2.2-main/docs/images/Thumbs.db
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/docs/images/Thumbs.db
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: XoopsCore/branches/2.2.x/2.2-main/docs/images/install001.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/docs/images/install001.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/docs/images/install002.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/docs/images/install002.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/docs/images/install003.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/docs/images/install003.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/docs/images/install004.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/docs/images/install004.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/docs/images/install005.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/docs/images/install005.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/docs/images/install006.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/docs/images/install006.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/docs/images/install007.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/docs/images/install007.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/docs/images/install008.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/docs/images/install008.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/docs/images/install009.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/docs/images/install009.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/docs/images/install010.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/docs/images/install010.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/docs/images/install011.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/docs/images/install011.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/docs/images/install024.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/docs/images/install024.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/extras/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/extras/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/extras/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/extras/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/extras/login.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/extras/login.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/extras/login.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,105 @@
+<?php
+// This script displays a login screen in a popupbox when SSL is enabled in the preferences. You should use this script only when your server supports SSL. Place this file under your SSL directory
+
+// path to your xoops main directory
+$path = '/path/to/xoops/directory';
+
+include $path.'/mainfile.php';
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/user.php';
+$op = (isset($_POST['op']) && $_POST['op'] == 'dologin') ? 'dologin' : 'login';
+
+$username = isset($_POST['username']) ? trim($_POST['username']) : '';
+$password = isset($_POST['userpass']) ? trim($_POST['userpass']) : '';
+if ($username == '' || $password == '') {
+ $op ='login';
+}
+
+echo '
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" />
+ <meta http-equiv="content-language" content="'._LANGCODE.'" />
+ <title>'.$xoopsConfig['sitename'].'</title>
+ <link rel="stylesheet" type="text/css" media="all" href="'.XOOPS_URL.'/xoops.css" />
+';
+$style = getcss($xoopsConfig['theme_set']);
+if ($style == '') {
+ $style = xoops_getcss($xoopsConfig['theme_set']);
+}
+if ($style != '') {
+ echo '<link rel="stylesheet" type="text/css" media="all" href="'.$style.'" />';
+}
+echo '
+ </head>
+ <body>
+';
+
+if ($op == 'dologin') {
+ $member_handler =& xoops_gethandler('member');
+ $myts =& MyTextsanitizer::getInstance();
+ $user =& $member_handler->loginUser(addslashes($myts->stripSlashesGPC($username)), addslashes($myts->stripSlashesGPC($password)));
+ if (is_object($user)) {
+ if (0 == $user->getVar('level')) {
+ redirect_header(XOOPS_URL.'/index.php', 5, _US_NOACTTPADM);
+ exit();
+ }
+ if ($xoopsConfig['closesite'] == 1) {
+ $allowed = false;
+ foreach ($user->getGroups() as $group) {
+ if (in_array($group, $xoopsConfig['closesite_okgrp']) || XOOPS_GROUP_ADMIN == $group) {
+ $allowed = true;
+ break;
+ }
+ }
+ if (!$allowed) {
+ redirect_header(XOOPS_URL.'/index.php', 1, _NOPERM);
+ exit();
+ }
+ }
+ if (!$member_handler->updateUserByField($user, 'last_login', time())) {
+ }
+ $_SESSION = array();
+ $_SESSION['xoopsUserId'] = $user->getVar('uid');
+ $_SESSION['xoopsUserGroups'] = $user->getGroups();
+ if (!empty($xoopsConfig['use_ssl'])) {
+ xoops_confirm(array($xoopsConfig['sslpost_name'] => session_id()), XOOPS_URL.'/misc.php?action=showpopups&type=ssllogin', _US_PRESSLOGIN, _LOGIN);
+ } else {
+ echo sprintf(_US_LOGGINGU, $user->getVar('uname'));
+ echo '<div style="text-align:center;"><input value="'._CLOSE.'" type="button" onclick="document.window.opener.location.reload();document.window.close();" /></div>';
+ }
+ } else {
+ xoops_error(_US_INCORRECTLOGIN.'<br /><a href="login.php">'._BACK.'</a>');
+ }
+}
+
+if ($op == 'login') {
+ echo '
+ <div style="text-align: center; padding: 5; margin: 0">
+ <form action="login.php" method="post">
+ <table class="outer" width="95%">
+ <tr>
+ <td class="head">'._USERNAME.'</td>
+ <td class="even"><input type="text" name="username" value="" /></td>
+ </tr>
+ <tr>
+ <td class="head">'._PASSWORD.'</td>
+ <td class="even"><input type="password" name="userpass" value="" /></td>
+ </tr>
+ <tr>
+ <td class="head"> </td>
+ <td class="even"><input type="hidden" name="op" value="dologin" /><input type="submit" name="submit" value="'._LOGIN.'" /></td>
+ </tr>
+ </table>
+ </form>
+ </div>
+ ';
+}
+
+echo '
+ </body>
+</html>
+';
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/extras/login.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/doc/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/doc/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/doc/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/doc/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/doc/readme.htm
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/doc/readme.htm 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/doc/readme.htm 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,222 @@
+<html>
+<head>
+<title>Info</title>
+<script language="JavaScript">
+if (document.layers)
+alert("This script works with Internet Explorer 4x only.\n\nSorry, Netscape-folks!")
+var now
+
+var second
+
+var timer
+var i_loop=0
+
+function initiate() {
+ firstObj.Scale(10,10,0)
+ secondObj.Scale(.01,.01,0)
+ enlarge()
+}
+
+function enlarge() {
+ if (i_loop<=100) {
+ firstObj.Rotate(0,0,-12)
+ firstObj.Scale(0.9,0.9,0)
+ secondObj.Rotate(0,0,12)
+ secondObj.Scale(1.11,1.11,0)
+
+ timer=setTimeout("enlarge()",20)
+ i_loop++
+ }
+ else {
+ clearTimeout(timer)
+ i_loop=0
+ reduce()
+ }
+}
+
+function reduce() {
+ if (i_loop<=100) {
+ firstObj.Rotate(0,0,12)
+ firstObj.Scale(1.11,1.11,0)
+ secondObj.Rotate(0,0,-12)
+ secondObj.Scale(0.9,0.9,0)
+ timer=setTimeout("reduce()",20)
+ i_loop++
+ }
+ else {
+ clearTimeout(timer)
+ i_loop=0
+ enlarge()
+ }
+}
+
+// - End of JavaScript - -->
+</script>
+<style type="text/css">
+<!--
+a { text-decoration: none}
+-->
+</style>
+</head>
+<body bgcolor=000000 onLoad="if(document.all){initiate()}" link="#FFCC00" vlink="#FFCC00" alink="#FFFFCC">
+<DIV style="position:absolute;top:55px;left:563px; width: 56px; height: 200px">
+ <OBJECT ID="firstObj" STYLE="width:200px;height:200px" CLASSID="CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6">
+<PARAM NAME="Line0001" VALUE="SetLineColor(255,0,0)">
+<PARAM NAME="Line0002" VALUE="SetFillColor(255,0,0)">
+<PARAM NAME="Line0003" VALUE="SetLineStyle(0)">
+<PARAM NAME="Line0004" VALUE="Polygon(461,11,11,12,8,14,6,18,4,21,2,25,1,28,0,30,-1,31,-3,30,-4,30,-6,29,-8,28,-9,27,-11,26,-12,24,-13,21,-14,19,-14,18,-13,16,-13
+,14,-12,13,-11,11,-11,9,-12,7,-14,2,-19,-1,-21,-3,-22,-5,-21,-5,-19,-6,-17,-6,-13,-6,-9,-6,-6,-6,-4,-7,-3,-8,-2,-9,0,-10,2,-11,4
+,-11,7,-10,13,-10,18,-10,22,-10,26,-10,30,-9,33,-7,37,-4,40,-2,41,0,42,1,42,3,42,4,40,6,39,8,36,10,33,12,32,16,32,21,32
+,26,33,30,34,35,35,38,35,40,34,41,31,42,29,43,27,44,26,44,25,45,24,47,23,49,21,54,15,57,6,59,-4,59,-13,57,-22,53,-29,49,-33
+,44,-33,42,-33,39,-34,35,-35,31,-37,27,-39,23,-40,20,-42,18,-42,14,-44,12,-45,10,-47,8,-48,6,-50,4,-51,3,-53,2,-54,-1,-55,-4,-55,-7,-53
+,-11,-50,-14,-46,-17,-41,-19,-37,-21,-32,-22,-28,-25,-23,-28,-19,-32,-15,-36,-11,-39,-8,-41,-4,-42,-1,-42,6,-41,9,-39,15,-36,29,-34,40,-34,51,-32,59
+,-31,66,-29,71,-25,73,-19,73,-10,70,-5,68,1,67,9,67,18,67,27,66,37,65,47,64,57,62,65,58,73,53,79,46,84,37,87,25,87,11,85,-6
+,79,-26,78,-31,79,-34,80,-36,82,-37,85,-38,87,-39,88,-41,88,-44,86,-47,83,-50,80,-53,75,-56,71,-60,68,-64,65,-70,64,-77,63,-80,61,-81,58,-82
+,55,-82,51,-81,48,-81,44,-81,41,-81,37,-83,33,-84,29,-86,26,-87,23,-89,20,-90,17,-91,15,-92,12,-93,10,-93,7,-94,4,-94,1,-94,-2,-94,-5,-94
+,-9,-93,-12,-92,-15,-90,-18,-88,-21,-84,-24,-81,-27,-77,-31,-73,-34,-69,-37,-65,-40,-61,-44,-57,-48,-54,-51,-52,-55,-50,-60,-49,-64,-49,-67,-48,-69,-45,-69,-42
+,-69,-37,-68,-31,-68,-26,-68,-20,-70,-15,-75,-3,-78,7,-79,17,-79,25,-78,31,-77,36,-78,40,-80,42,-81,43,-82,43,-82,44,-82,46,-81,46,-79,47,-76,47
+,-75,48,-74,51,-74,54,-75,56,-77,58,-79,60,-82,60,-84,58,-86,56,-91,47,-95,41,-97,36,-98,30,-98,24,-94,17,-88,8,-78,-4,-75,-10,-75,-18,-76,-26
+,-77,-34,-79,-42,-78,-48,-75,-53,-69,-54,-65,-55,-61,-56,-57,-58,-54,-61,-51,-64,-48,-67,-46,-71,-43,-75,-41,-79,-38,-83,-36,-87,-34,-90,-31,-93,-28,-96,-26,-98
+,-23,-99,-19,-99,-14,-100,-9,-100,-5,-100,0,-100,5,-100,10,-100,16,-100,21,-99,26,-98,31,-97,37,-96,42,-95,47,-94,51,-92,56,-91,59,-90,62,-89,66,-88
+,69,-86,72,-85,74,-83,76,-80,77,-77,77,-70,79,-65,81,-61,83,-58,86,-55,88,-53,90,-50,91,-47,91,-41,89,-34,89,-27,90,-18,95,-2,97,12,98,25
+,97,36,94,45,90,53,85,60,79,65,72,70,64,73,56,75,47,77,38,77,29,77,20,76,11,75,6,74,1,73,-4,74,-8,74,-12,75,-16,75,-18,76
+,-21,77,-27,79,-32,78,-38,76,-42,72,-44,66,-46,59,-45,50,-43,39,-42,36,-43,33,-44,29,-45,25,-47,20,-48,15,-49,10,-49,4,-48,1,-46,-5,-43,-12
+,-40,-19,-36,-27,-33,-34,-30,-41,-29,-47,-28,-49,-27,-51,-25,-53,-23,-54,-21,-55,-19,-57,-16,-58,-14,-58,-11,-59,-8,-59,-6,-59,-3,-59,-1,-59,1,-59,3,-58
+,4,-57,5,-56,7,-54,8,-53,10,-51,12,-50,14,-49,17,-47,20,-46,23,-45,26,-45,30,-45,34,-46,38,-46,42,-46,45,-47,47,-47,52,-46,57,-40,62,-30
+,65,-18,67,-5,67,8,64,19,59,26,57,28,55,29,53,31,50,32,48,33,46,35,44,37,43,40,41,42,38,42,35,43,31,43,26,43,22,43,19,44
+,17,46,14,48,11,50,9,50,6,50,2,49,-1,48,-3,46,-5,44,-9,41,-12,37,-14,33,-15,28,-17,23,-18,18,-19,12,-20,6,-20,3,-19,0,-18,-2
+,-16,-5,-15,-7,-14,-9,-13,-12,-14,-15,-13,-19,-12,-23,-10,-27,-7,-30,-4,-32,0,-32,4,-30,10,-26,12,-24,15,-22,18,-21,21,-21,25,-20,28,-20,31,-19
+,33,-19,37,-16,37,-10,36,-4,36,0,35,2,34,3,32,4,30,5,28,6,25,7,23,8,22,11,20,13,18,15,17,16,15,16,13,15,12,14,11,12
+,11,11)">
+<PARAM NAME="Line0005" VALUE="Polygon(17,-69,75,-71,75,-73,75,-74,74,-76,72,-77,69,-76,66,-75,64,-72,64,-69,64,-67,64,-66,63,-65,64,-64,67,-65,71,-66,74,-69,75)">
+<PARAM NAME="Line0006" VALUE="Polygon(17,-64,88,-64,88,-65,87,-64,86,-64,85,-65,84,-65,82,-65,80,-64,80,-62,80,-60,81,-58,82,-57,84,-58,86,-60,87,-62,88,-64,88)">
+<PARAM NAME="Line0007" VALUE="Polygon(15,-50,100,-51,99,-52,99,-52,98,-52,97,-52,96,-52,96,-51,95,-50,95,-49,95,-49,96,-48,97,-48,97,-48,99,-50,100)">
+</OBJECT>
+</DIV>
+
+<DIV style="position:absolute;top:55px;left:563px; width: 179px; height: 200px">
+ <OBJECT ID="secondObj" STYLE="width:200px;height:200px" CLASSID="CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6" width="356" height="212">
+ <PARAM NAME="Line0001" VALUE="SetLineColor(255,255,0)">
+ <PARAM NAME="Line0002" VALUE="SetFillColor(255,255,0)">
+ <PARAM NAME="Line0003" VALUE="SetLineStyle(0)">
+ <PARAM NAME="Line0004" VALUE="Polygon(461,11,11,12,8,14,6,18,4,21,2,25,1,28,0,30,-1,31,-3,30,-4,30,-6,29,-8,28,-9,27,-11,26,-12,24,-13,21,-14,19,-14,18,-13,16,-13
+,14,-12,13,-11,11,-11,9,-12,7,-14,2,-19,-1,-21,-3,-22,-5,-21,-5,-19,-6,-17,-6,-13,-6,-9,-6,-6,-6,-4,-7,-3,-8,-2,-9,0,-10,2,-11,4
+,-11,7,-10,13,-10,18,-10,22,-10,26,-10,30,-9,33,-7,37,-4,40,-2,41,0,42,1,42,3,42,4,40,6,39,8,36,10,33,12,32,16,32,21,32
+,26,33,30,34,35,35,38,35,40,34,41,31,42,29,43,27,44,26,44,25,45,24,47,23,49,21,54,15,57,6,59,-4,59,-13,57,-22,53,-29,49,-33
+,44,-33,42,-33,39,-34,35,-35,31,-37,27,-39,23,-40,20,-42,18,-42,14,-44,12,-45,10,-47,8,-48,6,-50,4,-51,3,-53,2,-54,-1,-55,-4,-55,-7,-53
+,-11,-50,-14,-46,-17,-41,-19,-37,-21,-32,-22,-28,-25,-23,-28,-19,-32,-15,-36,-11,-39,-8,-41,-4,-42,-1,-42,6,-41,9,-39,15,-36,29,-34,40,-34,51,-32,59
+,-31,66,-29,71,-25,73,-19,73,-10,70,-5,68,1,67,9,67,18,67,27,66,37,65,47,64,57,62,65,58,73,53,79,46,84,37,87,25,87,11,85,-6
+,79,-26,78,-31,79,-34,80,-36,82,-37,85,-38,87,-39,88,-41,88,-44,86,-47,83,-50,80,-53,75,-56,71,-60,68,-64,65,-70,64,-77,63,-80,61,-81,58,-82
+,55,-82,51,-81,48,-81,44,-81,41,-81,37,-83,33,-84,29,-86,26,-87,23,-89,20,-90,17,-91,15,-92,12,-93,10,-93,7,-94,4,-94,1,-94,-2,-94,-5,-94
+,-9,-93,-12,-92,-15,-90,-18,-88,-21,-84,-24,-81,-27,-77,-31,-73,-34,-69,-37,-65,-40,-61,-44,-57,-48,-54,-51,-52,-55,-50,-60,-49,-64,-49,-67,-48,-69,-45,-69,-42
+,-69,-37,-68,-31,-68,-26,-68,-20,-70,-15,-75,-3,-78,7,-79,17,-79,25,-78,31,-77,36,-78,40,-80,42,-81,43,-82,43,-82,44,-82,46,-81,46,-79,47,-76,47
+,-75,48,-74,51,-74,54,-75,56,-77,58,-79,60,-82,60,-84,58,-86,56,-91,47,-95,41,-97,36,-98,30,-98,24,-94,17,-88,8,-78,-4,-75,-10,-75,-18,-76,-26
+,-77,-34,-79,-42,-78,-48,-75,-53,-69,-54,-65,-55,-61,-56,-57,-58,-54,-61,-51,-64,-48,-67,-46,-71,-43,-75,-41,-79,-38,-83,-36,-87,-34,-90,-31,-93,-28,-96,-26,-98
+,-23,-99,-19,-99,-14,-100,-9,-100,-5,-100,0,-100,5,-100,10,-100,16,-100,21,-99,26,-98,31,-97,37,-96,42,-95,47,-94,51,-92,56,-91,59,-90,62,-89,66,-88
+,69,-86,72,-85,74,-83,76,-80,77,-77,77,-70,79,-65,81,-61,83,-58,86,-55,88,-53,90,-50,91,-47,91,-41,89,-34,89,-27,90,-18,95,-2,97,12,98,25
+,97,36,94,45,90,53,85,60,79,65,72,70,64,73,56,75,47,77,38,77,29,77,20,76,11,75,6,74,1,73,-4,74,-8,74,-12,75,-16,75,-18,76
+,-21,77,-27,79,-32,78,-38,76,-42,72,-44,66,-46,59,-45,50,-43,39,-42,36,-43,33,-44,29,-45,25,-47,20,-48,15,-49,10,-49,4,-48,1,-46,-5,-43,-12
+,-40,-19,-36,-27,-33,-34,-30,-41,-29,-47,-28,-49,-27,-51,-25,-53,-23,-54,-21,-55,-19,-57,-16,-58,-14,-58,-11,-59,-8,-59,-6,-59,-3,-59,-1,-59,1,-59,3,-58
+,4,-57,5,-56,7,-54,8,-53,10,-51,12,-50,14,-49,17,-47,20,-46,23,-45,26,-45,30,-45,34,-46,38,-46,42,-46,45,-47,47,-47,52,-46,57,-40,62,-30
+,65,-18,67,-5,67,8,64,19,59,26,57,28,55,29,53,31,50,32,48,33,46,35,44,37,43,40,41,42,38,42,35,43,31,43,26,43,22,43,19,44
+,17,46,14,48,11,50,9,50,6,50,2,49,-1,48,-3,46,-5,44,-9,41,-12,37,-14,33,-15,28,-17,23,-18,18,-19,12,-20,6,-20,3,-19,0,-18,-2
+,-16,-5,-15,-7,-14,-9,-13,-12,-14,-15,-13,-19,-12,-23,-10,-27,-7,-30,-4,-32,0,-32,4,-30,10,-26,12,-24,15,-22,18,-21,21,-21,25,-20,28,-20,31,-19
+,33,-19,37,-16,37,-10,36,-4,36,0,35,2,34,3,32,4,30,5,28,6,25,7,23,8,22,11,20,13,18,15,17,16,15,16,13,15,12,14,11,12
+,11,11)">
+ <PARAM NAME="Line0005" VALUE="Polygon(17,-69,75,-71,75,-73,75,-74,74,-76,72,-77,69,-76,66,-75,64,-72,64,-69,64,-67,64,-66,63,-65,64,-64,67,-65,71,-66,74,-69,75)">
+ <PARAM NAME="Line0006" VALUE="Polygon(17,-64,88,-64,88,-65,87,-64,86,-64,85,-65,84,-65,82,-65,80,-64,80,-62,80,-60,81,-58,82,-57,84,-58,86,-60,87,-62,88,-64,88)">
+ <PARAM NAME="Line0007" VALUE="Polygon(15,-50,100,-51,99,-52,99,-52,98,-52,97,-52,96,-52,96,-51,95,-50,95,-49,95,-49,96,-48,97,-48,97,-48,99,-50,100)">
+ </OBJECT> </DIV>
+
+<DIV style="position:absolute;top:55px;left:553px;font-family:Verdana;font-size:8pt;color:444444;text-align:center;width:220px;letter-spacing:0.4em;line-height:170%;">
+ <p><span style="color:771111"><b><font color="#FFFFFF">XooPS</font></b></span><br />
+ <font color="#FFFFFF">eXtended object<br />
+ oriented<br />
+ Portal System</font></p>
+ <p><font color="#FFFFFF">...que más queres...</font></p>
+ </DIV>
+
+<table width="755" border="0" cellspacing="1" cellpadding="3" height="201" bgcolor="#CCCCCC">
+ <tr bgcolor="#CCCCCC">
+ <td colspan="2">
+ <div align="center"><font color="#333333" face="Tahoma" size="2"><b>X2 Theme for XooPS 2.0.x / Tema X2 para XooPS 2.0.x</b></font></div>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#333333" height="78" width="538"><font color="#CCCCCC" face="Tahoma" size="2">
+ <b>| Creators / Creadores </b>: w4z004 - Unfor<br />
+
+ <b>| E-mail / E-mail</b> : <a href="mailto:w4z004 at hotmail.com">w4z004 at hotmail.com</a><br />
+
+ <b>| This is a original work bassed in the ideas of </b>w4z004<br />
+ <b>| and the excelent and professional work of </b> Unfor<br />
+
+ <b>| Date / Fecha </b>: Feb. 2003<br />
+
+ <b>| Thanks to / Gracias a</b> : Chapi <b>for the graphic work colaboration </b><br />
+ <b>| </b> Aitor <b>for the enhancements into the theme </b><br />
+ <b>| </b> ralf57 <b> for the hidde/unhidde idea </b><br />
+ <b>| </b><br />
+
+ <b>| INSTALL: upload the x2t.tar.gz file with the theme manager</b><br />
+ <b>| </b><br />
+
+ <b>| NEWS TWO COLUMNS: later of installed the theme with the theme manager into</b><br />
+ <b>| the news need upload or copy and paste the files </b> news_index.html <b>and </b><br />
+ <b>| </b> news_item.html <b> that are into the EXTRAS dir to the respective places and obtain</b><br />
+ <b>| a news with 2 columns.</b><br />
+ <b>| </b><br />
+
+ <b>| LAYOUT: into the EXTRAS dir too have a</b> theme.html<b> file that if you replace into</b><br />
+ <b>| the theme skin with copy and paste obtain that the center-center blocks</b><br />
+ <b>| appear in the top (now are changed to the bottom). </b><br />
+ <b>| </b><br />
+
+ <b>| CHANGELOG:</b><br />
+ <b>| 27/02 - Removed the login in the headerbar.</b><br />
+ <b>| Fixed the userinfo template</b><br />
+ <b>| </b><br />
+ <b>| 01/03 - Removed the skin changed to the new structure.</b><br />
+ <b>| </b><br />
+ <b>| 30/03 - Finished the notification templates, XHTML cleanup, </b><br />
+ <b>| and added scrolling to the top posters and new users blocks.</b><br />
+ <b>| </b><br />
+ <b>| 20/09 - Upgraded to xoops 2.0.4. </b><br />
+ <b>| </b><br />
+ <b>| 05/07/04 - Upgraded to xoops 2.0.6.</b><br />
+ <b>| - Created the SmartFAQ module templates.</b><br />
+ <b>| - Enhanced the CSS.</b><br />
+ <b>| - Added the hidde/display effect for the notification system.</b><br />
+ <b>| - Modified the main menu / user menu, and added graphics to this.</b><br />
+ <b>| </b><br />
+ <b>| 05/08/04 - Created the Liase module templates.</b><br />
+ <b>| - Created the RSSfit module templates.</b><br />
+ <b>| </b><br />
+ <b>| 05/16/04 - Fixed the styleNN.css (thnx chapi).</b><br />
+ <b>| - Cleaned to be 100% html transitional 1.0.</b><br />
+
+
+ <b>| </b><br />
+</font></td>
+
+ <td bgcolor="#333333" height="78" rowspan="4" width="202"> </td>
+ </tr>
+ <tr>
+ <td bgcolor="#333333" width="538"><font color="#CCCCCC" face="Tahoma" size="2"><b>|</b>
+ Dedicated to all Xoops users.<br />
+ <b>|</b> Dedicado a todos los usuarios de Xoops.</font></td>
+ </tr>
+ <tr>
+ <td bgcolor="#333333" width="538"><font color="#CCCCCC" face="Tahoma" size="2"><b>|
+ ENGLISH SUPPORT :</b><br />
+ <b>|</b>> <a href="http://www.xoops.org">http://www.xoops.org</a>
+ </font></td>
+ </tr>
+ <tr>
+ <td bgcolor="#333333" width="538"><font color="#CCCCCC" face="Tahoma" size="2"><b>|
+ SOPORTE EN CASTELLANO :</b><br />
+ <b>|</b>> <a href="http://www.esxoops.com">http://www.esxoops.com</a><br />
+ </tr>
+</table>
+</body>
+</html>
Added: XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/doc/readme.txt
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/doc/readme.txt 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/doc/readme.txt 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,57 @@
+X2 Theme for XooPS 2.0.x / Tema X2 para XooPS 2.0.x
+
+| Creators / Creadores : Unfor-w4z004
+
+| E-mail / E-mail : w4z004 at hotmail.com
+
+| This is a original work bassed in the ideas of w4z004
+| and the excelent and professional work of Unfor
+
+| Date / Fecha : Feb. 2003
+
+| Thanks to / Gracias a : Chapi for the graphic work colaboration
+| Aitor for the enhancements into the theme
+| ralf57 for the hidde/unhidde idea
+
+| INSTALL: upload the x2t.tar.gz file with the theme manager
+
+| NEWS TWO COLUMNS: later of installed the theme with the theme manager into
+| the news need upload or copy and paste the files news_index.html and
+| news_item.html that are into the EXTRAS dir to the respective places and obtain
+| a news with 2 columns.
+
+| LAYOUT: into the EXTRAS dir too have a theme.html file that if you replace into
+| the theme skin with copy and paste obtain that the center-center blocks
+| appear in the top (now are changed to the bottom).
+
+| CHANGELOG:
+| 27/02 - Removed the login in the headerbar.
+| Fixed the userinfo template
+
+| 01/03 - Removed the skin changed to the new structure
+
+| 30/03 - Finished the notification templates, XHTML cleanup,
+| and added scrolling to the top posters and new users blocks.
+
+| 20/09 - Upgraded to xoops 2.0.4.
+
+| 05/07/04 - Upgraded to xoops 2.0.6.
+| - Created the SmartFAQ module templates.
+| - Enhanced the CSS.
+| - Added the hidde/display effect for the notification system.
+| - Modified the main menu / user menu, and added graphics to this.
+
+| 05/08/04 - Created the Liase module templates.
+| - Created the RSSfit module templates.
+
+| 05/16/04 - Fixed the styleNN.css (thnx chapi).
+| - Cleaned to be 100% html transitional 1.0.
+
+| Dedicated to all Xoops users.
+| Dedicado a todos los usuarios de Xoops.
+
+| ENGLISH SUPPORT :
+|> http://www.xoops.org
+
+| SOPORTE EN CASTELLANO :
+|> http://www.esxoops.com
Added: XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/news_index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/news_index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/news_index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,50 @@
+<{if $displaynav == true}>
+ <div style="text-align: center;">
+ <form name="form1" action="index.php" method="get">
+ <{$topic_select}> <select name="storynum"><{$storynum_options}></select> <input type="submit" value="<{$lang_go}>" class="formButton" /></form>
+ <hr />
+ </div>
+<{/if}>
+
+
+<{section name=i loop=$stories}>
+<{php}>
+global $totalarticulos;
+global $impar;
+$totalarticulos = $totalarticulos +1;
+<{/php}>
+<{/section}>
+
+<{php}>
+if (($totalarticulos % 2)==1){
+ $impar=true;
+ echo '<table width=100%><tr><td colspan=2 width="100%">';
+}else{
+ echo '<table width=100%><tr><td width="50%">';
+}
+<{/php}>
+<div style="text-align: right; margin: 10px;"><{$pagenav}></div>
+<br />
+<!-- start news item loop -->
+<{section name=i loop=$stories}>
+ <{include file="db:news_item.html" story=$stories[i]}>
+<{php}>
+global $contador;
+$contador = $contador +1;
+if ($contador && $impar && (!$arrancado)){
+ $arrancado = true;
+ $contador = 0;
+ echo "</td></tr><tr><td>";
+}else{
+ if (($contador % 2)==1){
+ echo "</td><td width='50%'>";
+ }else{
+ echo "</td></tr><tr><td width='50%'>";
+ }
+}
+<{/php}>
+<{/section}>
+</td></tr></table>
+<!-- end news item loop -->
+<div style="text-align: right; margin: 10px;"><{$pagenav}></div>
+<br />
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/news_index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/news_item.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/news_item.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/news_item.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,44 @@
+<table width="100%" border="0" cellpadding="0" cellspacing="5" align="center">
+ <tr>
+ <td width="100%" valign="top" class="newsTitle" colspan="2"><img src="<{$xoops_imageurl}>/folder.gif" align="middle" alt="" /> <b><{$story.title}></b></td>
+ </tr>
+ <tr>
+ <td width="100%" colspan="2" class="newsPoster"> <{$lang_postedby}> <{$story.poster}> <span class="textPoster"><{$lang_on}> <{$story.posttime}> (<{$story.hits}> <{$lang_reads}>)</span></td>
+ </tr>
+ <tr>
+ <{if $story.align == "left" }>
+ <td width="17%" valign="top" class="newsMisc">
+ <table width="100%" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td width="100%" valign="top" align="center">
+ <{$story.imglink}></td>
+ <tr>
+ <td width="100%" valign="top" align="center" style="padding: 3px;">
+ <a href="print.php?storyid=<{$story.id}>" target="_BLANK"><{$lang_printerpage}></a>
+ <a target="_top" href="<{$story.mail_link}>"><{$lang_sendstory}></a>
+ </td></tr></table>
+ </td>
+ <td width="83%" class="newsContent" valign="top">
+ <{$story.text}>
+ </td>
+ <{else}>
+ <td width="83%" class="newsContent" valign="top">
+ <{$story.text}>
+ </td>
+ <td width="17%" valign="top" class="newsMisc">
+ <table width="100%" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <tr>
+ <td width="100%" valign="top" align="center" style="padding: 3px;" class="newsPoster">
+ <a href="print.php?storyid=<{$story.id}>" target="_BLANK"><img src="images/print.gif" alt="<{$lang_printerpage}>" /></a>
+ <a target="_top" href="<{$story.mail_link}>"><img src="images/friend.gif" alt="<{$lang_sendstory}>" /></a>
+ </td></tr></table>
+
+ </td>
+ <{/if}>
+ </tr>
+ <tr>
+ <td width="100%" colspan="2" class="newsPoster" align="right"><span class="textPoster"><{$story.adminlink}> <{$story.morelink}> </span></td>
+ </tr>
+</table>
+<br />
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/news_item.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/theme.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/theme.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/theme.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,146 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
+<meta http-equiv="content-language" content="<{$xoops_langcode}>" />
+<meta name="robots" content="<{$xoops_meta_robots}>" />
+<meta name="keywords" content="<{$xoops_meta_keywords}>" />
+<meta name="description" content="<{$xoops_meta_description}>" />
+<meta name="rating" content="<{$xoops_meta_rating}>" />
+<meta name="author" content="<{$xoops_meta_author}>" />
+<meta name="copyright" content="<{$xoops_meta_copyright}>" />
+<meta name="generator" content="XOOPS" />
+<title><{$xoops_sitename}> - <{$xoops_pagetitle}></title>
+<link href="<{$xoops_url}>/favicon.ico" rel="SHORTCUT ICON" />
+<link rel="stylesheet" type="text/css" media="all" href="<{$xoops_url}>/xoops.css" />
+<link rel="stylesheet" type="text/css" media="all" href="<{$xoops_themecss}>" />
+<script type="text/javascript">
+<!--
+<{$xoops_js}>
+//-->
+</script>
+</head>
+<body>
+<!-- Start Header -->
+<table cellspacing="0" cellpadding="0" width="100%" border="0" style="background-color : #2F5376; color: #ffffff">
+ <tr>
+ <td height="70" width="150" valign="middle" align="left" rowspan="2">
+ <a href="<{$xoops_url}>"><img src="<{$xoops_imageurl}>logo.gif" alt="" /></a></td>
+<td valign="middle" align="center" width="100%">
+<{$xoops_banner}>
+</td></tr><tr>
+ <td width="100%" valign="bottom" align="right" class="navbar" >
+ <table border="0" cellpadding="1" cellspacing="0">
+ <tr>
+ <td class="tabOff" onmouseover="this.className='tabOn';" onmouseout="this.className='tabOff';"><a href="<{$xoops_url}>">Home</a></td>
+ <td class="tabOff" onmouseover="this.className='tabOn';" onmouseout="this.className='tabOff';"><a href="http://www.xoops.org/modules/newbb/">XOOPS Support</a></td>
+ <td class="tabOff" onmouseover="this.className='tabOn';" onmouseout="this.className='tabOff';"><a href="http://www.xoops.org/modules/xoopsfaq/">XOOPS FAQ</a></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<!-- End Header -->
+<!-- Start Headerbar -->
+<table border='0' width='100%' cellspacing='0' cellpadding='0'>
+ <tr>
+ <td width='10'><img src='<{$xoops_imageurl}>hbar_left.gif' width='10' height='23' alt='' /></td>
+ <td style='background-image: url(<{$xoops_imageurl}>hbar_middle.gif);' align='left'> </td>
+<td width='15%' style='background-image: url(<{$xoops_imageurl}>hbar_middle.gif);' align='right'>
+<form action="<{$xoops_url}>/search.php" method="post">
+ <input type="text" name="query" class="navinput" /><input type="hidden" name="action" value="results" /> <input class="navinputImage" type="image" src="<{$xoops_imageurl}>searchButton.gif" name="searchSubmit" />
+ </form></td>
+ <td width='10'><img src='<{$xoops_imageurl}>hbar_right.gif' width='10' height='23' alt='' /></td>
+ </tr>
+</table>
+<!-- End Headerbar -->
+
+ <table width="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td class="leftcolumn" valign="top" style='background-image: url(<{$xoops_imageurl}>bg_left.gif);'><div class="leftcolumn">
+ <!-- Start left blocks loop -->
+ <{foreach item=block from=$xoops_lblocks}>
+ <{include file="x2t/theme_blockleft.html"}>
+ <{/foreach}>
+ <!-- End left blocks loop -->
+ </div></td>
+ <td width="100%" valign="top" class="contentbox">
+
+ <!-- Display center blocks if any -->
+ <{if $xoops_showcblock == 1}>
+<br />
+<table width="95%" border="0" cellpadding="0" cellspacing="0" align="center">
+<tr>
+<td class="bcenterleft"> </td>
+<td class="bcenterbg"> </td>
+<td class="bcenterright"> </td>
+</tr>
+</table>
+
+ <table width="95%" cellpadding="3" cellspacing="0" align="center" style="border-left: #cccccc 1px solid;border-right: #cccccc 1px solid;border-bottom: #cccccc 1px solid;">
+ <tr>
+ <td class="centercolumn" valign="top" colspan="2">
+ <div class="centercolumn">
+ <!-- Start center-center blocks loop -->
+ <{foreach item=block from=$xoops_ccblocks}>
+ <{include file="x2t/theme_blockcenter_c.html"}>
+ <br />
+ <{/foreach}>
+ <!-- End center-center blocks loop -->
+ </div>
+ </td></tr>
+ <tr>
+ <td class="centerLcolumn" valign="top">
+ <div class="centerLcolumn">
+ <!-- Start center-left blocks loop -->
+ <{foreach item=block from=$xoops_clblocks}>
+ <{include file="x2t/theme_blockcenter_l.html"}>
+ <br />
+ <{/foreach}>
+ <!-- End center-left blocks loop -->
+ </div>
+ </td>
+ <td class="centerRcolumn" valign="top">
+ <div class="centerRcolumn">
+ <!-- Start center-right blocks loop -->
+ <{foreach item=block from=$xoops_crblocks}>
+ <{include file="x2t/theme_blockcenter_r.html"}>
+ <br />
+ <{/foreach}>
+ <!-- End center-right blocks loop -->
+ </div>
+ </td>
+ </tr>
+ </table>
+ <{/if}>
+ <!-- End display center blocks -->
+
+
+ <br />
+ <div class="content"><{$xoops_contents}></div>
+ </td>
+ <{if $xoops_showrblock == 1}>
+ <td class="rightcolumn" valign="top" align="right" style='background-image: url(<{$xoops_imageurl}>bg_right.gif);'><div class="rightcolumn">
+ <!-- Start right blocks loop -->
+ <{foreach item=block from=$xoops_rblocks}>
+ <{include file="x2t/theme_blockright.html"}>
+ <{/foreach}>
+ <!-- End right blocks loop -->
+ </div>
+ </td>
+<{else}>
+<td width='10' style='background-image: url(<{$xoops_imageurl}>bg_right2.gif);'><img src='<{$xoops_imageurl}>dummy.gif' width='10' height='10' alt='' /></td>
+<{/if}>
+ </tr>
+ <tr>
+ <td colspan="3" width="100%">
+
+<table border='0' width='100%' cellspacing='0' cellpadding='0'>
+ <tr>
+ <td width='10'><img src='<{$xoops_imageurl}>hbar_left.gif' width='10' height='23' alt='' /></td>
+ <td style='background-image: url(<{$xoops_imageurl}>hbar_middle.gif);' align='center'> <span class="copyright"><{$footer}></span></td>
+ <td width='10'><img src='<{$xoops_imageurl}>hbar_right.gif' width='10' height='23' alt='' /></td></tr>
+</table>
+</td></tr></table>
+</body>
+</html>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/extras/theme.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/x2t.tar.gz
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/extras/theme_x2t/x2t.tar.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: XoopsCore/branches/2.2.x/2.2-main/html/admin.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/admin.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/admin.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,126 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+$xoopsOption['pagetype'] = "admin";
+require "mainfile.php";
+include XOOPS_ROOT_PATH."/include/cp_functions.php";
+/*********************************************************/
+/* Admin Authentication */
+/*********************************************************/
+
+if ( $xoopsUser ) {
+ if ( !$xoopsUser->isAdmin(-1) ) {
+ redirect_header("index.php",2,_AD_NORIGHT);
+ exit();
+ }
+} else {
+ redirect_header("index.php",2,_AD_NORIGHT);
+ exit();
+}
+$op = "list";
+
+if ( !empty($_GET['op']) ) {
+ $op = $_GET['op'];
+}
+
+if ( !empty($_POST['op']) ) {
+ $op = $_POST['op'];
+}
+
+switch ($op) {
+case "list":
+ xoops_cp_header();
+ // ###### Output warn messages for security ######
+ if (is_dir(XOOPS_ROOT_PATH."/install/" )) {
+ xoops_error(sprintf(_WARNINSTALL2,XOOPS_ROOT_PATH.'/install/'));
+ echo '<br />';
+ }
+ if ( is_writable(XOOPS_ROOT_PATH."/mainfile.php" ) ) {
+ xoops_error(sprintf(_WARNINWRITEABLE,XOOPS_ROOT_PATH.'/mainfile.php'));
+ echo '<br />';
+ }
+ if (!empty($_GET['xoopsorgnews'])) {
+ $rssurl = 'http://www.xoops.org/backend.php';
+ $rssfile = XOOPS_CACHE_PATH.'/adminnews.xml';
+ $rssdata = '';
+ if (!file_exists($rssfile) || filemtime($rssfile) < time() - 86400) {
+ require_once XOOPS_ROOT_PATH.'/class/snoopy.php';
+ $snoopy = new Snoopy;
+ if ($snoopy->fetch($rssurl)) {
+ $rssdata = $snoopy->results;
+ if (false !== $fp = fopen($rssfile, 'w')) {
+ fwrite($fp, $rssdata);
+ }
+ fclose($fp);
+ }
+ } else {
+ if (false !== $fp = fopen($rssfile, 'r')) {
+ while (!feof ($fp)) {
+ $rssdata .= fgets($fp, 4096);
+ }
+ fclose($fp);
+ }
+ }
+ if ($rssdata != '') {
+ include_once XOOPS_ROOT_PATH.'/class/xml/rss/xmlrss2parser.php';
+ $rss2parser = new XoopsXmlRss2Parser($rssdata);
+ if (false != $rss2parser->parse()) {
+ echo '<table class="outer" width="100%">';
+ $items =& $rss2parser->getItems();
+ $count = count($items);
+ $myts =& MyTextSanitizer::getInstance();
+ for ($i = 0; $i < $count; $i++) {
+ echo '<tr class="head"><td><a href="'.htmlspecialchars($items[$i]['link']).'" target="_blank">';
+ echo htmlspecialchars(XoopsLocal::convert_encoding($items[$i]['title'], _CHARSET, "UTF-8")).'</a> ('.formatTimestamp(htmlspecialchars($items[$i]['pubdate'])).')</td></tr>';
+ if ($items[$i]['description'] != "") {
+ echo '<tr><td class="odd">'.XoopsLocal::convert_encoding($items[$i]['description'], _CHARSET, "UTF-8");
+ if ($items[$i]['guid'] != "") {
+ echo ' <a href="'.htmlspecialchars($items[$i]['guid']).'" target="_blank">'._MORE.'</a>';
+ }
+ echo '</td></tr>';
+ } elseif ($items[$i]['guid'] != "") {
+ echo '<tr><td class="even" valign="top"></td><td colspan="2" class="odd"><a href="'.htmlspecialchars($items[$i]['guid']).'" target="_blank">'._MORE.'</a></td></tr>';
+ }
+ }
+ echo '</table>';
+ } else {
+ echo $rss2parser->getErrors();
+ }
+ }
+ }
+ else {
+ //load admin frontpage blocks
+ $block_handler =& xoops_gethandler('block');
+ //$block_arr =& $block_handler->getAdminBlocks($xoopsUser->getGroups());
+ $block_handler->assignBlocks();
+ }
+ xoops_cp_footer();
+ break;
+default:
+ break;
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/admin.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/backend.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/backend.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/backend.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,71 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include 'mainfile.php';
+include_once XOOPS_ROOT_PATH.'/class/template.php';
+include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php';
+if (function_exists('mb_http_output')) {
+ mb_http_output('pass');
+}
+header ('Content-Type:text/xml; charset=utf-8');
+$tpl = new XoopsTpl();
+$tpl->xoops_setCaching(2);
+$tpl->xoops_setCacheTime(3600);
+if (!$tpl->is_cached('db:system_rss.html')) {
+ $sarray = NewsStory::getAllPublished(10, 0);
+ if (is_array($sarray)) {
+ $tpl->assign('channel_title', xoops_utf8_encode(htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)));
+ $tpl->assign('channel_link', XOOPS_URL.'/');
+ $tpl->assign('channel_desc', xoops_utf8_encode(htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES)));
+ $tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss'));
+ $tpl->assign('channel_webmaster', $xoopsConfig['adminmail']);
+ $tpl->assign('channel_editor', $xoopsConfig['adminmail']);
+ $tpl->assign('channel_category', 'News');
+ $tpl->assign('channel_generator', 'XOOPS');
+ $tpl->assign('channel_language', _LANGCODE);
+ $tpl->assign('image_url', XOOPS_URL.'/images/logo.gif');
+ $dimention = getimagesize(XOOPS_ROOT_PATH.'/images/logo.gif');
+ if (empty($dimention[0])) {
+ $width = 88;
+ } else {
+ $width = ($dimention[0] > 144) ? 144 : $dimention[0];
+ }
+ if (empty($dimention[1])) {
+ $height = 31;
+ } else {
+ $height = ($dimention[1] > 400) ? 400 : $dimention[1];
+ }
+ $tpl->assign('image_width', $width);
+ $tpl->assign('image_height', $height);
+ $count = $sarray;
+ foreach ($sarray as $story) {
+ $tpl->append('items', array('title' => xoops_utf8_encode(htmlspecialchars($story->title(), ENT_QUOTES)), 'link' => XOOPS_URL.'/modules/news/article.php?storyid='.$story->storyid(), 'guid' => XOOPS_URL.'/modules/news/article.php?storyid='.$story->storyid(), 'pubdate' => formatTimestamp($story->published(), 'rss'), 'description' => xoops_utf8_encode(htmlspecialchars($story->hometext(), ENT_QUOTES))));
+ }
+ }
+}
+$tpl->display('db:system_rss.html');
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/backend.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/banners.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/banners.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/banners.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,355 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include "mainfile.php";
+
+/********************************************/
+/* Function to let your client login to see */
+/* the stats */
+/********************************************/
+function clientlogin()
+{
+ global $xoopsDB, $xoopsLogger, $xoopsConfig;
+ include("header.php");
+ echo "<style type='text/css'>
+ body {background-color : #fcfcfc;color: #000000;font-weight: normal;font-size: 12px;font-family: Trebuchet MS,Verdana, Arial, Helvetica, sans-serif;margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;}
+ .redirect {width: 70%;margin: 110px;text-align: center;padding: 15px;text-align:center;border: #e0e0e0 1px solid;color: #666666;background-color: #f6f6f6;text-align: center;}
+ .redirect a:link {color: #666666;text-decoration: none;font-weight: bold;}
+ .redirect a:visited {color: #666666;text-decoration: none;font-weight: bold;}
+ .redirect a:hover {color: #999999;text-decoration: underline;font-weight: bold;}
+ hr {height: 3px;border: 3px #E18A00 solid;filter : Alpha(Opacity=100,FinishOpacity=10,Style=2);width: 95%;}
+ font.bigtext { font-size: 16px; font-weight: bold; }
+ </style>
+
+ <form action='banners.php' method='post'>
+ <table width='100%' class='redirect'>
+ <tr><td colspan='2' align='center'>
+ <b>Advertising Statistics</b><hr /></td></tr>
+ <tr><td align='right'><b>Login: </b></td>
+ <td><input class='textbox' type='text' name='login' size='12' maxlength='10' /></td></tr>
+ <tr><td align='right'><b>Password: </b></td>
+ <td><input class='textbox' type='password' name='pass' size='12' maxlength='10' /></td></tr>
+ <tr><td align='center' colspan='2'><input type='hidden' name='op' value='Ok' />".$GLOBALS['xoopsSecurity']->getTokenHTML()."
+ <input type='submit' value='Login'></td></tr>
+ <tr><td colspan='2' align='center'><hr />Please type your client information</td></tr>
+ </table></form>";
+ include "footer.php";
+}
+
+/*********************************************/
+/* Function to display the banners stats for */
+/* each client */
+/*********************************************/
+function bannerstats($login, $pass)
+{
+ global $xoopsDB, $xoopsConfig, $xoopsLogger;
+ if ($login == "" || $pass == "") {
+ redirect_header("banners.php",2);
+ exit();
+ }
+ $result = $xoopsDB->query(sprintf("SELECT cid, name, passwd FROM %s WHERE login=%s", $xoopsDB->prefix("bannerclient"), $xoopsDB->quoteString($login)));
+ list($cid, $name, $passwd) = $xoopsDB->fetchRow($result);
+ if ( $pass==$passwd ) {
+ include "header.php";
+ echo "<style type='text/css'>
+ .b_td {color: #ffffff; background-color: #2F5376; padding: 3px; text-align: center;}
+ </style>
+ <h4 style='text-align:center;'><b>Current Active Banners for $name</b><br /></h4>
+ <table width='100%' border='0'><tr>
+ <td class='b_td'><b>ID</b></td>
+ <td class='b_td'><b>Imp. Made</b></td>
+ <td class='b_td'><b>Imp. Total</b></td>
+ <td class='b_td'><b>Imp. Left</b></td>
+ <td class='b_td'><b>Clicks</b></td>
+ <td class='b_td'><b>% Clicks</b></td>
+ <td class='b_td'><b>Functions</b></td><tr>";
+ $result = $xoopsDB->query("select bid, imptotal, impmade, clicks, date from ".$xoopsDB->prefix("banner")." where cid=$cid");
+ while ( list($bid, $imptotal, $impmade, $clicks, $date) = $xoopsDB->fetchRow($result) ) {
+ if ( $impmade == 0 ) {
+ $percent = 0;
+ } else {
+ $percent = substr(100 * $clicks / $impmade, 0, 5);
+ }
+ if ( $imptotal == 0 ) {
+ $left = "Unlimited";
+ } else {
+ $left = $imptotal-$impmade;
+ }
+ echo "<td align='center'>$bid</td>
+ <td align='center'>$impmade</td>
+ <td align='center'>$imptotal</td>
+ <td align='center'>$left</td>
+ <td align='center'>$clicks</td>
+ <td align='center'>$percent%</td>
+ <td align='center'><a href='banners.php?op=EmailStats&login=$login&pass=$pass&cid=$cid&bid=$bid&t=".$GLOBALS['xoopsSecurity']->createToken()."'>E-mail Stats</a></td><tr>";
+ }
+ echo "</table><br /><br /><div>Following are your running Banners in ".$xoopsConfig['sitename']." </div><br /><br />";
+ $result = $xoopsDB->query("select bid, imageurl, clickurl, htmlbanner, htmlcode from ".$xoopsDB->prefix("banner")." where cid=$cid");
+ while ( list($bid, $imageurl, $clickurl,$htmlbanner, $htmlcode) = $xoopsDB->fetchRow($result) ) {
+ $numrows = $xoopsDB->getRowsNum($result);
+ if ($numrows>1) {
+ echo "<hr /><br />";
+ }
+ if (!empty($htmlbanner) && !empty($htmlcode)){
+ echo $myts->displayTarea($htmlcode);
+ }else{
+ if(strtolower(substr($imageurl,strrpos($imageurl,".")))==".swf") {
+ echo "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/ swflash.cab#version=6,0,40,0\"; width=\"468\" height=\"60\">";
+ echo "<param name=movie value=\"$imageurl\" />";
+ echo "<param name=quality value='high' />";
+ echo "<embed src=\"$imageurl\" quality='high' pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"; type=\"application/x-shockwave-flash\" width=\"468\" height=\"60\">";
+ echo "</embed>";
+ echo "</object>";
+ } else {
+ echo "<img src='$imageurl' border='1' alt='' />";
+ }
+ }
+ echo"Banner ID: $bid<br />
+ Send <a href='banners.php?op=EmailStats&login=$login&cid=$cid&bid=$bid&pass=$pass&t=".$GLOBALS['xoopsSecurity']->createToken()."'>E-Mail Stats</a> for this Banner<br />";
+ if (!$htmlbanner){
+ $clickurl = htmlspecialchars($clickurl, ENT_QUOTES);
+ echo "This Banner points to <a href='$clickurl'>this URL</a><br />
+ <form action='banners.php' method='post'>
+ Change URL: <input class='textbox' type='text' name='url' size='50' maxlength='200' value='$clickurl' />
+ <input class='textbox' type='hidden' name='login' value='$login' />
+ <input class='textbox' type='hidden' name='bid' value='$bid' />
+ <input class='textbox' type='hidden' name='pass' value='$pass' />
+ <input class='textbox' type='hidden' name='cid' value='$cid' />
+ <input type='submit' name='op' value='Change' /></form>";
+ }
+ }
+
+ /* Finnished Banners */
+ echo "<br />";
+ if(!$result = $xoopsDB->query("select bid, impressions, clicks, datestart, dateend from ".$xoopsDB->prefix("bannerfinish")." where cid=$cid")){
+ echo "<h4 style='text-align:center;'>Banners Finished for $name</h4><br />
+ <table width='100%' border='0'><tr>
+ <td class='b_td'><b>ID</b></td>
+ <td class='b_td'><b>Impressions</b></td>
+ <td class='b_td'><b>Clicks</b></td>
+ <td class='b_td'><b>% Clicks</b></td>
+ <td class='b_td'><b>Start Date</b></td>
+ <td class='b_td'><b>End Date</b></td></tr>";
+ while ( list($bid, $impressions, $clicks, $datestart, $dateend) = $xoopsDB->fetchRow($result) ) {
+ $percent = substr(100 * $clicks / $impressions, 0, 5);
+ echo "<tr><td align='center'>$bid</td>
+ <td align='center'>$impressions</td>
+ <td align='center'>$clicks</td>
+ <td align='center'>$percent%</td>
+ <td align='center'>".formatTimestamp($datestart)."</td>
+ <td align='center'>".formatTimestamp($dateend)."</td></tr>";
+ }
+ echo "</table>";
+ }
+ include "footer.php";
+ } else {
+ redirect_header("banners.php",2);
+ exit();
+ }
+}
+
+/*********************************************/
+/* Function to let the client E-mail his */
+/* banner Stats */
+/*********************************************/
+function EmailStats($login, $cid, $bid, $pass)
+{
+ global $xoopsDB, $xoopsConfig;
+ if ($login != "" && $pass != "") {
+ $cid = intval($cid);
+ $bid = intval($bid);
+ if ($result2 = $xoopsDB->query(sprintf("select name, email, passwd from %s where cid=%u AND login=%s", $xoopsDB->prefix("bannerclient"), $cid, $xoopsDB->quoteString($login)))) {
+ list($name, $email, $passwd) = $xoopsDB->fetchRow($result2);
+ if ($pass == $passwd) {
+ if ($email == "") {
+ redirect_header("banners.php",3,"There isn't an email associated with client ".$name.".<br />Please contact the Administrator");
+ exit();
+ } else {
+ if ($result = $xoopsDB->query("select bid, imptotal, impmade, clicks, imageurl, clickurl, date from ".$xoopsDB->prefix("banner")." where bid=$bid and cid=$cid")) {
+ list($bid, $imptotal, $impmade, $clicks, $imageurl, $clickurl, $date) = $xoopsDB->fetchRow($result);
+ if ( $impmade == 0 ) {
+ $percent = 0;
+ } else {
+ $percent = substr(100 * $clicks / $impmade, 0, 5);
+ }
+ if ( $imptotal == 0 ) {
+ $left = "Unlimited";
+ $imptotal = "Unlimited";
+ } else {
+ $left = $imptotal-$impmade;
+ }
+ $fecha = date("F jS Y, h:iA.");
+ $subject = "Your Banner Statistics at ".$xoopsConfig['sitename'];
+ $message = "Following are the complete stats for your advertising investment at ". $xoopsConfig['sitename']." :\n\n\nClient Name: $name\nBanner ID: $bid\nBanner Image: $imageurl\nBanner URL: $clickurl\n\nImpressions Purchased: $imptotal\nImpressions Made: $impmade\nImpressions Left: $left\nClicks Received: $clicks\nClicks Percent: $percent%\n\n\nReport Generated on: $fecha";
+ $xoopsMailer =& getMailer();
+ $xoopsMailer->useMail();
+ $xoopsMailer->setToEmails($email);
+ $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
+ $xoopsMailer->setFromName($xoopsConfig['sitename']);
+ $xoopsMailer->setSubject($subject);
+ $xoopsMailer->setBody($message);
+ $xoopsMailer->send();
+ redirect_header("banners.php?op=Ok&login=$login&pass=$pass&t=".$GLOBALS['xoopsSecurity']->createToken(), 3, "Statistics for your banner has been sent to your email address.");
+ exit();
+ }
+ }
+ }
+ }
+ }
+ redirect_header("banners.php",2);
+ exit();
+}
+
+/*********************************************/
+/* Function to let the client to change the */
+/* url for his banner */
+/*********************************************/
+function change_banner_url_by_client($login, $pass, $cid, $bid, $url)
+{
+ global $xoopsDB;
+ if ($login != "" && $pass != "" && $url != "") {
+ $cid = intval($cid);
+ $bid = intval($bid);
+ $sql = sprintf("select passwd from %s where cid=%u and login=%s", $xoopsDB->prefix("bannerclient"), $cid, $xoopsDB->quoteString($login));
+ if ($result = $xoopsDB->query($sql)) {
+ list($passwd) = $xoopsDB->fetchRow($result);
+ if ( $pass == $passwd ) {
+ $sql = sprintf("update %s set clickurl=%s where bid=%u AND cid=%u", $xoopsDB->prefix("banner"), $xoopsDB->quoteString($url), $bid, $cid);
+ if ($xoopsDB->query($sql)) {
+ redirect_header("banners.php?op=Ok&login=$login&pass=$pass&t=".$GLOBALS['xoopsSecurity']->createToken(), 3, "URL has been changed.");
+ exit();
+ }
+ }
+ }
+ }
+ redirect_header("banners.php",2);
+ exit();
+}
+
+function clickbanner($bid)
+{
+ global $xoopsDB;
+ if (is_int($bid) && $bid > 0) {
+ if (xoops_refcheck()) {
+ if ($bresult = $xoopsDB->query("select clickurl from ".$xoopsDB->prefix("banner")." where bid=$bid")) {
+ list($clickurl) = $xoopsDB->fetchRow($bresult);
+ $xoopsDB->queryF("update ".$xoopsDB->prefix("banner")." set clicks=clicks+1 where bid=$bid");
+ header ('Location: '.$clickurl);
+ }
+ }
+ }
+ exit();
+}
+$op = '';
+if (!empty($_POST['op'])) {
+ $op = $_POST['op'];
+} elseif (!empty($_GET['op'])) {
+ $op = $_GET['op'];
+}
+$myts =& MyTextSanitizer::getInstance();
+switch ( $op ) {
+case "click":
+ $bid = 0;
+ if (!empty($_GET['bid'])) {
+ $bid = intval($_GET['bid']);
+ }
+ clickbanner($bid);
+ break;
+case "login":
+ clientlogin();
+ break;
+case "Ok":
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("banners.php", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit();
+ }
+ $login = $pass = '';
+ if (!empty($_GET['login'])) {
+ $login = $myts->stripslashesGPC(trim($_GET['login']));
+ }
+ if (!empty($_GET['pass'])) {
+ $pass = $myts->stripslashesGPC(trim($_GET['pass']));
+ }
+ if (!empty($_POST['login'])) {
+ $login = $myts->stripslashesGPC(trim($_POST['login']));
+ }
+ if (!empty($_POST['pass'])) {
+ $pass = $myts->stripslashesGPC(trim($_POST['pass']));
+ }
+ bannerstats($login, $pass);
+ break;
+case "Change":
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("banners.php", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit();
+ }
+ $login = $pass = $url = '';
+ $bid = $cid = 0;
+ if (!empty($_POST['login'])) {
+ $login = $myts->stripslashesGPC(trim($_POST['login']));
+ }
+ if (!empty($_POST['pass'])) {
+ $pass = $myts->stripslashesGPC(trim($_POST['pass']));
+ }
+ if (!empty($_POST['url'])) {
+ $url = $myts->stripslashesGPC(trim($_POST['url']));
+ }
+ if (!empty($_POST['bid'])) {
+ $bid = intval($_POST['bid']);
+ }
+ if (!empty($_POST['cid'])) {
+ $cid = intval($_POST['cid']);
+ }
+ change_banner_url_by_client($login, $pass, $cid, $bid, $url);
+ break;
+case "EmailStats":
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("banners.php", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit();
+ }
+ $login = $pass = '';
+ $bid = $cid = 0;
+ if (!empty($_GET['login'])) {
+ $login = $myts->stripslashesGPC(trim($_GET['login']));
+ }
+ if (!empty($_GET['pass'])) {
+ $pass = $myts->stripslashesGPC(trim($_GET['pass']));
+ }
+ if (!empty($_GET['bid'])) {
+ $bid = intval($_GET['bid']);
+ }
+ if (!empty($_GET['cid'])) {
+ $cid = intval($_GET['cid']);
+ }
+ EmailStats($login, $cid, $bid, $pass);
+ break;
+default:
+ clientlogin();
+ break;
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/banners.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/cache/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/cache/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/cache/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+<script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/cache/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/changelog.txt
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/changelog.txt 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/changelog.txt 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,586 @@
+============================
+2005/10/30: Version 2.2.3 Final
+============================
+- SECURITY: Fix to prevent mail headers injection (Skalpa/XOOPS Cube)
+- SECURITY: Fix to prevent endless loop in PHPMailer (Skalpa/Minahito)
+- SECURITY: Fix to prevent XSS in the textsanitizer (Skalpa/XOOPS Cube)
+- SECURITY: Fix to prevent XSS in newbb and the comments system (Skalpa/Keigo Yamazaki of Little eArth Corporation Co., Ltd.)
+- SECURITY: Vaporfix to prevent uploading of invalid images (Skalpa/XOOPS Cube)
+
+- Added fallback in Authfactory to use XOOPS auth in case of the selected method's class file is inaccessible (phppp)
+- Changed quoteString() to put ' on all non-integers instead of just all strings (Mithrandir)
+- Changed XTheme::display() to use caching correctly and set page title and module header from $xoopsOption (phppp)
+- Fixed typo in XTheme::addCSS where <script> was used instead of <style> (phppp)
+- Added explanatory comments in XTheme::loadTheme and fixed $xoopsRequestUri to the correct $_SERVER['REQUEST_URI'] (phppp)
+- Added missing global declaration of $xoopsLogger in XTheme::checkCache() (phppp)
+- Fixed typos in class/xml/xmlatomparser.php and modules/profile/search.php (phppp/ymbo @ Xoops China)
+- Added patch #1267386 - Group perm form improvement (phppp/zollou)
+- Added {LOGINNAME} to mailer string-replace routine (Mithrandir)
+- Fixed bug #1285967 - bug with http://IP:PORT/ configured sites, XoopsSecurity::checkReferer now takes the port into consideration (phppp)
+- Added global declaration of $xoopsTpl in footer.php (phppp)
+- Changed include/checklogin.php to disallow everyone with a level below 1 instead of equalling zero (disabled users have level -1) (Mithrandir)
+- Cosmetic changes in xoops_confirm() function in include/functions.php (phppp)
+- Fixed bug/typo in include/functions.php function xoops_array_diff_assoc() (phppp)
+- Fixed bug in system installation where login, main menu and user menu blocks were not created correctly (Mithrandir)
+- Added pre-selected modules for the step of module selection and language files for the step of module installation (phppp)
+- Block bid assignment added so both block and instance has the right value for bid in XoopsBlockInstanceHandler::getLinkedObjects() (phppp)
+- Modified kernel/module.php regexp for page detection in getCurrentPage() (phppp)
+- Changed order of error messages in module installation (phppp)
+- Fixed bug in kernel/module.php where config unused options would not be removed if a config has no options any more (phppp)
+- Fixed bug in kernel/object.php where whereclause is wrongly generated for multiple keyname (phppp)
+- Fixed missing language definition for profile edit by adding multi-languge processing for profile fields in kernel/profilefield.php (phppp)
+- Added missing process for forcing update profile data in kernel/profilefield.php "function loadFields" (phppp)
+- Changed custom time computation in XoopsLocal class language/english/local.php (phppp)
+- Fixed lostpass.php to properly set new password when clicking on e-mailed link (Mithrandir)
+- Fixed bug #1276917 - 2.2.3: Edit User won't save Group change
+- Fixed bug #1262813 - Add User, some fields are reset when error occur (Mithrandir/marook)
+- Added password length check in modules/profile/register.php (phppp/Aries)
+- Modified error message rendering in modules/profile/register.php (phppp)
+- Fixed bug #1250347 - search in profiles doesnt work properly (Mithrandir/irmtfan)
+- Fixed bug #1247398 - Error in modules/profile/search.php (Mithrandir/edomch)
+- Added button to change password in user profile (phppp)
+- Fixed bug in system/admin/banners/main.php where it was impossible to edit banner clients (Mithrandir/Peekay)
+- Fixed bug #1253289 - Can't make blocks invisible (Mithrandir/barrycooper)
+- Added safety in blocks administration for blocks that come from modules that no longer exist (database inconsistency) (Mithrandir)
+- Added safety in template administration for templates that come from modules that no longer exist (database inconsistency) (Mithrandir)
+- XHTML Fix in XMT theme (phppp)
+- Added overflow treatment for xoopsCode/xoopsQuote (phppp)
+- Added update procedure to System module update, where blocks and templates without corresponding modules will be removed (Mithrandir)
+- Fixed deprecated variable ("name" => "uname") in system/blocks/system_blocks.php function b_system_info_show() (phppp)
+- Added Patch #1281295 - wrong error_reporting in smilies administration (phppp/birdseed)
+- Fixed bug in system/admin/modulesadmin/modulesadmin.php where configuration categories were not removed on module uninstallation (Mithrandir)
+- Fixed bug in system/admin/modulesadmin/modulesadmin.php where block templates could remain in the database after module uninstall (Mithrandir)
+- Interface improvements in module installation (phppp)
+- Changed XoopsFormSelectUser constructor signature to follow convention from XOOPS 2.0.x (Mithrandir)
+- Moved hidden fields from bottom of <form> tag to the top in XoopsThemeForm::render() for backwards compatibility and XHTML compliance (Mithrandir)
+- Changed XOOPS_URL detection and checking during installation to require an absolute URI and not a relative one (Mithrandir)
+- Fixed the mysql class quoteString() so it unconditionnally quotes the parameter again (back to 2.0.x behavior) (Skalpa)
+- Fixed handling of array vars in XPOH insert and insertAll (Skalpa)
+- Fixed bad references use in XoopsObject and XOPH classes (Skalpa)
+- Fixed bad references use in sanitizer (Skalpa)
+- Fixed bad references use in installer sanitizer (Skalpa)
+- Fixed user search in Extended Profile module, when searching for values in select and radio type fields (Mithrandir/miscellone)
+- Fixed Bug #1294569 - Magic Quote Issue when registering users, additional slashes were added (Mithrandir/Monique)
+- Fixed bug where profiles would not be deleted on user deletion (Mithrandir)
+- Added routine to System Module update to set default values for comments, timezone and theme fields to system values (phppp)
+- Fixed Bug #1298674 - Block caching isn't running (Mithrandir/mcleines)
+- Fixed Bug #1303864 - Delete user account frontside(Mithrandir/MarcoFr)
+- Fixed Bug #1303810 - Main admin account deletion control 2.2.3RC2 (Mithrandir/MarcoFr)
+- Fixed Bug #1262806 - 2.2.x: Default TZ is not used in Add User (Mithrandir/Marook)
+- Fixed Bug #1306176 - 2.2.3RC2 - User update fails (Mithrandir/rlinfoot)
+- Changed module installation and update routine so it now halts, when xoops_module_pre_xxx function fails (Mithrandir)
+- Fixed security problem in Koivi editor (phppp/Marijuana)
+
+============================
+2005/08/12: Version 2.2.2
+============================
+- SECURITY: Fixed several path disclosure issues (Mithrandir/ajaxbr+Dave_l)
+- Fixed bug #1253433 - Outbox to-link wrong (Mithrandir/Dave_l)
+- Fixed bug #1256352 - insertConfigCategories (Mithrandir/Pnooka)
+- Fixed bug #1255004 - malformed uri in class/theme.php (Mithrandir/Frankblack)
+- Fixed bug #1252898 - SMTP, SMTPAuth Fsockopen error (Mithrandir/fatalsaint)
+- Fixed wrong call to loginUser() with uname instead of loginname (Mithrandir/ef11cornell)
+- Fixed bug #1249880 - Change Email function can't be disabled (Mithrandir/Dave_l)
+- Added "font styles" to language files in xoopseditor/koivi (phppp)
+- Added empty $text check for encoding conversion in languages/english/local.php (phppp)
+- Removed language files other than English (phppp)
+
+============================
+2005/08/08: Version 2.2.1
+============================
+- Manually applied the PHPMailer 1.73 SMTP fix to prevent potential issues (skalpa)
+- Fixed a bug in the installer that could prevent mainfile.php to be created correctly on PHP5 (skalpa)
+- Moved module-admin item to the top of the admin menu (phppp)
+- Fixed a typo for constant variable check in error.php (phppp)
+- Commented out the "showrblock" from functions.php (phppp)
+- Added error message for user not found in auth service (phppp)
+- Corrected Header set Charset in installer (phppp)
+- Moved auth language defination to its right place (phppp)
+- Fixed typo in XoopsLogger->addblock (phppp)
+- Minor fix on reference usage in textsanitizer (phppp)
+- Changed default config for use-realname to false (phppp)
+- Fixed loginUserMd5() typo in member handler (phppp)
+- Changed reference to make it work when calling another module's install on a module's update (phppp)
+- Rolled back system-info block (phppp)
+- Dix for icon url in comment block (phppp)
+- Add new PM prompt to user-menu block (phppp)
+- Changed user name (which is not always available and not much infomative) to user uname in userselect (phppp)
+- Added install function for inserting PM link to existing users' profile (phppp)
+- Ensure to use username and not real name in PM composer (phppp)
+- PM module: Bugfix for setting message as "read" (phppp)
+- PM module: Bugfix for icon url (phppp)
+- Fix to display profile items with value only in userinfo page (phppp)
+- Fix where language file was not included in profile activation page (phppp)
+- Fix for error message in changemail (phppp)
+- Fixed problems with Admin right in edituser.php (phppp)
+- Added possibility for admin to change users email (phppp)
+
+============================
+2005/07/27: Version 2.2
+============================
+
+???
+
+============================
+2005/07/21: Version 2.2 RC2
+============================
+- Fixed registration issues with dynamic user profile fields (Mithrandir)
+- Added login name property for a user, so login name and displayed username is now (potentially) differerent (Mithrandir)
+- Refinements in PM module (phppp)
+- Refinements in Profile module (Mithrandir)
+- Refinements in XoopsForm classes (phppp)
+- Fixed bug where comments would not show if the user had no settings for mode and order (Mithrandir/Rowdie)
+- Fixed bug in LDAP authentication where configuration values were not fetched correctly (Mithrandir)
+
+Language constant changes:
+- _PROFILE_MA_REALNAME added to modules/profile/language/english/main.php
+- _PM_RUSUREEMPTY and _PM_RUSUREDELETE added to modules/pm/language/english/main.php
+- _INSTALL_L37 and _INSTALL_L167 added to install/language/english/install.php
+- {X_UNAME} changed to {LOGINNAME} in language/english/mail_template/lostpass2.tpl
+============================
+2005/07/14: Version 2.2 RC
+============================
+- Fixed security hole in XML-RPC for both magic_quotes_gpc on and off (Mithrandir/James at Gulftech, Onokazu)
+- Fixed sanitation in Criteria class for both magic_quotes_gpc on and off (Mithrandir/Onokazu)
+- Fixed sanitation bug in include/checklogin.php (Mithrandir)
+- Fixed bug in comments, where editing a comment would post a new one
+- Removed PHP parsing in Saxparser's handleProcessingInstruction() method (Thanks to GIJOE)
+- Fixed parse error in modules/newbb/post.php
+- Fixed sanitation bug in include/comment_form.php and include/comment_post.php (Mithrandir/James at Gulftech)
+- Fixed sanitation bug in class/xml/rpc/xmlrpcapi.php and class/criteria.php (Mithrandir/James at Gulftech/XOOPS JP)
+- Changed admin.php to fetch news from xoops.org via Snoopy (Mithrandir/XOOPS JP)
+- Fixed possible XSS hole in redirect_header (Mithrandir/XOOPS JP)
+- Security fixes in pda.php and misc.php (Mithrandir/XOOPS JP)
+- Fixed typos in kernel/object.php (Mithrandir/brandycoke)
+- Fixed bug where lostpass.php would not accept emails and send new password (Ackbarr)
+- Fixed bug where search result links would be wrong if the item was in another module than the searched one (Ackbarr)
+- Fixed bug in groups admin where it was impossible to add users to a group if the site had 200+ users (Ackbarr)
+- Fixed bug with uploading smilies (Ackbarr)
+
+Other Additions:
+- PM Module functionality expanded (phppp)
+
+============================
+2005/05/21: Version 2.1.1
+============================
+- Fixed bug #970474 - class/zipdownloader.php (Mithrandir/AC-Ibu)
+- Fixed bug #1087786 - Can't assign to $this in PHP5 (Mithrandir)
+- Fixed bug #1156510 - Typo Fixes in XoopsObject (Mithrandir/NS Tai, Brandycoke)
+- Fixed bug #962025 - Word Censoring Options (Mithrandir/Tom Hayakawa)
+- Fixed bug #1168850 - activateUser method is not used in admin panel (Mithrandir/Andrey)
+- Fixed bug #1167596 - Hardcoded texts in XoopsObject (Mithrandir/hthouzard)
+- Fixed bug #1166354 - image.php - undefined constant (Mithrandir/dave_l)
+- Fixed bug #1164226 - improvement in function xoops_refcheck (Mithrandir/sudhaker)
+- Fixed bug #1163599 - Big sessions error (Mithrandir)
+- Fixed bug #1162290 - The xoops_config (config_id field) reaches its max (Mithrandir)
+- Fixed bug #1151930 - index.php - use "require" instead of "include" (Mithrandir/dave_l)
+- Fixed bug #1144690 - XoopsFormHidden does not conform HTML rule (Mithrandir/suin)
+- Fixed bug #1122854 - cannot be set up version 2.05 of module (Mithrandir/ohwada)
+- Fixed bug #1122253 - show notice message when post comment (Mithrandir/ohwada)
+- Fixed bug #1120729 - xoops_footer not in default theme (Mithrandir/dave_l)
+- Fixed bug #1118908 - 1 html-bug in xoopscodes.php (Mithrandir/frankblack)
+- Fixed bug #1098445 - problem with clickable links (dave_l/hthouzard)
+- Fixed bug #1083928 - XoopsErrorHandler_HandleError - regex usage (Mithrandir/dave_l)
+- Fixed bug #1082042 - Error in parsing date in calendar.js (Mithrandir/puff_daweed)
+- Fixed bug #1059216 - gzip compression & php debugging Conflict (Mithrandir/Liquid, WF)
+- Fixed bug #1054221 - xoops_module_header can not be cached (Mithrandir/phppp)
+- Fixed bug #1020494 - Uninformative error message if admin passwords differ (Mithrandir)
+- Fixed bug #1014438 - Admin popup menu when mouse over (Mithrandir)
+- Fixed bug #1014408 - XoopsGroupPermForm forms req. sys admin rights to use (Mithrandir/jegelstaff)
+- Fixed bug #1011296 - include/checklogin.php calculates a wrong url (Mithrandir/puntoexe)
+- Fixed bug #980100 - Variable substitution in db password (dave_l/dcinege)
+- Fixed bug #973918 - showImgSelected - Proposed change (Mithrandir)
+- Fixed bug #972552 - stopping install without error message (PHP without mysql) (Mithrandir/snagai)
+- Fixed bug #894799 - [fix] No JS validation of required fields in PM (Mithrandir/masi)
+- Fixed bug - Don't show preferences link to users without permission (Mithrandir)
+- Fixed bug #1174230 - wrong formatTimestamp() syntax in formtextdateselect.php (Mithrandir/ZPC)
+- Fixed bug #967076 - xoops_version and templates! (Mithrandir/w4z004)
+- Fixed bug #1174626 - phpkaox style sheet (Mithrandir/wardick)
+- Fixed bug #1196034 - getSmileys (Mithrandir/phppp)
+
+- Added patch #1162913 - xoops_getLinkedUnameFromId (Mithrandir/hthouzard)
+- Added patch #1124749 - Module cache and one-column full-screen display (Mithrandir/phppp)
+- Added patch #1105492 - CSS for backend.php (system_rss.html) (Mithrandir/ajaksu2)
+- Added patch #1099086 - who's online popup (Mithrandir/banned)
+- Added patch #1096514 - Activation of new user (Mithrandir/gibaphp)
+- Added patch #1090132 - functions.php, redirect_header (Mithrandir/banned)
+- Added patch #1065669 - Slight enhancement to XoopsPageNav::renderImageNav() (Mithrandir)
+- Added patch #1052866 - language detection in install.php (Mithrandir/phppp)
+- Added patch #989376 - Use REQUEST_URI instead of PHP_SELF generally (Mithrandir/mrmx)
+- Added patch #944710 - Extra Cookie for the newbb (Mithrandir/Predator)
+- Added patch #912823 - Saving one query per request (Mithrandir/sudhaker)
+- Added patch #963071 - Random password generator (Mithrandir/dave_l)
+- Added patch #1056514 - SQL Generation Time (Mithrandir/bd_csms)
+- Added patch #920059 - XOOPS reports why people can't login (Mithrandir/Herko)
+- Added patch #1181607 - Update jsCalendar to 1.0 (Mithrandir/reddshack)
+- Added patch #1181328 - Getting rid of negative information on search results page (Mithrandir/frankblack)
+- Added patch #1077123 - Make YYYY-mm-dd default for dateboxes when no date passed (Mithrandir/jegelstaff)
+- Added patch #1194690 - Show all required fields in every forms (Mithrandir/hthouzard)
+- Added patch #919353 - Permanent selectable theme (Mithrandir/frankblack)
+- Added patch #1019464 - Extended renderldap function in class criteria (Mithrandir/pemen)
+
+Other fixes:
+- Search block now defaults to searching in current module (Mithrandir)
+- XoopsPersistableObjectHandler added, making it much easier making database access classes (Mithrandir)
+- Fixed rare case, where search results that gave full path would have XOOPS_URL."/modules/dirname" prepended - Only relevant for modules that search other modules (Mithrandir)
+
+Additions:
+- Dynamic User Profiles (Mithrandir/Ackbarr)
+- Administration area themeable + new theme (Ralf57)
+- Error page when referer is blocked and the user attempts to change content in the database (Mithrandir)
+- Configuration categories - modules can now categorise their configuration items (Mithrandir/Malanciault)
+- XoopsUser::uname is now used solely for login purposes, real name is used for display on screen (Mithrandir)
+- PM functionality moved into a module instead of in the core (Mithrandir/Wanikoo)
+
+
+============================
+2005/04/23: Version 2.0.10
+============================
+- Fixed typo in newbb/post.php
+
+============================
+2005/04/03: Version 2.0.10 RC
+============================
+- Implemented new token system for validating form origination and increased protection against CSRF (Mithrandir/Onokazu)
+- Security fix to avoid the usage of fopen and unlink when previewing (Onokazu)
+- Fixed bug - Missing </a> in news/templates/blocks/news_block_bigstory.html (Mithrandir/blacKurd)
+- Fixed bug in header.php assign $xoops_lblocks (Mithrandir/phppp)
+- Fixed bug #1087786 Can"t assign to $this in PHP5 (Mithrandir)
+- Included 2.0.9.3 fixes in 2.0.10 patch for easy upgrade from 2.0.9.2 (Mithrandir/rowd)
+- Fixed bug #1157029 - Bug in include/checklogin.php (Onokazu/sudhaker)
+- Fixed bug #1060061 - renderValidationJS showing htmlentities instead of intended characters (Onokazu/theCat)
+
+2005/03/20: Version 2.0.9.3
+===============================
+- Security fix to prevent uploading of executable files (pokleyzz, GIJOE and the JP XOOPS community)
+
+2004/12/30: Version 2.0.9.2
+===============================
+- Security fix to prevent session hijacking (thanks goes to GIJOE and the JP XOOPS community)
+- Fixed duplicated blocks bug on module update
+- phpmailer back to the version included in 2.0.7.3, as it is more stable (onokazu)
+
+
+2004/12/25: Version 2.0.9
+===============================
+- Security fix in the newbb module for PHP version < 4.3.10 (GIJOE & onokazu)
+- Security fix in the newbb module to prevent XSS attacks (minahito)
+- Fixed various problems related to XoopsUser::isAdmin() and $xoops_isadmin patch in 2.0.7.1 (bugs #1014203/#1014403) (onokazu)
+- Fixed incorrect parameters being passed to CriteriaCompo in modulesadmin.php (onokazu)
+- Fixed incorrect parameters being passed to XoopsXmlRpcStruct::add() in BloggerApi::getUserInfo() (onokazu)
+- Fixed Bug #1023022 - XoopsFormDhtmlTextArea and array_push() error (Mithrandir)
+- Fixed Bug #1013989 - Inbox title shoud be plural "Private Messages" (Mithrandir)
+- Fixed Bug #1004998 - readpmsg.php typo:</th> html tag of subject is nothing (Mithrandir)
+- Fixed Bug #1035707 - Enable array type options in blocks (Mithrandir)
+- Fixed a typo in include/comment_form.php, patch #1041993 (Dave_l)
+- Fixed Bug #1044957 - xoopsmultimailer.php Username typo when SMTP-Auth (Mithrandir)
+- Fixed RFE #900348 - Sort user list alphabetically in System -> Groups. Also changed the way it fetches the users in the group so it fetches all of them with 2 queries instead of 1 + (1 per user in the group) (Mithrandir
+)
+- Added patch #1048384 - mysql_field_name and others, added (Mithrandir)
+- Fixed bug #1049017 - Blocks sharing a template are cached wrong (Mithrandir)
+- Added patch #1048382 - Module onUpdate function (Mithrandir)
+- Fixed bug #989462 - Handler object caching not working (Mithrandir)
+- Added RFE #900345 - View/Edit group membership in Admin -> System -> Edit User (Mithrandir)
+- Fixed Bug #1055901 - group.php(IN phrase is used ,query) (Mithrandir)
+- Fixed bug #1052403 - block update in module update (Mithrandir)
+- More fixes for register_globals off in the top 10 page of mylinks/mydownloads modules
+- Fixed a typo in modules/xoopsheadline/admin/index.php (onokazu)
+- Fixed bug where 2 headline forms were using the same form name/id, causing JS error (onokazu)
+- Fixed some html problems in mylinks/mydownloads admin page (onokazu)
+- Secured mainfile.dist.php from disclosing paths (Mithrandir)
+- Fixed bug #1073029 (onokazu)
+- Fixed bug #1073532 (onokazu)
+- Fixed bug #1080791 (onokazu)
+- Fixed lang phrase _NOT_ACTIVENOTIFICATIONS not being assing to template (onokazu)
+- Some PHP5 fixes (Mithrandir)
+- Updated Smarty to version 2.6.5
+- Updated PHPMailer to version 1.72
+
+
+2004/09/11: Version 2.0.7.3
+===============================
+!! SECURITY FIX !! fixed more bugs that allowed session hijacking under a certain circumstance (onokazu)
+
+
+2004/09/10: Version 2.0.7.2
+===============================
+!! SECURITY FIX !! fixed bugs that allowed session hijacking under a certain circumstance (onokazu)
+
+
+2004/08/21: Version 2.0.7.1
+===============================
+Fixed bug #1006511 about $xoops_isadmin misuse (skalpa/the jp.xoops.org community):
+- Changed XoopsUser::isAdmin() behavior to prevent problems with modules that misuse this function
+- Fixed permission checking in user profile page, to only show admin links to people who are supposed to see them
+- Fixed permission checking in the comments system, to only show admin links to people who are supposed to see them
+Fixed incorrect escaping of configuration values in 2.0.7 (skalpa)
+Changed db proxy class error message from "Action not allowed" to "Database update not allowed during a GET request" (skalpa)
+Fixed bug #964084: if comment title is long multi-byte character.last byte loss (Mithrandir/domifara)
+Fixed bug #977360: Wrong icon in comment bloc (Mithrandir/zoullou)
+Fixed bug #976534: modules incompatibilities in 2.0.7 (Mithrandir/gijoe_peak)
+Fixed bug #975803: Typo in class/pagenav.php (Mithrandir/Dave_l)
+Fixed bug #974655: slogan variable with Xoops 2.0.7 (Mithrandir/brashquido)
+Fixed bug #987171: typo in edituser.php (Mithrandir)
+Applied patch #928503: Search results for modules with granted permissions optimised (Mithrandir/malanciault)
+Applied patch #988715: cp_header.php language (Mithrandir/phppp)
+Fixed MyTextSanitizer PHP notices (Mithrandir)
+Fixed XoopsForm PHP Notices about an unset _extra property (Mithrandir)
+
+
+2004/06/14: Version 2.0.7
+===============================
+!! SECURITY FIX !! preventing code injection in media uploader (skalpa)
+!! SECURITY FIX !! preventing execution of external scripts in shared environments (skalpa/ackbarr)
+
+Fixed bug #963937: Typo in modules/system/admin/findusers/main.php (mithrandir/tom_g3x)
+Fixed typo in x2t theme css colteaser class definition (w4z004)
+Set formButton class to Xoops popups buttons (w4z004)
+Fixed bug #960970: Incorrect display of the graphical pagenav (w4z004)
+Modified the Word Censoring fix (#962025) for MySQL 4.x compat (skalpa + quick thx 2 hervet 4 help)
+Ensured page title and slogan are escaped for HTML (onokazu)
+Fixed bug #961565: Search form keywords not checked by JS (mithrandir/tom_g3x)
+Fixed bug #961118 in XoopsFormElementTray::getElements() (mithrandir/luckec)
+Fixed bug #961311: Incorrect definition of headers var in XoopsMailer class (mithrandir/tom_g3x)
+XoopsForm::assign() now indexes elements by name if possible (mithrandir/kerkness)
+Fixed bug #963197: xoopsHiddenText is hardcoded in formdhtmlarea (mithrandir/tom_g3x)
+Fixed bug #963301: XoopsMediaUploader checkMaxHeight() doesn't work (skalpa/onokazu)
+Fixed bug #963327: XoopsImageHandler delete() keeps rows in imagebody table (skalpa/tom_g3x)
+Fixed bug #962025: Word censoring can mess db config options up (skalpa/tom_g3x)
+Fixed bug #961313: XoopsMailer custom headers are duplicated (skalpa/tom_g3x)
+Fixed bug #960683: [code] wrong translation (skalpa/ryuji+gi_joe)
+Fixed snoopy bug due to language specific characters (onokazu)
+Fixed a bug preventing deletion of users from the admin user search results (onokazu)
+Fixed a bug preventing deletion of admin users (onokazu)
+Fixed bug #915976: module onInstall feature doesn't display module messages correctly (skalpa/feugy+dave_l)
+Fixed bug #898776: Xoops module resolution for www.host.com and host.com (wulff_dk)
+Fixed bug #906282: XoopsGroupPermForm::render() - throws Undefined variable (mithrandir)
+Fixed bug #946621: Comments system extra_param not working with register_globals off (mithrandir/gstarrett)
+Fixed bug #932200: Admin > Edit user shows wrong username :-(mithrandir)
+Fixed bug #936753: $xoops_module_header not in all themes (w4z004)
+Fixed bug #921930: SQL queries with leading whitespace don't work (mithrandir)
+Fixed bug #920480: xoops_substr always adds three dots (skalpa)
+Fixed bug #921448: Undefined variable in xoopscodes.php (skalpa/dave_l)
+Applied patch #953063: js Calendar first popup date bug fix (mithrandir/venezia)
+Applied patch #953060: xoopstree.php selbox - subcategories not ordered (mithrandir/venezia)
+Applied patch #928503: Only show search results for modules with granted permissions (mithrandir/malanciault)
+Fixed bug #922152 preventing notifications to work with some Windows configurations (skalpa/robekras)
+Fixed bug #930351 preventing XoopsThemeForm::insertBreak() to work
+Corrected the content of $xoopsRequestUri on IIS fixing bug #895984 (skalpa)
+
+
+2/6/2004: Version 2.0.6
+===============================
+- Removed calls to XoopsHandlerRegistry class (onokazu)
+- Fixed loop problem after retrieving a lost password (onokazu)
+- Changed all include() calls to include_once() for xoopscodes.php (onokazu)
+- Added routines to remove users from the online member list when a user is deleted (onokazu)
+- Added parameters to the Critreria class constructor to allow the use of DB functions in SQL criteria (skalpa)
+- Added fetchBoth() method to the XoopsDatabase class (skalpa)
+- Fixed typos in class/smarty/plugins/resource.db.php (skalpa)
+- Refactoring in /class/xoopsform/form.php (skalpa)
+- Added some methods to /class/xoopsform/formelement.php to allow the use of accesskey and class attributes in form element tags (skalpa)
+- Fixed extra HTML tags not being displayed when using the XoopsThemeForm::insertBreak() method (Catzwolf)
+- Changed the default HTTP method of the search form to GET (onokazu)
+- Fixed notification constants not being included during installation (onokazu)
+- Fixed session data not being properly escaped before inserting to the database (onokazu)
+- Some useful changes to the group permission form (onokazu)
+- Fixed the block cachetime selection being reset after preview (onokazu)
+- Fixed invalid regex patterns used for username filtering, also added fix to allow the safe use of multi-byte characters in username (contributed by GIJOE)
+- Fixed bug where some blocks were not being displayed in block admin page on certain occasions (onokazu)
+- Fixed the problem of system admin icon disappearing on certain occasions (onokazu)
+- Fixed the errorhandler class to check the current error_reporting level before handleing errors (onokazu)
+- Re-activated the errorhandler class (onokazu)
+- Updated class/Snoopy.php to the latest version, v1.01 (onokazu)
+- Fixed a typo in kernel/online.php (onokazu)
+- Added some useful functions to include/xoops.js (skalpa)
+- Fix for Opera in include/xoops.js (onokazu)
+- Fixed user bio and signature values causing corruption in the edit profile form on certain occasions (onokazu)
+- Fixed the module name being reset to the default value after module update (onokazu)
+- Fixed invalid regex patterns in xoopslists.php (onokazu)
+- Fixed a few issues with register_globals setting
+- Fix for the auto-login feature (not activated)
+- Fixed image categories not being displayed in the order set by admin (onokazu)- Fixed a typo in kernel/config.php (onokazu)
+- Fixed comments not being displayed in the order as requested (onokazu)
+- Fixed the mailer class not setting some header values (onokazu)
+- Fixed chmod problem in class/uploader.php
+- Fixed magic_quotes related problems in class/uploader.php
+- Fixed notification routines causing a fatal error while trying to notify non-existent users (onokazu)
+- Added fix to convert & to & within mail messages (onokazu)
+- Fixed html special characters causing problem when submitting a new module name (onokazu)
+- Fixed javascript error in mailuser form (onokazu)
+- Fixed javascript error in calendar date select form
+- Added a new Smarty function <{xoops_link}> (skalpa)
+- Added check to prevent webmaster user/group from being removed completely (contributed by Ryuji)
+
+newbb
+- Security fix in modules/newbb/viewtopic.php (onokazu)
+- Security fix in modules/newbb/viewforum.php (onokazu)
+- Added register_globals related fix to topicmanager.php (onokazu)
+- Fixed topic moderation icons not being displayed for moderators in templates/newbb_thread.html (onokazu)
+- Fixed topic time not being displayed in recent posts block on certain occasions in blocks/newbb_new.php (onokazu)
+- Added fix to correctly navigate to the requested post even when the post is not on the first page of flat view (contrib by GIJOE in class/forumpost.php, viewtopic.php, viewforum.php)
+
+sections
+- Added missing global variable declarations to index.php (onokazu)
+
+mydownloads
+- Added register_globals related fix to modfile.php (onokazu)
+
+news
+- Added fix to always display published date in each article (onokazu)
+- Added missing ?> at the end of file in xoops_version.php (onokazu)
+- Some fixes in admin/index.php
+
+xoopspolls
+- Fixed color bar selections not working when creating/editing a new poll (onokazu)
+
+xoopsmembers
+- Fixed 'more than X posts' not working when set to 0 (onokazu)
+- Added a new language constant to language/english/main.php (Catzwolf)
+- Removed invalid HTML tags in templates/xoopsmembers_searchresults.html (Catzwolf)
+
+
+1/5/2004: Version 2.0.5.2
+===============================
+- Security fix in modules/mylinks/myheader.php
+- Security fix in modules/mylinks/visit.php
+- Security fix in modules/mylinks/admin/index.php
+
+
+11/22/2003: Version 2.0.5.1
+===============================
+- Added $option parameter to xoops_gethandler function (skalpa)
+- Security fix in banners.php (onokazu)
+- Security fix in modules/newss/include/forumform.inc.php (onokazu)
+- Security fix in include/common.php (onokazu)
+- Temporarily disabled XoopsErrorHandler class (onokazu)
+- Security fix in include/functions.php (onokazu)
+- Removed XoopsHandlerRegistry class (onokazu)
+- Added fix for preventing users entering infinite loop when recovering a lost password (onokazu)
+
+
+10/8/2003: Version 2.0.5
+===============================
+- Fixed template files not being updated even when the 'allow update from themes directory' option was enabled in preferences
+- Fixed RSS channel title being cutoff at special characters
+- Minor bug fix in pagenav.php
+- Fixed blocks disappearing from the block admin page on certain occasion
+- Additional fixes to work with register_globals off
+- Fixed problem with XoopsCode Img button not working on certain occasion
+- Added missing SQL query in kernel/avatar.php
+- Fixed problem with the newbb module where users could post without a thread title on certain occasion
+- Fixed problem in banner admin page where banner edit form not being displayed on certain occasion
+- Fixed group selection option in the blocks admin page not being selected on certain occasion
+- Fixed poll option textbox forms not displaying the correct values
+- Fixed show all link in user profile page not working in 2.0.5RC
+- Additional phrases in language/english/global.php(_NOTITLE), language/english/search.php(_SR_IGNOREDWORDS), install/language/english/install.php(_INSTALL_L128, _INSTALL_L200)
+- Added check in install/index.php to read $HTTP_ACCEPT_LANGUAGE on initial load
+
+
+9/30/2003: Version 2.0.5 RC
+===============================
+- Fixed email checking bug mentioned in http://www.xoops.org/modules/newbb/viewtopic.php?topic_id=12288&forum=2 (mvandam)
+- Fixed a number of bugs in blocks admin page (onokazu)
+- More usability fix in blocks admin page (onokazu)
+- Fixed forum topic links to correctly use the # feature in url (onokazu)
+- Fixed password checking bug mentioned in http://www.xoops.org/modules/newbb/viewtopic.php?topic_id=12301&post_id=49369&order=0&viewmode=flat&pid=49203&forum=21#forumpost49369
+- Fixed database connection error when creating database during install (onokazu)
+- Fixed mb_output_handler causing problems in backend.php/image.php/downloader (onokazu)
+- Fixed search feature to use GET requests for prev/next/showall links (onokazu)
+- Register_globals related fix in /include/comment_post.php (contrib by gstarrett)
+- Added $xoopsUserIsAdmin global variable (onokazu)
+- Added xoops_getLinkedUnameById function to /include/functions.php (Catzwolf)
+- Fixed invalid Smarty tags in /modules/system/templates/system_siteclosed.html, /modules/system/templates/system_redirect.html, /modules/system/templates/system_imagemanager2.html (onokazu)
+
+
+9/19/2003: Version 2.0.4
+===============================
+- XOOPS_CACHE_PATH, XOOPS_UPLOAD_PATH, XOOPS_THEME_PATH", XOOPS_COMPILE_PATH, XOOPS_THEME_URL, XOOPS_UPLOAD_URL are now set in include/common.php (onokazu)
+- Added [siteurl][/siteurl] tag to XoopsCode (mvandam)
+- Fixed a typo in class/uploader.php (onokazu)
+- Fixed some redirect problems after login (onokazu)
+- registre_globals fix in include/comment_view.php (onokazu)
+- Xoops.org news is disabled by default in the admin section (onokazu)
+- Added a new error handler class (class/errorhandler.php) (mvandam)
+- Fixed XoopsGroupPermHandler returning duplicate permissions (onokazu)
+- Fixed block-disappearing problem in blocks admin (onokazu)
+- Fixed typo in kernel/notification.php (mvandam)
+- Added XoopsGuestUser class in kernel/user.php (onokazu)
+- Fixed newbb module to correctly use the # feature in URL (onokazu)
+- Improved usability in blocks admin section
+- Reduced number of users to display in group/edituser page to max 200 users (onokazu)
+- Fixed bug where admins could add users with a existing username (onokazu)
+- Added files for module developers to easily add group permisson feature (modules/system/groupperm.php, class/xoopsform/groupperm.php) (onokazu)
+- Fixed typo in register.php (onokazu)
+
+
+6/17/2003: Version 2.0.3
+===============================
+- fixed CSS related bug in global search page
+- register_globals bug fix in comments
+- Smarty updated to 2.5.0
+- fixed typo in kernel/object.php
+- fixed group permission bug
+- fixed bug where image categories were deleted after group permission update
+- fixed bug where user votes could not be deleted in the mylinks module
+- fixed some language typos
+- changed XoopsGroupPermHandler::getItemIds to accept an array fot the second parameter (gperm_groupid), which was required in certain places..
+- removed avatar image files
+
+
+4/25/2003: Version 2.0.2
+===============================
+- security fix to prevent malicious cross site scripting attacks (onokazu)
+- fixed character encoding problem for some languages when using the mailer class (onokazu)
+- fixed some major bugs in the xoopsheadline module (onokazu)
+- fixed some cookie related problems in the forums module (mvandam)
+
+
+4/18/2003: Version 2.0.1
+===============================
+- fixed bug where notification feature could not be turned on
+- fixed character encoding problem for some languages when using the mailer class (onokazu)
+- fixed the theme selection block to work again
+- fixed typo in kernel/module.php
+- fixed incorrect table name in xoops_version.php of the new headline module
+- changed max limit size of some columns in the configoption table
+- fixed image manager bug when using db store method
+- xoops.org can now be disabled by adding nonews=1
+
+
+4/16/2003: Version 2.0.0
+===============================
+- xoopsheadlines module replaced with xoopsheadline module to fix character encoding problems
+- numerous bug fixes
+
+
+3/19/2003: Version 2.0.0 RC3
+===============================
+- a major change in the handling of theme files, the detail of which you can read in this [url=http://www.xoops.org/modules/news/article.php?storyid=677]article[/url] (onokazu)
+- a new global notification feature that can easily be incorporated into modules (that use Smarty) by only modifying xoops_version.php and template files (mvandam)
+- SMTP support using phpMailer (bunny)
+- group permission tables merged into one table (onokazu)
+- code refactoring
+
+
+2/9/2003: Version 2.0.0 RC2
+===============================
+A bug fix release..
+- avatar upload bug
+- themeset image upload bug
+- register_globals fix
+- recommend us block error
+- error message displayed upon submit of news article
+- page navigation bug in some modules
+- blank page bug on some servers
+- SQL displayed in blocks admin
+
+
+1/31/2003: Version 2.0.0 RC1
+===============================
+The first public release of 2.0 series.
+For new features that have been added from 1.3.x, please refer to
+the articles listed below:
+http://www.xoops.org/modules/news/article.php?storyid=486
+http://www.xoops.org/modules/news/article.php?storyid=549
+http://www.xoops.org/modules/xoopsdocs/index.php?cat_id=6
\ No newline at end of file
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/auth/auth.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/auth/auth.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/auth/auth.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,116 @@
+<?php
+// $Id$
+// auth.php - defines abstract authentification wrapper class
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+
+if ( file_exists(XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php") ) {
+ include_once XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php";
+} else {
+ include_once XOOPS_ROOT_PATH."/language/english/error.php";
+}
+/**
+ * @package kernel
+ * @subpackage auth
+ *
+ * @author Pierre-Eric MENUET <pemphp at free.fr>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsAuth {
+
+ var $_dao;
+
+ var $_errors;
+ /**
+ * Authentication Service constructor
+ */
+ function XoopsAuth (&$dao){
+ $this->_dao = $dao;
+ }
+
+ /**
+ * @abstract need to be write in the dervied class
+ */
+ function authenticate() {
+ $authenticated = false;
+
+ return $authenticated;
+ }
+
+ /**
+ * add an error
+ *
+ * @param string $value error to add
+ * @access public
+ */
+ function setErrors($err_no, $err_str)
+ {
+ $this->_errors[$err_no] = trim($err_str);
+ }
+
+ /**
+ * return the errors for this object as an array
+ *
+ * @return array an array of errors
+ * @access public
+ */
+ function getErrors()
+ {
+ return $this->_errors;
+ }
+
+ /**
+ * return the errors for this object as html
+ *
+ * @return string html listing the errors
+ * @access public
+ */
+ function getHtmlErrors()
+ {
+ /*
+ if ( file_exists(XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php") ) {
+ include_once XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php";
+ } else {
+ include_once XOOPS_ROOT_PATH."/language/english/error.php";
+ }
+ */
+ //$ret = '<h4>'._ERRORS.'</h4>';
+ $ret = '<br>';
+ if (!empty($this->_errors)) {
+ foreach ($this->_errors as $errno => $errstr) {
+ $msg = (function_exists("ldap_err2str") ? ldap_err2str ($errno) : '');
+ $ret .= $msg . ' <br> ' . $errstr .'<br />';
+ }
+ } else {
+ $ret .= _NONE.'<br />';
+ }
+ return $ret;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/auth/auth.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/auth/auth_ldap.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/auth/auth_ldap.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/auth/auth_ldap.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,122 @@
+<?php
+// $Id$
+// auth_ldap.php - LDAP authentification class
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package kernel
+ * @subpackage auth
+ *
+ * @author Pierre-Eric MENUET <pemphp at free.fr>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsAuthLdap extends XoopsAuth {
+
+ var $ldap_server;
+ var $ldap_port = '389';
+ var $ldap_version = '3';
+ var $ldap_base_dn;
+ var $ldap_uid_asdn;
+ var $ldap_uid_attr;
+ var $ldap_mail_attr;
+ var $ldap_name_attr;
+ var $ldap_surname_attr;
+ var $ldap_givenname_attr;
+ var $ldap_manager_dn;
+ var $ldap_manager_pass;
+
+ /**
+ * Authentication Service constructor
+ */
+ function XoopsAuthLdap ($dao) {
+ $this->_dao = $dao;
+ //The config handler object allows us to look at the configuration options that are stored in the database
+ $config_handler =& xoops_gethandler('config');
+ $config =& $config_handler->getConfigsByCat(XOOPS_CONF_AUTH);
+ $confcount = count($config);
+ foreach ($config as $key => $val) {
+ $this->$key = $val;
+ }
+ }
+
+ /**
+ * Authenticate user again LDAP directory (Bind)
+ * 2 options :
+ * Authenticate directly with uname in the DN
+ * Authenticate with manager, search the dn
+ *
+ * @param string $uname Username
+ * @param string $pwd Password
+ *
+ * @return bool
+ */
+ function authenticate($uname, $pwd = null) {
+ $authenticated = false;
+ if (!extension_loaded('ldap')) {
+ $this->setErrors(0, 'ldap extension not loaded');
+ return $authenticated;
+ }
+ $ds = ldap_connect($this->ldap_server, $this->ldap_port);
+ if ($ds) {
+ @ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, $this->ldap_version);
+ // If the uid is not in the DN we proceed to a search
+ // The uid is not always in the dn
+ if (!$this->ldap_uid_asdn) {
+ // Bind with the manager
+ if (!ldap_bind($ds, $this->ldap_manager_dn, stripslashes($this->ldap_manager_pass))) {
+ $this->setErrors(ldap_errno($ds), $this->ldap_manager_dn);
+ return $authenticated;
+ }
+ $sr = ldap_search($ds, $this->ldap_base_dn,$this->ldap_uid_attr."=".$uname,Array($this->ldap_mail_attr,$this->ldap_name_attr,$this->ldap_surname_attr,$this->ldap_givenname_attr));
+ $info = ldap_get_entries($ds, $sr);
+ if ($info["count"] > 0) {
+ $userDN = $info[0]['dn'];
+ }
+ }
+ else {
+ $userDN = $this->ldap_uid_attr."=".$uname.",".$this->ldap_base_dn;
+ }
+ // We bind as user
+ $ldapbind = ldap_bind($ds, $userDN, stripslashes($pwd));
+ if ($ldapbind) {
+ $authenticated = true;
+ }
+ if (!$authenticated) {
+ $this->setErrors(ldap_errno($ds), $userDN);
+ }
+ @ldap_close($ds);
+ }
+ else {
+ $this->setErrors(0, "Could not connect to LDAP server.");
+ }
+ return $authenticated;
+ }
+
+} // end class
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/auth/auth_ldap.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/auth/auth_xoops.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/auth/auth_xoops.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/auth/auth_xoops.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,68 @@
+<?php
+// $Id$
+// auth_xoops.php - XOOPS authentification class
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package kernel
+ * @subpackage auth
+ *
+ * @author Pierre-Eric MENUET <pemphp at free.fr>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsAuthXoops extends XoopsAuth {
+
+
+ /**
+ * Authentication Service constructor
+ */
+ function XoopsAuthXoops (&$dao) {
+ $this->_dao = $dao;
+ }
+
+ /**
+ * Authenticate user
+ *
+ * @param string $uname
+ * @param string $pwd
+ *
+ * @return bool
+ */
+ function authenticate($uname, $pwd = null) {
+ $member_handler =& xoops_gethandler('member');
+ $user =& $member_handler->loginUser($uname, $pwd);
+ if(!is_object($user)){
+ $this->setErrors(0,_ER_US_SORRYNOTFOUND);
+ return false;
+ }
+ return true;
+ //return is_object($user);
+ }
+
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/auth/auth_xoops.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/auth/authfactory.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/auth/authfactory.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/auth/authfactory.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,52 @@
+<?php
+class XoopsAuthFactory
+{
+
+ function XoopsAuthFactory()
+ {
+ }
+
+ /**
+ * Get a reference to the only instance of authentication class
+ *
+ * if the class has not been instantiated yet, this will also take
+ * care of that
+ *
+ * @static
+ * @return object Reference to the only instance of authentication class
+ */
+ function &getAuthConnection()
+ {
+ static $auth_instance;
+ if (!isset($auth_instance)) {
+ $config_handler =& xoops_gethandler('config');
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('conf_name', 'auth_method'));
+ $config =& $config_handler->getConfigs($criteria);
+ require_once XOOPS_ROOT_PATH.'/class/auth/auth.php';
+ if (!$config) { // If there is a config error, we use xoops
+ $xoops_auth_method = 'xoops';
+ } else {
+ $xoops_auth_method = $config[0]->getConfValueForOutput();
+ if(!is_readable(XOOPS_ROOT_PATH.'/class/auth/auth_' . $xoops_auth_method . '.php')){
+ $xoops_auth_method = 'xoops';
+ }
+ }
+ $file = XOOPS_ROOT_PATH.'/class/auth/auth_' . $xoops_auth_method . '.php';
+ require_once $file;
+ $class = 'XoopsAuth' . ucfirst($xoops_auth_method);
+ switch ($xoops_auth_method) {
+ case 'xoops' :
+ $dao =& $GLOBALS['xoopsDB'];
+ break;
+ case 'ldap' :
+ $dao = null;
+ break;
+ }
+ $auth_instance = new $class($dao);
+ }
+ return $auth_instance;
+ }
+
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/auth/authfactory.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/auth/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/auth/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/auth/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/auth/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-blue.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-blue.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-blue.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,233 @@
+/* The main calendar widget. DIV containing a table. */
+
+div.calendar { position: relative; }
+
+.calendar, .calendar table {
+ border: 1px solid #556;
+ font-size: 11px;
+ color: #000;
+ cursor: default;
+ background: #eef;
+ font-family: tahoma,verdana,sans-serif;
+ width: 1%;
+}
+
+/* Header part -- contains navigation buttons and day names. */
+
+.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
+ text-align: center; /* They are the navigation buttons */
+ padding: 2px; /* Make the buttons seem like they're pressing */
+}
+
+.calendar .nav {
+ background: #778 url(menuarrow.gif) no-repeat 100% 100%;
+}
+
+.calendar thead .title { /* This holds the current "month, year" */
+ font-weight: bold; /* Pressing it will take you to the current date */
+ text-align: center;
+ background: #fff;
+ color: #000;
+ padding: 2px;
+}
+
+.calendar thead .headrow { /* Row <TR> containing navigation buttons */
+ background: #778;
+ color: #fff;
+}
+
+.calendar thead .daynames { /* Row <TR> containing the day names */
+ background: #bdf;
+}
+
+.calendar thead .name { /* Cells <TD> containing the day names */
+ border-bottom: 1px solid #556;
+ padding: 2px;
+ text-align: center;
+ color: #000;
+}
+
+.calendar thead .weekend { /* How a weekend day name shows in header */
+ color: #a66;
+}
+
+.calendar thead .hilite { /* How do the buttons in header appear when hover */
+ background-color: #aaf;
+ color: #000;
+ border: 1px solid #04f;
+ padding: 1px;
+}
+
+.calendar thead .active { /* Active (pressed) buttons in header */
+ background-color: #77c;
+ padding: 2px 0px 0px 2px;
+}
+
+/* The body part -- contains all the days in month. */
+
+.calendar tbody .day { /* Cells <TD> containing month days dates */
+ width: 2em;
+ color: #456;
+ text-align: right;
+ padding: 2px 4px 2px 2px;
+}
+.calendar tbody .day.othermonth {
+ font-size: 80%;
+ color: #bbb;
+}
+.calendar tbody .day.othermonth.oweekend {
+ color: #fbb;
+}
+
+.calendar table .wn {
+ padding: 2px 3px 2px 2px;
+ border-right: 1px solid #000;
+ background: #bdf;
+}
+
+.calendar tbody .rowhilite td {
+ background: #def;
+}
+
+.calendar tbody .rowhilite td.wn {
+ background: #eef;
+}
+
+.calendar tbody td.hilite { /* Hovered cells <TD> */
+ background: #def;
+ padding: 1px 3px 1px 1px;
+ border: 1px solid #bbb;
+}
+
+.calendar tbody td.active { /* Active (pressed) cells <TD> */
+ background: #cde;
+ padding: 2px 2px 0px 2px;
+}
+
+.calendar tbody td.selected { /* Cell showing today date */
+ font-weight: bold;
+ border: 1px solid #000;
+ padding: 1px 3px 1px 1px;
+ background: #fff;
+ color: #000;
+}
+
+.calendar tbody td.weekend { /* Cells showing weekend days */
+ color: #a66;
+}
+
+.calendar tbody td.today { /* Cell showing selected date */
+ font-weight: bold;
+ color: #00f;
+}
+
+.calendar tbody .disabled { color: #999; }
+
+.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
+ visibility: hidden;
+}
+
+.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
+ display: none;
+}
+
+/* The footer part -- status bar and "Close" button */
+
+.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
+ text-align: center;
+ background: #556;
+ color: #fff;
+}
+
+.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
+ background: #fff;
+ color: #445;
+ border-top: 1px solid #556;
+ padding: 1px;
+}
+
+.calendar tfoot .hilite { /* Hover style for buttons in footer */
+ background: #aaf;
+ border: 1px solid #04f;
+ color: #000;
+ padding: 1px;
+}
+
+.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
+ background: #77c;
+ padding: 2px 0px 0px 2px;
+}
+
+/* Combo boxes (menus that display months/years for direct selection) */
+
+.calendar .combo {
+ position: absolute;
+ display: none;
+ top: 0px;
+ left: 0px;
+ width: 4em;
+ cursor: default;
+ border: 1px solid #655;
+ background: #def;
+ color: #000;
+ font-size: 90%;
+ z-index: 100;
+}
+
+.calendar .combo .label,
+.calendar .combo .label-IEfix {
+ text-align: center;
+ padding: 1px;
+}
+
+.calendar .combo .label-IEfix {
+ width: 4em;
+}
+
+.calendar .combo .hilite {
+ background: #acf;
+}
+
+.calendar .combo .active {
+ border-top: 1px solid #46a;
+ border-bottom: 1px solid #46a;
+ background: #eef;
+ font-weight: bold;
+}
+
+.calendar td.time {
+ border-top: 1px solid #000;
+ padding: 1px 0px;
+ text-align: center;
+ background-color: #f4f0e8;
+}
+
+.calendar td.time .hour,
+.calendar td.time .minute,
+.calendar td.time .ampm {
+ padding: 0px 3px 0px 4px;
+ border: 1px solid #889;
+ font-weight: bold;
+ background-color: #fff;
+}
+
+.calendar td.time .ampm {
+ text-align: center;
+}
+
+.calendar td.time .colon {
+ padding: 0px 2px 0px 3px;
+ font-weight: bold;
+}
+
+.calendar td.time span.hilite {
+ border-color: #000;
+ background-color: #667;
+ color: #fff;
+}
+
+.calendar td.time span.active {
+ border-color: #f00;
+ background-color: #000;
+ color: #0f0;
+}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-blue.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-blue2.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-blue2.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-blue2.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,237 @@
+/* The main calendar widget. DIV containing a table. */
+
+div.calendar { position: relative; }
+
+.calendar, .calendar table {
+ border: 1px solid #206A9B;
+ font-size: 11px;
+ color: #000;
+ cursor: default;
+ background: #F1F8FC;
+ font-family: tahoma,verdana,sans-serif;
+ width: 1%;
+}
+
+/* Header part -- contains navigation buttons and day names. */
+
+.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
+ text-align: center; /* They are the navigation buttons */
+ padding: 2px; /* Make the buttons seem like they're pressing */
+}
+
+.calendar .nav {
+ background: #007ED1 url(menuarrow2.gif) no-repeat 100% 100%;
+}
+
+.calendar thead .title { /* This holds the current "month, year" */
+ font-weight: bold; /* Pressing it will take you to the current date */
+ text-align: center;
+ background: #000;
+ color: #fff;
+ padding: 2px;
+}
+
+.calendar thead tr { /* Row <TR> containing navigation buttons */
+ background: #007ED1;
+ color: #fff;
+}
+
+.calendar thead .daynames { /* Row <TR> containing the day names */
+ background: #C7E1F3;
+}
+
+.calendar thead .name { /* Cells <TD> containing the day names */
+ border-bottom: 1px solid #206A9B;
+ padding: 2px;
+ text-align: center;
+ color: #000;
+}
+
+.calendar thead .weekend { /* How a weekend day name shows in header */
+ color: #a66;
+}
+
+.calendar thead .hilite { /* How do the buttons in header appear when hover */
+ background-color: #34ABFA;
+ color: #000;
+ border: 1px solid #016DC5;
+ padding: 1px;
+}
+
+.calendar thead .active { /* Active (pressed) buttons in header */
+ background-color: #006AA9;
+ border: 1px solid #008AFF;
+ padding: 2px 0px 0px 2px;
+}
+
+/* The body part -- contains all the days in month. */
+
+.calendar tbody .day { /* Cells <TD> containing month days dates */
+ width: 2em;
+ color: #456;
+ text-align: right;
+ padding: 2px 4px 2px 2px;
+}
+.calendar tbody .day.othermonth {
+ font-size: 80%;
+ color: #bbb;
+}
+.calendar tbody .day.othermonth.oweekend {
+ color: #fbb;
+}
+
+.calendar table .wn {
+ padding: 2px 3px 2px 2px;
+ border-right: 1px solid #000;
+ background: #C7E1F3;
+}
+
+.calendar tbody .rowhilite td {
+ background: #def;
+}
+
+.calendar tbody .rowhilite td.wn {
+ background: #F1F8FC;
+}
+
+.calendar tbody td.hilite { /* Hovered cells <TD> */
+ background: #def;
+ padding: 1px 3px 1px 1px;
+ border: 1px solid #8FC4E8;
+}
+
+.calendar tbody td.active { /* Active (pressed) cells <TD> */
+ background: #cde;
+ padding: 2px 2px 0px 2px;
+}
+
+.calendar tbody td.selected { /* Cell showing today date */
+ font-weight: bold;
+ border: 1px solid #000;
+ padding: 1px 3px 1px 1px;
+ background: #fff;
+ color: #000;
+}
+
+.calendar tbody td.weekend { /* Cells showing weekend days */
+ color: #a66;
+}
+
+.calendar tbody td.today { /* Cell showing selected date */
+ font-weight: bold;
+ color: #D50000;
+}
+
+.calendar tbody .disabled { color: #999; }
+
+.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
+ visibility: hidden;
+}
+
+.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
+ display: none;
+}
+
+/* The footer part -- status bar and "Close" button */
+
+.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
+ text-align: center;
+ background: #206A9B;
+ color: #fff;
+}
+
+.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
+ background: #000;
+ color: #fff;
+ border-top: 1px solid #206A9B;
+ padding: 1px;
+}
+
+.calendar tfoot .hilite { /* Hover style for buttons in footer */
+ background: #B8DAF0;
+ border: 1px solid #178AEB;
+ color: #000;
+ padding: 1px;
+}
+
+.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
+ background: #006AA9;
+ padding: 2px 0px 0px 2px;
+}
+
+/* Combo boxes (menus that display months/years for direct selection) */
+
+.calendar .combo {
+ position: absolute;
+ display: none;
+ top: 0px;
+ left: 0px;
+ width: 4em;
+ cursor: default;
+ border: 1px solid #655;
+ background: #def;
+ color: #000;
+ font-size: 90%;
+ z-index: 100;
+}
+
+.calendar .combo .label,
+.calendar .combo .label-IEfix {
+ text-align: center;
+ padding: 1px;
+}
+
+.calendar .combo .label-IEfix {
+ width: 4em;
+}
+
+.calendar .combo .hilite {
+ background: #34ABFA;
+ border-top: 1px solid #46a;
+ border-bottom: 1px solid #46a;
+ font-weight: bold;
+}
+
+.calendar .combo .active {
+ border-top: 1px solid #46a;
+ border-bottom: 1px solid #46a;
+ background: #F1F8FC;
+ font-weight: bold;
+}
+
+.calendar td.time {
+ border-top: 1px solid #000;
+ padding: 1px 0px;
+ text-align: center;
+ background-color: #E3F0F9;
+}
+
+.calendar td.time .hour,
+.calendar td.time .minute,
+.calendar td.time .ampm {
+ padding: 0px 3px 0px 4px;
+ border: 1px solid #889;
+ font-weight: bold;
+ background-color: #F1F8FC;
+}
+
+.calendar td.time .ampm {
+ text-align: center;
+}
+
+.calendar td.time .colon {
+ padding: 0px 2px 0px 3px;
+ font-weight: bold;
+}
+
+.calendar td.time span.hilite {
+ border-color: #000;
+ background-color: #267DB7;
+ color: #fff;
+}
+
+.calendar td.time span.active {
+ border-color: red;
+ background-color: #000;
+ color: #A5FF00;
+}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-blue2.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-brown.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-brown.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-brown.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,226 @@
+/* The main calendar widget. DIV containing a table. */
+
+div.calendar { position: relative; }
+
+.calendar, .calendar table {
+ border: 1px solid #655;
+ font-size: 11px;
+ color: #000;
+ cursor: default;
+ background: #ffd;
+ font-family: tahoma,verdana,sans-serif;
+ width: 1%;
+}
+
+/* Header part -- contains navigation buttons and day names. */
+
+.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
+ text-align: center; /* They are the navigation buttons */
+ padding: 2px; /* Make the buttons seem like they're pressing */
+}
+
+.calendar .nav {
+ background: #edc url(menuarrow.gif) no-repeat 100% 100%;
+}
+
+.calendar thead .title { /* This holds the current "month, year" */
+ font-weight: bold; /* Pressing it will take you to the current date */
+ text-align: center;
+ background: #654;
+ color: #fed;
+ padding: 2px;
+}
+
+.calendar thead .headrow { /* Row <TR> containing navigation buttons */
+ background: #edc;
+ color: #000;
+}
+
+.calendar thead .name { /* Cells <TD> containing the day names */
+ border-bottom: 1px solid #655;
+ padding: 2px;
+ text-align: center;
+ color: #000;
+}
+
+.calendar thead .weekend { /* How a weekend day name shows in header */
+ color: #f00;
+}
+
+.calendar thead .hilite { /* How do the buttons in header appear when hover */
+ background-color: #faa;
+ color: #000;
+ border: 1px solid #f40;
+ padding: 1px;
+}
+
+.calendar thead .active { /* Active (pressed) buttons in header */
+ background-color: #c77;
+ padding: 2px 0px 0px 2px;
+}
+
+.calendar thead .daynames { /* Row <TR> containing the day names */
+ background: #fed;
+}
+
+/* The body part -- contains all the days in month. */
+
+.calendar tbody .day { /* Cells <TD> containing month days dates */
+ width: 2em;
+ text-align: right;
+ padding: 2px 4px 2px 2px;
+}
+.calendar tbody .day.othermonth {
+ font-size: 80%;
+ color: #bbb;
+}
+.calendar tbody .day.othermonth.oweekend {
+ color: #fbb;
+}
+
+.calendar table .wn {
+ padding: 2px 3px 2px 2px;
+ border-right: 1px solid #000;
+ background: #fed;
+}
+
+.calendar tbody .rowhilite td {
+ background: #ddf;
+}
+
+.calendar tbody .rowhilite td.wn {
+ background: #efe;
+}
+
+.calendar tbody td.hilite { /* Hovered cells <TD> */
+ background: #ffe;
+ padding: 1px 3px 1px 1px;
+ border: 1px solid #bbb;
+}
+
+.calendar tbody td.active { /* Active (pressed) cells <TD> */
+ background: #ddc;
+ padding: 2px 2px 0px 2px;
+}
+
+.calendar tbody td.selected { /* Cell showing today date */
+ font-weight: bold;
+ border: 1px solid #000;
+ padding: 1px 3px 1px 1px;
+ background: #fea;
+}
+
+.calendar tbody td.weekend { /* Cells showing weekend days */
+ color: #f00;
+}
+
+.calendar tbody td.today { font-weight: bold; }
+
+.calendar tbody .disabled { color: #999; }
+
+.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
+ visibility: hidden;
+}
+
+.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
+ display: none;
+}
+
+/* The footer part -- status bar and "Close" button */
+
+.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
+ text-align: center;
+ background: #988;
+ color: #000;
+}
+
+.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
+ border-top: 1px solid #655;
+ background: #dcb;
+ color: #840;
+}
+
+.calendar tfoot .hilite { /* Hover style for buttons in footer */
+ background: #faa;
+ border: 1px solid #f40;
+ padding: 1px;
+}
+
+.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
+ background: #c77;
+ padding: 2px 0px 0px 2px;
+}
+
+/* Combo boxes (menus that display months/years for direct selection) */
+
+.calendar .combo {
+ position: absolute;
+ display: none;
+ top: 0px;
+ left: 0px;
+ width: 4em;
+ cursor: default;
+ border: 1px solid #655;
+ background: #ffe;
+ color: #000;
+ font-size: 90%;
+ z-index: 100;
+}
+
+.calendar .combo .label,
+.calendar .combo .label-IEfix {
+ text-align: center;
+ padding: 1px;
+}
+
+.calendar .combo .label-IEfix {
+ width: 4em;
+}
+
+.calendar .combo .hilite {
+ background: #fc8;
+}
+
+.calendar .combo .active {
+ border-top: 1px solid #a64;
+ border-bottom: 1px solid #a64;
+ background: #fee;
+ font-weight: bold;
+}
+
+.calendar td.time {
+ border-top: 1px solid #a88;
+ padding: 1px 0px;
+ text-align: center;
+ background-color: #fed;
+}
+
+.calendar td.time .hour,
+.calendar td.time .minute,
+.calendar td.time .ampm {
+ padding: 0px 3px 0px 4px;
+ border: 1px solid #988;
+ font-weight: bold;
+ background-color: #fff;
+}
+
+.calendar td.time .ampm {
+ text-align: center;
+}
+
+.calendar td.time .colon {
+ padding: 0px 2px 0px 3px;
+ font-weight: bold;
+}
+
+.calendar td.time span.hilite {
+ border-color: #000;
+ background-color: #866;
+ color: #fff;
+}
+
+.calendar td.time span.active {
+ border-color: #f00;
+ background-color: #000;
+ color: #0f0;
+}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-brown.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-green.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-green.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-green.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,230 @@
+/* The main calendar widget. DIV containing a table. */
+
+div.calendar { position: relative; }
+
+.calendar, .calendar table {
+ border: 1px solid #565;
+ font-size: 11px;
+ color: #000;
+ cursor: default;
+ background: #efe;
+ font-family: tahoma,verdana,sans-serif;
+ width: 1%;
+}
+
+/* Header part -- contains navigation buttons and day names. */
+
+.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
+ text-align: center; /* They are the navigation buttons */
+ padding: 2px; /* Make the buttons seem like they're pressing */
+ background: #676;
+ color: #fff;
+ font-size: 90%;
+}
+
+.calendar .nav {
+ background: #676 url(menuarrow.gif) no-repeat 100% 100%;
+}
+
+.calendar thead .title { /* This holds the current "month, year" */
+ font-weight: bold; /* Pressing it will take you to the current date */
+ text-align: center;
+ padding: 2px;
+ background: #250;
+ color: #efa;
+}
+
+.calendar thead .headrow { /* Row <TR> containing navigation buttons */
+}
+
+.calendar thead .name { /* Cells <TD> containing the day names */
+ border-bottom: 1px solid #565;
+ padding: 2px;
+ text-align: center;
+ color: #000;
+}
+
+.calendar thead .weekend { /* How a weekend day name shows in header */
+ color: #a66;
+}
+
+.calendar thead .hilite { /* How do the buttons in header appear when hover */
+ background-color: #afa;
+ color: #000;
+ border: 1px solid #084;
+ padding: 1px;
+}
+
+.calendar thead .active { /* Active (pressed) buttons in header */
+ background-color: #7c7;
+ padding: 2px 0px 0px 2px;
+}
+
+.calendar thead .daynames { /* Row <TR> containing the day names */
+ background: #dfb;
+}
+
+/* The body part -- contains all the days in month. */
+
+.calendar tbody .day { /* Cells <TD> containing month days dates */
+ width: 2em;
+ color: #564;
+ text-align: right;
+ padding: 2px 4px 2px 2px;
+}
+.calendar tbody .day.othermonth {
+ font-size: 80%;
+ color: #bbb;
+}
+.calendar tbody .day.othermonth.oweekend {
+ color: #fbb;
+}
+
+.calendar table .wn {
+ padding: 2px 3px 2px 2px;
+ border-right: 1px solid #8a8;
+ background: #dfb;
+}
+
+.calendar tbody .rowhilite td {
+ background: #dfd;
+}
+
+.calendar tbody .rowhilite td.wn {
+ background: #efe;
+}
+
+.calendar tbody td.hilite { /* Hovered cells <TD> */
+ background: #efd;
+ padding: 1px 3px 1px 1px;
+ border: 1px solid #bbb;
+}
+
+.calendar tbody td.active { /* Active (pressed) cells <TD> */
+ background: #dec;
+ padding: 2px 2px 0px 2px;
+}
+
+.calendar tbody td.selected { /* Cell showing today date */
+ font-weight: bold;
+ border: 1px solid #000;
+ padding: 1px 3px 1px 1px;
+ background: #f8fff8;
+ color: #000;
+}
+
+.calendar tbody td.weekend { /* Cells showing weekend days */
+ color: #a66;
+}
+
+.calendar tbody td.today { font-weight: bold; color: #0a0; }
+
+.calendar tbody .disabled { color: #999; }
+
+.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
+ visibility: hidden;
+}
+
+.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
+ display: none;
+}
+
+/* The footer part -- status bar and "Close" button */
+
+.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
+ text-align: center;
+ background: #565;
+ color: #fff;
+}
+
+.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
+ padding: 2px;
+ background: #250;
+ color: #efa;
+}
+
+.calendar tfoot .hilite { /* Hover style for buttons in footer */
+ background: #afa;
+ border: 1px solid #084;
+ color: #000;
+ padding: 1px;
+}
+
+.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
+ background: #7c7;
+ padding: 2px 0px 0px 2px;
+}
+
+/* Combo boxes (menus that display months/years for direct selection) */
+
+.calendar .combo {
+ position: absolute;
+ display: none;
+ top: 0px;
+ left: 0px;
+ width: 4em;
+ cursor: default;
+ border: 1px solid #565;
+ background: #efd;
+ color: #000;
+ font-size: 90%;
+ z-index: 100;
+}
+
+.calendar .combo .label,
+.calendar .combo .label-IEfix {
+ text-align: center;
+ padding: 1px;
+}
+
+.calendar .combo .label-IEfix {
+ width: 4em;
+}
+
+.calendar .combo .hilite {
+ background: #af8;
+}
+
+.calendar .combo .active {
+ border-top: 1px solid #6a4;
+ border-bottom: 1px solid #6a4;
+ background: #efe;
+ font-weight: bold;
+}
+
+.calendar td.time {
+ border-top: 1px solid #8a8;
+ padding: 1px 0px;
+ text-align: center;
+ background-color: #dfb;
+}
+
+.calendar td.time .hour,
+.calendar td.time .minute,
+.calendar td.time .ampm {
+ padding: 0px 3px 0px 4px;
+ border: 1px solid #898;
+ font-weight: bold;
+ background-color: #fff;
+}
+
+.calendar td.time .ampm {
+ text-align: center;
+}
+
+.calendar td.time .colon {
+ padding: 0px 2px 0px 3px;
+ font-weight: bold;
+}
+
+.calendar td.time span.hilite {
+ border-color: #000;
+ background-color: #686;
+ color: #fff;
+}
+
+.calendar td.time span.active {
+ border-color: #f00;
+ background-color: #000;
+ color: #0f0;
+}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-green.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-system.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-system.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-system.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,252 @@
+/* The main calendar widget. DIV containing a table. */
+
+.calendar {
+ position: relative;
+ display: none;
+ border: 1px solid;
+ border-color: #fff #000 #000 #fff;
+ font-size: 11px;
+ cursor: default;
+ background: Window;
+ color: WindowText;
+ font-family: tahoma,verdana,sans-serif;
+ width: 1%;
+}
+
+.calendar table {
+ border: 1px solid;
+ border-color: #fff #000 #000 #fff;
+ font-size: 11px;
+ cursor: default;
+ background: Window;
+ color: WindowText;
+ font-family: tahoma,verdana,sans-serif;
+}
+
+/* Header part -- contains navigation buttons and day names. */
+
+.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
+ text-align: center;
+ padding: 1px;
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+ background: ButtonFace;
+}
+
+.calendar .nav {
+ background: ButtonFace url(menuarrow.gif) no-repeat 100% 100%;
+}
+
+.calendar thead .title { /* This holds the current "month, year" */
+ font-weight: bold;
+ padding: 1px;
+ border: 1px solid #000;
+ background: ActiveCaption;
+ color: CaptionText;
+ text-align: center;
+}
+
+.calendar thead .headrow { /* Row <TR> containing navigation buttons */
+}
+
+.calendar thead .daynames { /* Row <TR> containing the day names */
+}
+
+.calendar thead .name { /* Cells <TD> containing the day names */
+ border-bottom: 1px solid ButtonShadow;
+ padding: 2px;
+ text-align: center;
+ background: ButtonFace;
+ color: ButtonText;
+}
+
+.calendar thead .weekend { /* How a weekend day name shows in header */
+ color: #f00;
+}
+
+.calendar thead .hilite { /* How do the buttons in header appear when hover */
+ border: 2px solid;
+ padding: 0px;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+}
+
+.calendar thead .active { /* Active (pressed) buttons in header */
+ border-width: 1px;
+ padding: 2px 0px 0px 2px;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+
+/* The body part -- contains all the days in month. */
+
+.calendar tbody .day { /* Cells <TD> containing month days dates */
+ width: 2em;
+ text-align: right;
+ padding: 2px 4px 2px 2px;
+}
+.calendar tbody .day.othermonth {
+ font-size: 80%;
+ color: #aaa;
+}
+.calendar tbody .day.othermonth.oweekend {
+ color: #faa;
+}
+
+.calendar table .wn {
+ padding: 2px 3px 2px 2px;
+ border-right: 1px solid ButtonShadow;
+ background: ButtonFace;
+ color: ButtonText;
+}
+
+.calendar tbody .rowhilite td {
+ background: Highlight;
+ color: HighlightText;
+}
+
+.calendar tbody td.hilite { /* Hovered cells <TD> */
+ padding: 1px 3px 1px 1px;
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+}
+
+.calendar tbody td.active { /* Active (pressed) cells <TD> */
+ padding: 2px 2px 0px 2px;
+ border: 1px solid;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+
+.calendar tbody td.selected { /* Cell showing selected date */
+ font-weight: bold;
+ border: 1px solid;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+ padding: 2px 2px 0px 2px;
+ background: ButtonFace;
+ color: ButtonText;
+}
+
+.calendar tbody td.weekend { /* Cells showing weekend days */
+ color: #f00;
+}
+
+.calendar tbody td.today { /* Cell showing today date */
+ font-weight: bold;
+ color: #00f;
+}
+
+.calendar tbody td.disabled { color: GrayText; }
+
+.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
+ visibility: hidden;
+}
+
+.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
+ display: none;
+}
+
+/* The footer part -- status bar and "Close" button */
+
+.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
+}
+
+.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
+ background: ButtonFace;
+ padding: 1px;
+ border: 1px solid;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+ color: ButtonText;
+ text-align: center;
+}
+
+.calendar tfoot .hilite { /* Hover style for buttons in footer */
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+ padding: 1px;
+ background: #e4e0d8;
+}
+
+.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
+ padding: 2px 0px 0px 2px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+}
+
+/* Combo boxes (menus that display months/years for direct selection) */
+
+.calendar .combo {
+ position: absolute;
+ display: none;
+ width: 4em;
+ top: 0px;
+ left: 0px;
+ cursor: default;
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+ background: Menu;
+ color: MenuText;
+ font-size: 90%;
+ padding: 1px;
+ z-index: 100;
+}
+
+.calendar .combo .label,
+.calendar .combo .label-IEfix {
+ text-align: center;
+ padding: 1px;
+}
+
+.calendar .combo .label-IEfix {
+ width: 4em;
+}
+
+.calendar .combo .active {
+ padding: 0px;
+ border: 1px solid #000;
+}
+
+.calendar .combo .hilite {
+ background: Highlight;
+ color: HighlightText;
+}
+
+.calendar td.time {
+ border-top: 1px solid ButtonShadow;
+ padding: 1px 0px;
+ text-align: center;
+ background-color: ButtonFace;
+}
+
+.calendar td.time .hour,
+.calendar td.time .minute,
+.calendar td.time .ampm {
+ padding: 0px 3px 0px 4px;
+ border: 1px solid #889;
+ font-weight: bold;
+ background-color: Menu;
+}
+
+.calendar td.time .ampm {
+ text-align: center;
+}
+
+.calendar td.time .colon {
+ padding: 0px 2px 0px 3px;
+ font-weight: bold;
+}
+
+.calendar td.time span.hilite {
+ border-color: #000;
+ background-color: Highlight;
+ color: HighlightText;
+}
+
+.calendar td.time span.active {
+ border-color: #f00;
+ background-color: #000;
+ color: #0f0;
+}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-system.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-tas.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-tas.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-tas.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,240 @@
+/* The main calendar widget. DIV containing a table. */
+
+div.calendar { position: relative; }
+
+.calendar, .calendar table {
+ border: 1px solid #655;
+ font-size: 11px;
+ color: #000;
+ cursor: default;
+ background: #ffd;
+ font-family: tahoma,verdana,sans-serif;
+ filter:
+progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#DDDCCC,EndColorStr=#FFFFFF);
+ width: 1%;
+}
+
+/* Header part -- contains navigation buttons and day names. */
+
+.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
+ text-align: center; /* They are the navigation buttons */
+ padding: 2px; /* Make the buttons seem like they're pressing */
+ color:#363636;
+}
+
+.calendar .nav {
+ background: #edc url(menuarrow.gif) no-repeat 100% 100%;
+}
+
+.calendar thead .title { /* This holds the current "month, year" */
+ font-weight: bold; /* Pressing it will take you to the current date */
+ text-align: center;
+ background: #654;
+ color: #363636;
+ padding: 2px;
+ filter:
+progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#ffffff,EndColorStr=#dddccc);
+}
+
+.calendar thead .headrow { /* Row <TR> containing navigation buttons */
+ /*background: #3B86A0;*/
+ color: #363636;
+ font-weight: bold;
+filter:
+progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#ffffff,EndColorStr=#3b86a0);
+}
+
+.calendar thead .name { /* Cells <TD> containing the day names */
+ border-bottom: 1px solid #655;
+ padding: 2px;
+ text-align: center;
+ color: #363636;
+ filter:
+progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#DDDCCC,EndColorStr=#FFFFFF);
+}
+
+.calendar thead .weekend { /* How a weekend day name shows in header */
+ color: #f00;
+}
+
+.calendar thead .hilite { /* How do the buttons in header appear when hover */
+ background-color: #ffcc86;
+ color: #000;
+ border: 1px solid #b59345;
+ padding: 1px;
+}
+
+.calendar thead .active { /* Active (pressed) buttons in header */
+ background-color: #c77;
+ padding: 2px 0px 0px 2px;
+}
+
+.calendar thead .daynames { /* Row <TR> containing the day names */
+ background: #fed;
+}
+
+/* The body part -- contains all the days in month. */
+
+.calendar tbody .day { /* Cells <TD> containing month days dates */
+ width: 2em;
+ text-align: right;
+ padding: 2px 4px 2px 2px;
+}
+.calendar tbody .day.othermonth {
+ font-size: 80%;
+ color: #aaa;
+}
+.calendar tbody .day.othermonth.oweekend {
+ color: #faa;
+}
+
+.calendar table .wn {
+ padding: 2px 3px 2px 2px;
+ border-right: 1px solid #000;
+ background: #fed;
+}
+
+.calendar tbody .rowhilite td {
+ background: #ddf;
+
+}
+
+.calendar tbody .rowhilite td.wn {
+ background: #efe;
+}
+
+.calendar tbody td.hilite { /* Hovered cells <TD> */
+ background: #ffe;
+ padding: 1px 3px 1px 1px;
+ border: 1px solid #bbb;
+}
+
+.calendar tbody td.active { /* Active (pressed) cells <TD> */
+ background: #ddc;
+ padding: 2px 2px 0px 2px;
+}
+
+.calendar tbody td.selected { /* Cell showing today date */
+ font-weight: bold;
+ border: 1px solid #000;
+ padding: 1px 3px 1px 1px;
+ background: #fea;
+}
+
+.calendar tbody td.weekend { /* Cells showing weekend days */
+ color: #f00;
+}
+
+.calendar tbody td.today { font-weight: bold; }
+
+.calendar tbody .disabled { color: #999; }
+
+.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
+ visibility: hidden;
+}
+
+.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
+ display: none;
+}
+
+/* The footer part -- status bar and "Close" button */
+
+.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
+ text-align: center;
+ background: #988;
+ color: #000;
+
+}
+
+.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
+ border-top: 1px solid #655;
+ background: #dcb;
+ color: #363636;
+ font-weight: bold;
+ filter:
+progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#FFFFFF,EndColorStr=#DDDCCC);
+}
+.calendar tfoot .hilite { /* Hover style for buttons in footer */
+ background: #faa;
+ border: 1px solid #f40;
+ padding: 1px;
+}
+
+.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
+ background: #c77;
+ padding: 2px 0px 0px 2px;
+}
+
+/* Combo boxes (menus that display months/years for direct selection) */
+
+.combo {
+ position: absolute;
+ display: none;
+ top: 0px;
+ left: 0px;
+ width: 4em;
+ cursor: default;
+ border: 1px solid #655;
+ background: #ffe;
+ color: #000;
+ font-size: smaller;
+ z-index: 100;
+}
+
+.combo .label,
+.combo .label-IEfix {
+ text-align: center;
+ padding: 1px;
+}
+
+.combo .label-IEfix {
+ width: 4em;
+}
+
+.combo .hilite {
+ background: #fc8;
+}
+
+.combo .active {
+ border-top: 1px solid #a64;
+ border-bottom: 1px solid #a64;
+ background: #fee;
+ font-weight: bold;
+}
+
+.calendar td.time {
+ border-top: 1px solid #a88;
+ padding: 1px 0px;
+ text-align: center;
+ background-color: #fed;
+}
+
+.calendar td.time .hour,
+.calendar td.time .minute,
+.calendar td.time .ampm {
+ padding: 0px 3px 0px 4px;
+ border: 1px solid #988;
+ font-weight: bold;
+ background-color: #fff;
+}
+
+.calendar td.time .ampm {
+ text-align: center;
+}
+
+.calendar td.time .colon {
+ padding: 0px 2px 0px 3px;
+ font-weight: bold;
+}
+
+.calendar td.time span.hilite {
+ border-color: #000;
+ background-color: #866;
+ color: #fff;
+}
+
+.calendar td.time span.active {
+ border-color: #f00;
+ background-color: #000;
+ color: #0f0;
+}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-tas.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-1.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-1.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-1.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,272 @@
+/* The main calendar widget. DIV containing a table. */
+
+.calendar {
+ position: relative;
+ display: none;
+ border-top: 2px solid #fff;
+ border-right: 2px solid #000;
+ border-bottom: 2px solid #000;
+ border-left: 2px solid #fff;
+ font-size: 11px;
+ color: #000;
+ cursor: default;
+ background: #d4d0c8;
+ font-family: tahoma,verdana,sans-serif;
+ width: 1%;
+}
+
+.calendar table {
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+ font-size: 11px;
+ color: #000;
+ cursor: default;
+ background: #d4d0c8;
+ font-family: tahoma,verdana,sans-serif;
+}
+
+/* Header part -- contains navigation buttons and day names. */
+
+.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
+ text-align: center;
+ padding: 1px;
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+}
+
+.calendar .nav {
+ background: transparent url(menuarrow.gif) no-repeat 100% 100%;
+}
+
+.calendar thead .title { /* This holds the current "month, year" */
+ font-weight: bold;
+ padding: 1px;
+ border: 1px solid #000;
+ background: #848078;
+ color: #fff;
+ text-align: center;
+}
+
+.calendar thead .headrow { /* Row <TR> containing navigation buttons */
+}
+
+.calendar thead .daynames { /* Row <TR> containing the day names */
+}
+
+.calendar thead .name { /* Cells <TD> containing the day names */
+ border-bottom: 1px solid #000;
+ padding: 2px;
+ text-align: center;
+ background: #f4f0e8;
+}
+
+.calendar thead .weekend { /* How a weekend day name shows in header */
+ color: #f00;
+}
+
+.calendar thead .hilite { /* How do the buttons in header appear when hover */
+ border-top: 2px solid #fff;
+ border-right: 2px solid #000;
+ border-bottom: 2px solid #000;
+ border-left: 2px solid #fff;
+ padding: 0px;
+ background-color: #e4e0d8;
+}
+
+.calendar thead .active { /* Active (pressed) buttons in header */
+ padding: 2px 0px 0px 2px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+ background-color: #c4c0b8;
+}
+
+/* The body part -- contains all the days in month. */
+
+.calendar tbody .day { /* Cells <TD> containing month days dates */
+ width: 2em;
+ text-align: right;
+ padding: 2px 4px 2px 2px;
+}
+.calendar tbody .day.othermonth {
+ font-size: 80%;
+ color: #aaa;
+}
+.calendar tbody .day.othermonth.oweekend {
+ color: #faa;
+}
+
+.calendar table .wn {
+ padding: 2px 3px 2px 2px;
+ border-right: 1px solid #000;
+ background: #f4f0e8;
+}
+
+.calendar tbody .rowhilite td {
+ background: #e4e0d8;
+}
+
+.calendar tbody .rowhilite td.wn {
+ background: #d4d0c8;
+}
+
+.calendar tbody td.hilite { /* Hovered cells <TD> */
+ padding: 1px 3px 1px 1px;
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+}
+
+.calendar tbody td.active { /* Active (pressed) cells <TD> */
+ padding: 2px 2px 0px 2px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+}
+
+.calendar tbody td.selected { /* Cell showing selected date */
+ font-weight: bold;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+ padding: 2px 2px 0px 2px;
+ background: #e4e0d8;
+}
+
+.calendar tbody td.weekend { /* Cells showing weekend days */
+ color: #f00;
+}
+
+.calendar tbody td.today { /* Cell showing today date */
+ font-weight: bold;
+ color: #00f;
+}
+
+.calendar tbody .disabled { color: #999; }
+
+.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
+ visibility: hidden;
+}
+
+.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
+ display: none;
+}
+
+/* The footer part -- status bar and "Close" button */
+
+.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
+}
+
+.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
+ background: #f4f0e8;
+ padding: 1px;
+ border: 1px solid #000;
+ background: #848078;
+ color: #fff;
+ text-align: center;
+}
+
+.calendar tfoot .hilite { /* Hover style for buttons in footer */
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+ padding: 1px;
+ background: #e4e0d8;
+}
+
+.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
+ padding: 2px 0px 0px 2px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+}
+
+/* Combo boxes (menus that display months/years for direct selection) */
+
+.calendar .combo {
+ position: absolute;
+ display: none;
+ width: 4em;
+ top: 0px;
+ left: 0px;
+ cursor: default;
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+ background: #e4e0d8;
+ font-size: 90%;
+ padding: 1px;
+ z-index: 100;
+}
+
+.calendar .combo .label,
+.calendar .combo .label-IEfix {
+ text-align: center;
+ padding: 1px;
+}
+
+.calendar .combo .label-IEfix {
+ width: 4em;
+}
+
+.calendar .combo .active {
+ background: #c4c0b8;
+ padding: 0px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+}
+
+.calendar .combo .hilite {
+ background: #048;
+ color: #fea;
+}
+
+.calendar td.time {
+ border-top: 1px solid #000;
+ padding: 1px 0px;
+ text-align: center;
+ background-color: #f4f0e8;
+}
+
+.calendar td.time .hour,
+.calendar td.time .minute,
+.calendar td.time .ampm {
+ padding: 0px 3px 0px 4px;
+ border: 1px solid #889;
+ font-weight: bold;
+ background-color: #fff;
+}
+
+.calendar td.time .ampm {
+ text-align: center;
+}
+
+.calendar td.time .colon {
+ padding: 0px 2px 0px 3px;
+ font-weight: bold;
+}
+
+.calendar td.time span.hilite {
+ border-color: #000;
+ background-color: #766;
+ color: #fff;
+}
+
+.calendar td.time span.active {
+ border-color: #f00;
+ background-color: #000;
+ color: #0f0;
+}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-1.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-2.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-2.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-2.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,272 @@
+/* The main calendar widget. DIV containing a table. */
+
+.calendar {
+ position: relative;
+ display: none;
+ border-top: 2px solid #fff;
+ border-right: 2px solid #000;
+ border-bottom: 2px solid #000;
+ border-left: 2px solid #fff;
+ font-size: 11px;
+ color: #000;
+ cursor: default;
+ background: #d4c8d0;
+ font-family: tahoma,verdana,sans-serif;
+ width: 1%;
+}
+
+.calendar table {
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+ font-size: 11px;
+ color: #000;
+ cursor: default;
+ background: #d4c8d0;
+ font-family: tahoma,verdana,sans-serif;
+}
+
+/* Header part -- contains navigation buttons and day names. */
+
+.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
+ text-align: center;
+ padding: 1px;
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+}
+
+.calendar .nav {
+ background: transparent url(menuarrow.gif) no-repeat 100% 100%;
+}
+
+.calendar thead .title { /* This holds the current "month, year" */
+ font-weight: bold;
+ padding: 1px;
+ border: 1px solid #000;
+ background: #847880;
+ color: #fff;
+ text-align: center;
+}
+
+.calendar thead .headrow { /* Row <TR> containing navigation buttons */
+}
+
+.calendar thead .daynames { /* Row <TR> containing the day names */
+}
+
+.calendar thead .name { /* Cells <TD> containing the day names */
+ border-bottom: 1px solid #000;
+ padding: 2px;
+ text-align: center;
+ background: #f4e8f0;
+}
+
+.calendar thead .weekend { /* How a weekend day name shows in header */
+ color: #f00;
+}
+
+.calendar thead .hilite { /* How do the buttons in header appear when hover */
+ border-top: 2px solid #fff;
+ border-right: 2px solid #000;
+ border-bottom: 2px solid #000;
+ border-left: 2px solid #fff;
+ padding: 0px;
+ background-color: #e4d8e0;
+}
+
+.calendar thead .active { /* Active (pressed) buttons in header */
+ padding: 2px 0px 0px 2px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+ background-color: #c4b8c0;
+}
+
+/* The body part -- contains all the days in month. */
+
+.calendar tbody .day { /* Cells <TD> containing month days dates */
+ width: 2em;
+ text-align: right;
+ padding: 2px 4px 2px 2px;
+}
+.calendar tbody .day.othermonth {
+ font-size: 80%;
+ color: #aaa;
+}
+.calendar tbody .day.othermonth.oweekend {
+ color: #faa;
+}
+
+.calendar table .wn {
+ padding: 2px 3px 2px 2px;
+ border-right: 1px solid #000;
+ background: #f4e8f0;
+}
+
+.calendar tbody .rowhilite td {
+ background: #e4d8e0;
+}
+
+.calendar tbody .rowhilite td.wn {
+ background: #d4c8d0;
+}
+
+.calendar tbody td.hilite { /* Hovered cells <TD> */
+ padding: 1px 3px 1px 1px;
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+}
+
+.calendar tbody td.active { /* Active (pressed) cells <TD> */
+ padding: 2px 2px 0px 2px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+}
+
+.calendar tbody td.selected { /* Cell showing selected date */
+ font-weight: bold;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+ padding: 2px 2px 0px 2px;
+ background: #e4d8e0;
+}
+
+.calendar tbody td.weekend { /* Cells showing weekend days */
+ color: #f00;
+}
+
+.calendar tbody td.today { /* Cell showing today date */
+ font-weight: bold;
+ color: #00f;
+}
+
+.calendar tbody .disabled { color: #999; }
+
+.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
+ visibility: hidden;
+}
+
+.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
+ display: none;
+}
+
+/* The footer part -- status bar and "Close" button */
+
+.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
+}
+
+.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
+ background: #f4e8f0;
+ padding: 1px;
+ border: 1px solid #000;
+ background: #847880;
+ color: #fff;
+ text-align: center;
+}
+
+.calendar tfoot .hilite { /* Hover style for buttons in footer */
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+ padding: 1px;
+ background: #e4d8e0;
+}
+
+.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
+ padding: 2px 0px 0px 2px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+}
+
+/* Combo boxes (menus that display months/years for direct selection) */
+
+.calendar .combo {
+ position: absolute;
+ display: none;
+ width: 4em;
+ top: 0px;
+ left: 0px;
+ cursor: default;
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+ background: #e4d8e0;
+ font-size: 90%;
+ padding: 1px;
+ z-index: 100;
+}
+
+.calendar .combo .label,
+.calendar .combo .label-IEfix {
+ text-align: center;
+ padding: 1px;
+}
+
+.calendar .combo .label-IEfix {
+ width: 4em;
+}
+
+.calendar .combo .active {
+ background: #d4c8d0;
+ padding: 0px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+}
+
+.calendar .combo .hilite {
+ background: #408;
+ color: #fea;
+}
+
+.calendar td.time {
+ border-top: 1px solid #000;
+ padding: 1px 0px;
+ text-align: center;
+ background-color: #f4f0e8;
+}
+
+.calendar td.time .hour,
+.calendar td.time .minute,
+.calendar td.time .ampm {
+ padding: 0px 3px 0px 4px;
+ border: 1px solid #889;
+ font-weight: bold;
+ background-color: #fff;
+}
+
+.calendar td.time .ampm {
+ text-align: center;
+}
+
+.calendar td.time .colon {
+ padding: 0px 2px 0px 3px;
+ font-weight: bold;
+}
+
+.calendar td.time span.hilite {
+ border-color: #000;
+ background-color: #766;
+ color: #fff;
+}
+
+.calendar td.time span.active {
+ border-color: #f00;
+ background-color: #000;
+ color: #0f0;
+}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-2.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-cold-1.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-cold-1.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-cold-1.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,266 @@
+/* The main calendar widget. DIV containing a table. */
+
+.calendar {
+ position: relative;
+ display: none;
+ border-top: 2px solid #fff;
+ border-right: 2px solid #000;
+ border-bottom: 2px solid #000;
+ border-left: 2px solid #fff;
+ font-size: 11px;
+ color: #000;
+ cursor: default;
+ background: #c8d0d4;
+ font-family: tahoma,verdana,sans-serif;
+ width: 1%;
+}
+
+.calendar table {
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+ font-size: 11px;
+ color: #000;
+ cursor: default;
+ background: #c8d0d4;
+ font-family: tahoma,verdana,sans-serif;
+}
+
+/* Header part -- contains navigation buttons and day names. */
+
+.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
+ text-align: center;
+ padding: 1px;
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+}
+
+.calendar .nav {
+ background: transparent url(menuarrow.gif) no-repeat 100% 100%;
+}
+
+.calendar thead .title { /* This holds the current "month, year" */
+ font-weight: bold;
+ padding: 1px;
+ border: 1px solid #000;
+ background: #788084;
+ color: #fff;
+ text-align: center;
+}
+
+.calendar thead .headrow { /* Row <TR> containing navigation buttons */
+}
+
+.calendar thead .daynames { /* Row <TR> containing the day names */
+}
+
+.calendar thead .name { /* Cells <TD> containing the day names */
+ border-bottom: 1px solid #000;
+ padding: 2px;
+ text-align: center;
+ background: #e8f0f4;
+}
+
+.calendar thead .weekend { /* How a weekend day name shows in header */
+ color: #f00;
+}
+
+.calendar thead .hilite { /* How do the buttons in header appear when hover */
+ border-top: 2px solid #fff;
+ border-right: 2px solid #000;
+ border-bottom: 2px solid #000;
+ border-left: 2px solid #fff;
+ padding: 0px;
+ background-color: #d8e0e4;
+}
+
+.calendar thead .active { /* Active (pressed) buttons in header */
+ padding: 2px 0px 0px 2px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+ background-color: #b8c0c4;
+}
+
+/* The body part -- contains all the days in month. */
+
+.calendar tbody .day { /* Cells <TD> containing month days dates */
+ width: 2em;
+ text-align: right;
+ padding: 2px 4px 2px 2px;
+}
+.calendar tbody .day.othermonth {
+ font-size: 80%;
+ color: #aaa;
+}
+.calendar tbody .day.othermonth.oweekend {
+ color: #faa;
+}
+
+.calendar table .wn {
+ padding: 2px 3px 2px 2px;
+ border-right: 1px solid #000;
+ background: #e8f4f0;
+}
+
+.calendar tbody .rowhilite td {
+ background: #d8e4e0;
+}
+
+.calendar tbody .rowhilite td.wn {
+ background: #c8d4d0;
+}
+
+.calendar tbody td.hilite { /* Hovered cells <TD> */
+ padding: 1px 3px 1px 1px;
+ border: 1px solid;
+ border-color: #fff #000 #000 #fff;
+}
+
+.calendar tbody td.active { /* Active (pressed) cells <TD> */
+ padding: 2px 2px 0px 2px;
+ border: 1px solid;
+ border-color: #000 #fff #fff #000;
+}
+
+.calendar tbody td.selected { /* Cell showing selected date */
+ font-weight: bold;
+ padding: 2px 2px 0px 2px;
+ border: 1px solid;
+ border-color: #000 #fff #fff #000;
+ background: #d8e0e4;
+}
+
+.calendar tbody td.weekend { /* Cells showing weekend days */
+ color: #f00;
+}
+
+.calendar tbody td.today { /* Cell showing today date */
+ font-weight: bold;
+ color: #00f;
+}
+
+.calendar tbody .disabled { color: #999; }
+
+.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
+ visibility: hidden;
+}
+
+.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
+ display: none;
+}
+
+/* The footer part -- status bar and "Close" button */
+
+.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
+}
+
+.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
+ background: #e8f0f4;
+ padding: 1px;
+ border: 1px solid #000;
+ background: #788084;
+ color: #fff;
+ text-align: center;
+}
+
+.calendar tfoot .hilite { /* Hover style for buttons in footer */
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+ padding: 1px;
+ background: #d8e0e4;
+}
+
+.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
+ padding: 2px 0px 0px 2px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+}
+
+/* Combo boxes (menus that display months/years for direct selection) */
+
+.calendar .combo {
+ position: absolute;
+ display: none;
+ width: 4em;
+ top: 0px;
+ left: 0px;
+ cursor: default;
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+ background: #d8e0e4;
+ font-size: 90%;
+ padding: 1px;
+ z-index: 100;
+}
+
+.calendar .combo .label,
+.calendar .combo .label-IEfix {
+ text-align: center;
+ padding: 1px;
+}
+
+.calendar .combo .label-IEfix {
+ width: 4em;
+}
+
+.calendar .combo .active {
+ background: #c8d0d4;
+ padding: 0px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+}
+
+.calendar .combo .hilite {
+ background: #048;
+ color: #aef;
+}
+
+.calendar td.time {
+ border-top: 1px solid #000;
+ padding: 1px 0px;
+ text-align: center;
+ background-color: #e8f0f4;
+}
+
+.calendar td.time .hour,
+.calendar td.time .minute,
+.calendar td.time .ampm {
+ padding: 0px 3px 0px 4px;
+ border: 1px solid #889;
+ font-weight: bold;
+ background-color: #fff;
+}
+
+.calendar td.time .ampm {
+ text-align: center;
+}
+
+.calendar td.time .colon {
+ padding: 0px 2px 0px 3px;
+ font-weight: bold;
+}
+
+.calendar td.time span.hilite {
+ border-color: #000;
+ background-color: #667;
+ color: #fff;
+}
+
+.calendar td.time span.active {
+ border-color: #f00;
+ background-color: #000;
+ color: #0f0;
+}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-cold-1.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-cold-2.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-cold-2.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-cold-2.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,272 @@
+/* The main calendar widget. DIV containing a table. */
+
+.calendar {
+ position: relative;
+ display: none;
+ border-top: 2px solid #fff;
+ border-right: 2px solid #000;
+ border-bottom: 2px solid #000;
+ border-left: 2px solid #fff;
+ font-size: 11px;
+ color: #000;
+ cursor: default;
+ background: #c8d4d0;
+ font-family: tahoma,verdana,sans-serif;
+ width: 1%;
+}
+
+.calendar table {
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+ font-size: 11px;
+ color: #000;
+ cursor: default;
+ background: #c8d4d0;
+ font-family: tahoma,verdana,sans-serif;
+}
+
+/* Header part -- contains navigation buttons and day names. */
+
+.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
+ text-align: center;
+ padding: 1px;
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+}
+
+.calendar .nav {
+ background: transparent url(menuarrow.gif) no-repeat 100% 100%;
+}
+
+.calendar thead .title { /* This holds the current "month, year" */
+ font-weight: bold;
+ padding: 1px;
+ border: 1px solid #000;
+ background: #788480;
+ color: #fff;
+ text-align: center;
+}
+
+.calendar thead .headrow { /* Row <TR> containing navigation buttons */
+}
+
+.calendar thead .daynames { /* Row <TR> containing the day names */
+}
+
+.calendar thead .name { /* Cells <TD> containing the day names */
+ border-bottom: 1px solid #000;
+ padding: 2px;
+ text-align: center;
+ background: #e8f4f0;
+}
+
+.calendar thead .weekend { /* How a weekend day name shows in header */
+ color: #f00;
+}
+
+.calendar thead .hilite { /* How do the buttons in header appear when hover */
+ border-top: 2px solid #fff;
+ border-right: 2px solid #000;
+ border-bottom: 2px solid #000;
+ border-left: 2px solid #fff;
+ padding: 0px;
+ background-color: #d8e4e0;
+}
+
+.calendar thead .active { /* Active (pressed) buttons in header */
+ padding: 2px 0px 0px 2px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+ background-color: #b8c4c0;
+}
+
+/* The body part -- contains all the days in month. */
+
+.calendar tbody .day { /* Cells <TD> containing month days dates */
+ width: 2em;
+ text-align: right;
+ padding: 2px 4px 2px 2px;
+}
+.calendar tbody .day.othermonth {
+ font-size: 80%;
+ color: #aaa;
+}
+.calendar tbody .day.othermonth.oweekend {
+ color: #faa;
+}
+
+.calendar table .wn {
+ padding: 2px 3px 2px 2px;
+ border-right: 1px solid #000;
+ background: #e8f4f0;
+}
+
+.calendar tbody .rowhilite td {
+ background: #d8e4e0;
+}
+
+.calendar tbody .rowhilite td.wn {
+ background: #c8d4d0;
+}
+
+.calendar tbody td.hilite { /* Hovered cells <TD> */
+ padding: 1px 3px 1px 1px;
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+}
+
+.calendar tbody td.active { /* Active (pressed) cells <TD> */
+ padding: 2px 2px 0px 2px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+}
+
+.calendar tbody td.selected { /* Cell showing selected date */
+ font-weight: bold;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+ padding: 2px 2px 0px 2px;
+ background: #d8e4e0;
+}
+
+.calendar tbody td.weekend { /* Cells showing weekend days */
+ color: #f00;
+}
+
+.calendar tbody td.today { /* Cell showing today date */
+ font-weight: bold;
+ color: #00f;
+}
+
+.calendar tbody .disabled { color: #999; }
+
+.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
+ visibility: hidden;
+}
+
+.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
+ display: none;
+}
+
+/* The footer part -- status bar and "Close" button */
+
+.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
+}
+
+.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
+ background: #e8f4f0;
+ padding: 1px;
+ border: 1px solid #000;
+ background: #788480;
+ color: #fff;
+ text-align: center;
+}
+
+.calendar tfoot .hilite { /* Hover style for buttons in footer */
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+ padding: 1px;
+ background: #d8e4e0;
+}
+
+.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
+ padding: 2px 0px 0px 2px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+}
+
+/* Combo boxes (menus that display months/years for direct selection) */
+
+.calendar .combo {
+ position: absolute;
+ display: none;
+ width: 4em;
+ top: 0px;
+ left: 0px;
+ cursor: default;
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+ background: #d8e4e0;
+ font-size: 90%;
+ padding: 1px;
+ z-index: 100;
+}
+
+.calendar .combo .label,
+.calendar .combo .label-IEfix {
+ text-align: center;
+ padding: 1px;
+}
+
+.calendar .combo .label-IEfix {
+ width: 4em;
+}
+
+.calendar .combo .active {
+ background: #c8d4d0;
+ padding: 0px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+}
+
+.calendar .combo .hilite {
+ background: #048;
+ color: #aef;
+}
+
+.calendar td.time {
+ border-top: 1px solid #000;
+ padding: 1px 0px;
+ text-align: center;
+ background-color: #e8f0f4;
+}
+
+.calendar td.time .hour,
+.calendar td.time .minute,
+.calendar td.time .ampm {
+ padding: 0px 3px 0px 4px;
+ border: 1px solid #889;
+ font-weight: bold;
+ background-color: #fff;
+}
+
+.calendar td.time .ampm {
+ text-align: center;
+}
+
+.calendar td.time .colon {
+ padding: 0px 2px 0px 3px;
+ font-weight: bold;
+}
+
+.calendar td.time span.hilite {
+ border-color: #000;
+ background-color: #667;
+ color: #fff;
+}
+
+.calendar td.time span.active {
+ border-color: #f00;
+ background-color: #000;
+ color: #0f0;
+}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/calendar-win2k-cold-2.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/CSS/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/ChangeLog
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/ChangeLog 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/ChangeLog 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,761 @@
+2005-03-07 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * skins/aqua/theme.css: *** empty log message ***
+
+ * release-notes.html: updated release notes
+
+ * calendar-setup.js:
+ use a better approach to initialize the calendar--don't call _init twice,
+ it's the most time consuming function in the calendar. Instead, determine
+ the date beforehand if possible and pass it to the calendar at constructor.
+
+ * calendar.js:
+ avoid keyboard operation when 'multiple dates' is set (very buggy for now)
+
+ * calendar.js:
+ fixed keyboard handling problems: now it works fine when "showsOtherMonths"
+ is passed; it also seems to be fine with disabled dates (won't normally
+ allow selection)--however this area is still likely to be buggy, i.e. in a
+ month that has all the dates disabled.
+
+ * calendar.js:
+ some trivial performance improvements in the _init function
+ Added Date.parseDate (old Calendar.prototype.parseDate now calls this one)
+
+2005-03-05 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * release-notes.html: updated release notes
+
+ * dayinfo.html: *** empty log message ***
+
+ * calendar-setup.js:
+ bugfix--update an inputField even if flat calendar is selected
+
+ * calendar.js:
+ fixed bugs in parseDate function (if for some reason the input string is
+ totally broken, then check numbers for NaN and use values from the current
+ date instead)
+
+ * make-release.pl: copy the skins subdirectory and all skins
+
+ * index.html: added Aqua skin
+
+ * skins/aqua/active-bg.gif, skins/aqua/dark-bg.gif, skins/aqua/hover-bg.gif, skins/aqua/menuarrow.gif, skins/aqua/normal-bg.gif, skins/aqua/rowhover-bg.gif, skins/aqua/status-bg.gif, skins/aqua/theme.css, skins/aqua/title-bg.gif, skins/aqua/today-bg.gif:
+ in the future, skins will go to this directory, each in a separate subdir; for now there's only Aqua, an excellent new skin
+
+ * calendar.js: workaround IE bug, needed in the Aqua theme
+ don't hide select elements unless browser is IE or Opera
+
+ * lang/calendar-bg.js, lang/calendar-big5-utf8.js, lang/calendar-big5.js, lang/calendar-br.js, lang/calendar-ca.js, lang/calendar-cs-utf8.js, lang/calendar-cs-win.js, lang/calendar-da.js, lang/calendar-de.js, lang/calendar-el.js, lang/calendar-en.js, lang/calendar-es.js, lang/calendar-fi.js, lang/calendar-fr.js, lang/calendar-he-utf8.js, lang/calendar-hu.js, lang/calendar-it.js, lang/calendar-ko-utf8.js, lang/calendar-ko.js, lang/calendar-lt-utf8.js, lang/calendar-lt.js, lang/calendar-lv.js, lang/calendar-nl.js, lang/calendar-no.js, lang/calendar-pl-utf8.js, lang/calendar-pl.js, lang/calendar-pt.js, lang/calendar-ro.js, lang/calendar-ru.js, lang/calendar-ru_win_.js, lang/calendar-si.js, lang/calendar-sk.js, lang/calendar-sp.js, lang/calendar-sv.js, lang/calendar-zh.js, lang/cn_utf8.js:
+ updated urls, copyright notices
+
+ * doc/reference.tex: updated documentation
+
+ * calendar.js, index.html:
+ renamed the global variable to _dynarch_popupCalendar to avoid name clashes
+
+ * multiple-dates.html: start with an empty array
+
+ * calendar.js:
+ fixed bugs in the time selector (12:XX pm was wrongfully understood as 12:XX am)
+
+ * calendar.js:
+ using innerHTML instead of text nodes; works better in Safari and also makes
+ a smaller, cleaner code
+
+2005-03-04 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar.js:
+ fixed a performance regression that occurred after adding support for multiple dates
+ fixed the time selection bug (now it keeps time correctly)
+ clicking today will close the calendar if "today" is already selected
+
+ * lang/cn_utf8.js: new translation
+
+2005-02-17 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-ar-utf8.zip: Added arabic translation
+
+2004-10-19 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-zh.js: updated
+
+2004-09-20 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-no.js: updated (Daniel Holmen)
+
+2004-09-20 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-no.js: updated (Daniel Holmen)
+
+2004-08-11 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-nl.js: updated language file (thanks to Arjen Duursma)
+
+ * lang/calendar-sp.js: updated (thanks to Rafael Velasco)
+
+2004-07-21 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-br.js: updated
+
+ * calendar-setup.js: fixed bug (dateText)
+
+2004-07-21 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-br.js: updated
+
+ * calendar-setup.js: fixed bug (dateText)
+
+2004-07-04 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-lv.js:
+ added LV translation (thanks to Juris Valdovskis)
+
+2004-06-25 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar.js:
+ fixed bug in IE (el.calendar.tooltips is null or not an object)
+
+2004-06-24 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * doc/reference.tex: fixed latex compilation
+
+ * index.html: linking other sample files
+
+ * calendar-setup.js, calendar.js, dayinfo.html:
+ ability to display day info (dateText parameter) + sample file
+
+2004-06-23 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * doc/reference.tex, lang/calendar-bg.js, lang/calendar-br.js, lang/calendar-ca.js, lang/calendar-en.js, lang/calendar-es.js, lang/calendar-fr.js, lang/calendar-it.js, lang/calendar-ko-utf8.js, lang/calendar-ko.js, lang/calendar-nl.js, lang/calendar-sv.js, README, calendar.js, index.html:
+ email address changed
+
+2004-06-14 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-cs-utf8.js, lang/calendar-cs-win.js:
+ updated translations
+
+ * calendar-system.css: added z-index to drop downs
+
+ * lang/calendar-en.js:
+ first day of week can now be part of the language file
+
+ * lang/calendar-es.js:
+ updated language file (thanks to Servilio Afre Puentes)
+
+ * calendar-blue2.css, calendar-brown.css, calendar-green.css, calendar-tas.css, calendar-win2k-1.css, calendar-win2k-2.css, calendar-win2k-cold-1.css, calendar-win2k-cold-2.css, calendar-blue.css:
+ added z-index property to drop downs (fixes bug)
+
+2004-06-13 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar-setup.js: fixed bug (apply showOthers to flat calendars too)
+
+2004-06-06 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar-setup.js:
+ firstDay defaults to "null", in which case the value in the language file
+ will be used
+
+ * calendar.js:
+ firstDayOfWeek can now default to a value specified in the language definition file
+
+ * index.html: first day of week is now numeric
+
+2004-06-02 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar.js: added date tooltip function
+
+2004-05-28 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-br.js: updated (thanks to Marcos Pont)
+
+ * calendar-setup.js: fixed small bug
+
+2004-05-01 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar-setup.js: returns the calendar object
+
+2004-04-28 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar-setup.js:
+ patch to read the date value from the inputField, according to ifFormat (if
+ both are passed), for flat calendars. (thanks Colin T. Hill)
+
+2004-04-20 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar-setup.js, calendar.js, multiple-dates.html:
+ added support for multiple dates selection
+
+ * lang/calendar-nl.js:
+ updated Dutch translation, thanks to Jeroen Wolsink
+
+ * lang/calendar-big5-utf8.js, lang/calendar-big5.js:
+ Traditional Chinese language (thanks GaryFu)
+
+2004-03-26 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-fr.js, lang/calendar-pt.js: updated
+
+ * lang/calendar-ru_win_.js, lang/calendar-ru.js:
+ updated, thanks to Sly Golovanov
+
+2004-03-25 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-fr.js: updated (thanks to David Duret)
+
+2004-03-24 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-da.js: updated (thanks to Michael Thingmand Henriksen)
+
+2004-03-21 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-ca.js: updated (thanks to David Valls)
+
+2004-03-17 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-de.js: updated to UTF8 (thanks to Jack (tR))
+
+2004-03-09 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-bg.js: Bulgarian translation
+
+2004-03-08 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-he-utf8.js: Hebrew translation (thanks to Idan Sofer)
+
+ * lang/calendar-hu.js: updated (thanks to Istvan Karaszi)
+
+2004-02-27 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-it.js: updated (thanks to Fabio Di Bernardini)
+
+2004-02-25 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar.js: fix for Safari (thanks to Olivier Chirouze / XPWeb)
+
+2004-02-22 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-al.js: Albanian language file
+
+2004-02-17 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-fr.js: fixed
+
+ * lang/calendar-fr.js:
+ FR translation updated (thanks to SIMON Alexandre)
+
+ * lang/calendar-es.js: ES translation updated, thanks to David Gonzales
+
+2004-02-10 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-pt.js:
+ updated Portugese translation, thanks to Elcio Ferreira
+
+2004-02-09 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * TODO: updated
+
+2004-02-06 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * README: describe the PHP files
+
+ * make-release.pl: includes php files
+
+ * make-release.pl: ChangeLog included in the distribution (if found)
+
+ * calendar.js, doc/reference.tex, index.html: switched to version 0.9.6
+
+ * doc/Calendar.setup.tex, doc/reference.tex: updated documentation
+
+ * release-notes.html: updated release notes
+
+ * calendar.js: Fixed bug: Feb/29 and year change now keeps Feb in view
+
+ * calendar.js: fixed the "ESC" problem (call the close handler)
+
+ * calendar.js: fixed day of year range (1 to 366 instead of 0 to 365)
+
+ * calendar.js: fixed week number calculations
+
+ * doc/reference.tex: fixed (date input format)
+
+ * calendar.php: removed comment
+
+ * calendar-blue.css, calendar-blue2.css, calendar-brown.css, calendar-green.css, calendar-system.css, calendar-tas.css, calendar-win2k-1.css, calendar-win2k-2.css, calendar-win2k-cold-1.css, calendar-win2k-cold-2.css, calendar.js:
+ workaround for IE bug (you can't normally specify through CSS the style for
+ an element having two classes or more; we had to change a classname)
+
+ * calendar-blue.css, calendar-blue2.css, calendar-brown.css, calendar-green.css, calendar-system.css, calendar-tas.css, calendar-win2k-1.css, calendar-win2k-2.css, calendar-win2k-cold-1.css, calendar-win2k-cold-2.css:
+ smaller fonts on days that are in neighbor months
+
+2004-02-04 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * index.html: first demo shows the "showOtherMonths" capability
+
+ * calendar-setup.js: support new parameters in the calendar.
+ added: firstDay, showOthers, cache.
+
+ * calendar-blue.css, calendar-blue2.css, calendar-brown.css, calendar-green.css, calendar-system.css, calendar-win2k-1.css, calendar-win2k-2.css, calendar-win2k-cold-1.css, calendar-win2k-cold-2.css, calendar.js, lang/calendar-en.js, lang/calendar-ro.js:
+ new parameters: firstDayOfWeek, showsOtherMonths; removed mondayFirst.
+ This adds support for setting any day to be the first day of week (by just
+ clicking the day name in the display); also, if showsOtherMonths is enabled
+ then dates belonging to adjacent months that are in the current view will be
+ displayed and the calendar will have a fixed height.
+
+ all themes updated.
+
+ * test.php: test for calendar.php
+
+ * calendar.php: fixed bug (pass numeric values as numbers)
+
+2004-02-01 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar.php: added PHP wrapper
+
+ * img.gif: icon updated
+
+ * TODO: updated TODO list
+
+2004-01-27 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar.js:
+ Janusz Piwowarski sent over a patch for IE5 compatibility which is much more
+ elegant than the atrocities that I had wrote :-D I'm gettin' old.. Thanks Janusz!
+
+ * lang/calendar-fi.js: updated
+
+2004-01-15 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * TODO: updated TODO list
+
+ * calendar-setup.js: default align changed to "Br"
+
+ * doc/reference.tex: changed default value for "align"
+
+ * calendar-setup.js: calling onchange event handler, if available
+
+ * calendar-setup.js: added "position" option
+
+ * simple-1.html: demonstrates "step" option
+
+ * calendar-setup.js: added "step" option
+
+ * calendar.js: added yearStep config parameter
+
+ * calendar.js:
+ fixed parseDate routine (the NaN bug which occurred when there was a space
+ after the date and no time)
+
+2004-01-14 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-en.js: added "Time:"
+
+ * test-position.html: test for the new position algorithm
+
+ * index.html: do not destroy() the calendar
+ avoid bug in parseDate (%p must be separated by non-word characters)
+
+ * menuarrow2.gif: for calendar-blue2.css
+
+ * calendar-setup.js: honor "date" parameter if passed
+
+ * calendar.js: IE5 support is back
+ performance improvements in IE6 (mouseover combo boxes)
+ display "Time:" beside the clock area, if defined in the language file
+ new positioning algorithm (try to keep the calendar in page)
+ rewrote parseDate a little cleaner
+
+ * lang/calendar-el.js:
+ updated Greek translation (thanks Alexandros Pappas)
+
+2004-01-13 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * index.html: added style blue2, using utf-8 instead of iso-8859-2
+
+ * calendar.js: performance under IE (which sucks, by the way)
+
+ * doc/reference.tex: Sunny added to sponsor list
+
+ * doc/Calendar.setup.tex: documenting parameter 'electric'
+
+ * calendar-blue.css, calendar-blue2.css, calendar-brown.css, calendar-green.css, calendar-system.css, calendar-win2k-1.css, calendar-win2k-2.css, calendar-win2k-cold-1.css, calendar-win2k-cold-2.css:
+ fixed IE text size problems
+
+2004-01-08 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-pl.js:
+ Polish translation updated to UTF-8 (thanks to Artur Filipiak)
+
+2004-01-07 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-si.js: updated (David Milost)
+
+ * lang/calendar-si.js: Slovenian translation (thanks to David Milost)
+
+2003-12-21 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * TODO: updated TODO list
+
+ * lang/calendar-de.js: German translation (thanks to Peter Strotmann)
+
+2003-12-19 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * doc/reference.tex: Thank you, Ian Barrak
+
+2003-12-18 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * doc/reference.tex: fixed documentation bug (thanks Mike)
+
+2003-12-05 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-ko-utf8.js:
+ UTF8 version of the Korean language (hopefully correct)
+
+ * lang/calendar-pl-utf8.js, lang/calendar-pl.js:
+ updated Polish translation (thanks to Janusz Piwowarski)
+
+2003-12-04 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-fr.js:
+ French translation updated (thanks to Angiras Rama)
+
+2003-11-22 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-da.js: updated (thanks to Jesper M. Christensen)
+
+2003-11-20 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar-blue2.css, calendar-tas.css:
+ new styles (thanks to Wendall Mosemann for blue2, Mark Lynch for tas)
+
+ * lang/calendar-lt-utf8.js, lang/calendar-lt.js:
+ Lithuanian translation (thanks to Martynas Majeris)
+
+ * lang/calendar-sp.js: updated
+
+2003-11-17 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * TODO: added TODO list
+
+2003-11-14 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-ko.js: Korean translation (thanks to Yourim Yi)
+
+2003-11-12 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-jp.js: small bug fixed (thanks to TAHARA Yusei)
+
+2003-11-10 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-fr.js: translation updated, thanks to Florent Ramiere
+
+ * calendar-setup.js:
+ added new parameter: electric (if false then the field will not get updated on each move)
+
+ * index.html: fixed DOCTYPE
+
+2003-11-07 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar-setup.js:
+ fixed minor problem (maybe we're passing object reference instead of ID for
+ the flat calendar parent)
+
+2003-11-06 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-fi.js:
+ added Finnish translation (thanks to Antti Tuppurainen)
+
+2003-11-05 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * release-notes.html: fixed typo
+
+ * doc/reference.tex, index.html, calendar.js: 0.9.5
+
+ * README: fixed license statement
+
+ * release-notes.html: updated release notes (0.9.5)
+
+2003-11-03 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-de.js:
+ updated German translation (thanks to Gerhard Neiner)
+
+ * calendar-setup.js: fixed license statement
+
+ * calendar.js: whitespace
+
+ * calendar.js: fixed license statement
+
+ * calendar.js:
+ fixed positioning problem when input field is inside scrolled divs
+
+2003-11-01 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-af.js: Afrikaan language (thanks to Derick Olivier)
+
+2003-10-31 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-it.js:
+ updated IT translation (thanks to Christian Blaser)
+
+ * lang/calendar-es.js: updated ES translation, thanks to Raul
+
+2003-10-30 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-hu.js: updated thanks to Istvan Karaszi
+
+ * index.html, simple-1.html, simple-2.html, simple-3.html:
+ switched to utf-8 all encodings
+
+ * lang/calendar-sk.js:
+ added Slovak translation (thanks to Peter Valach)
+
+ * lang/calendar-ro.js: switched to utf-8
+
+2003-10-29 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-es.js:
+ updated translation, thanks to Jose Ma. Martinez Miralles
+
+ * doc/reference.tex:
+ fixed the footnote problem (thanks Dominique de Waleffe for the tip)
+
+ * lang/calendar-ro.js: fixed typo
+
+ * lang/calendar-sv.js: oops, license should be LGPL
+
+ * lang/calendar-sw.js: new swedish translation is calendar-sv.js
+
+ * menuarrow.gif, menuarrow.png:
+ oops, forgot little drop-down menu arrows
+
+ * lang/calendar-sv.js: swedish translation thanks to Leonard Norrgard
+
+ * index.html: oops, some other minor changes
+
+ * index.html, release-notes.html:
+ latest changes in release-notes and index page for 0.9.4
+
+ * doc/reference.tex, calendar.js:
+ added %s date format (# of seconds since Epoch)
+
+ * calendar.js:
+ A click on TODAY will not close the calendar, even in single-click mode
+
+2003-10-28 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * index.html: previous cal.html
+
+ * cal.html: moved to index.html
+
+ * README, cal.html, doc/reference.tex, lang/calendar-de.js, lang/calendar-en.js, lang/calendar-ro.js, release-notes.html:
+ LGPL license, forever.
+
+ * doc/Calendar.setup.tex, simple-1.html:
+ doc updated for the onUpdate parameter to Calendar.setup
+
+2003-10-26 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar.js: fixed bug (correct display of the dropdown menus)
+
+ * doc/Calendar.setup.tex, doc/reference.tex, lang/calendar-de.js, lang/calendar-en.js, lang/calendar-ro.js, README, cal.html, calendar-blue.css, calendar-brown.css, calendar-green.css, calendar-setup.js, calendar-system.css, calendar-win2k-1.css, calendar-win2k-2.css, calendar-win2k-cold-1.css, calendar-win2k-cold-2.css, calendar.js, release-notes.html, simple-1.html, simple-3.html:
+ lots of changes for the 0.9.4 release (see the release-notes.html)
+
+2003-10-15 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * doc/reference.tex:
+ documentation updated for 0.9.4 (not yet finished though)
+
+2003-10-07 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar.js, doc/reference.tex, release-notes.html, README, cal.html, calendar-setup.js:
+ modified project website
+
+2003-10-06 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar-setup.js:
+ added some properties (onSelect, onClose, date) (thanks altblue)
+
+2003-09-24 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * simple-3.html: dateIsSpecial does not need the "date" argument ;-)
+
+2003-09-24 fsoft <fsoft at mishoo>
+
+ * calendar.js, simple-3.html:
+ added year, month, day to getDateStatus() function
+
+2003-09-24 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * simple-3.html: example on how to use special dates
+
+ * calendar-setup.js, calendar.js, simple-1.html:
+ support for special dates (thanks fabio)
+
+2003-09-17 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * doc/reference.tex: fixed error in section 3.
+
+2003-08-01 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-jp.js: added Japanese translation
+
+2003-07-16 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * simple-1.html: fixed problem with first example [IE,Opera]
+
+2003-07-09 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * doc/Calendar.setup.tex: fixed typo (closing parenthesis)
+
+ * lang/calendar-de.js:
+ added German translation, thanks to Hartwig Weinkauf
+
+2003-07-08 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * cal.html: added link to release-notes
+
+ * release-notes.html: 0.9.3 release notes
+
+ * make-release.pl:
+ Script to create distribution archive. It needs some additional packages:
+
+ - LaTeX
+ - tex2page
+ - jscrunch (JS compressor)
+
+ * doc/html/makedoc.sh, doc/html/reference.css, doc/reference.tex, doc/makedoc.sh:
+ documentation updates...
+
+ * calendar.js: added semicolon to make the code "compressible"
+
+2003-07-06 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * doc/reference.tex: spell checked
+
+ * doc/reference.tex: [minor] changed credits order
+
+ * doc/reference.tex: various improvements and additions
+
+ * doc/html/reference.css: minor eye-candy tweaks
+
+2003-07-05 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * doc/html/Calendar.setup.html.tex, doc/html/makedoc.sh, doc/html/reference.css, doc/html/reference.t2p, doc/hyperref.cfg, doc/makedoc.sh, doc/reference.tex, doc/Calendar.setup.tex, doc/Calendar.setup.pdf.tex:
+ full documentation in LaTeX, for PDF and HTML formats
+
+ * simple-2.html:
+ added demonstration of flat calendar with Calendar.setup
+
+ * simple-1.html:
+ modified some links, added link to documentation, added demonstration of
+ disableFunc property
+
+ * calendar-setup.js: added the ability to create flat calendar too
+
+ * cal.html: added links to documentation and simple-[12].html pages
+
+ * README: up-to-date...
+
+ * calendar-setup.html: removed: the documentation is unified
+
+2003-07-03 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * cal.html: some links to newly added files
+
+ * calendar-setup.html, calendar-setup.js, img.gif, simple-1.html:
+ added some files to simplify calendar creation for non-(JS)-programmers
+
+ * lang/calendar-zh.js: added simplified chinese (thanks ATang)
+
+2003-07-02 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar.js: * "yy"-related... [small fix]
+
+ * calendar.js:
+ * #721833 fixed (yy format will understand years prior to 29 as 20xx)
+
+ * calendar.js: * added refresh() function
+
+ * calendar.js: * fixed bug when in single click mode
+ * added alignment options to "showAtElement" member function
+
+2003-06-25 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-pt.js:
+ added portugese translation (thanks Nuno Barreto)
+
+2003-06-24 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar.js:
+ call user handler when the date was changed using the keyboard
+
+ * bugtest-hidden-selects.html:
+ file to test bug with hidden select-s (thanks Ying Zhang for reporting and for this test file)
+
+ * lang/calendar-hr-utf8.js:
+ added croatian translation in utf8 (thanks Krunoslav Zubrinic)
+
+2003-06-23 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-hu.js: added hungarian translation
+
+ * lang/calendar-hr.js:
+ added croatian translation (thanks to Krunoslav Zubrinic)
+
+2003-06-22 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar.js:
+ * #723335 fixed (clicking TODAY will not select the today date if the
+ disabledHandler rejects it)
+
+ * cal.html: * new code for to work with fix for bug #703238
+ * switch to new version
+
+ * calendar.js:
+ * some patches to make code compatible with Opera 7 (well, almost compatible)
+ * bug #703238 fixed (fix breaks compatibility with older code that uses
+ calendar in single-click mode)
+ * bug #703814 fixed
+
+2003-04-09 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-tr.js: added turkish lang file
+
+2003-03-19 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-ru.js: russian translation added
+
+ * lang/calendar-no.js: norwegian translation added
+
+2003-03-15 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-no.js: norwegian translation
+
+2003-03-12 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * lang/calendar-pl.js: added polish translation
+
+2003-03-11 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar.js:
+ bugfix in parseDate (added base to parseInt, thanks Alan!)
+
+2003-03-05 Mihai Bazon <mihai_bazon at yahoo.com>
+
+ * calendar.js, lang/calendar-br.js, lang/calendar-ca.js, lang/calendar-cs-win.js, lang/calendar-da.js, lang/calendar-du.js, lang/calendar-el.js, lang/calendar-en.js, lang/calendar-es.js, lang/calendar-fr.js, lang/calendar-it.js, lang/calendar-nl.js, lang/calendar-ro.js, lang/calendar-sp.js, lang/calendar-sw.js:
+ New file.
+
+ * calendar.js, lang/calendar-br.js, lang/calendar-ca.js, lang/calendar-cs-win.js, lang/calendar-da.js, lang/calendar-du.js, lang/calendar-el.js, lang/calendar-en.js, lang/calendar-es.js, lang/calendar-fr.js, lang/calendar-it.js, lang/calendar-nl.js, lang/calendar-ro.js, lang/calendar-sp.js, lang/calendar-sw.js:
+ moved to CVS at sourceforge.net
+ release: 0.9.2 + new language packs
+
+
+ * README, cal.html, calendar-blue.css, calendar-brown.css, calendar-green.css, calendar-system.css, calendar-win2k-1.css, calendar-win2k-2.css, calendar-win2k-cold-1.css, calendar-win2k-cold-2.css:
+ New file.
+
+ * README, cal.html, calendar-blue.css, calendar-brown.css, calendar-green.css, calendar-system.css, calendar-win2k-1.css, calendar-win2k-2.css, calendar-win2k-cold-1.css, calendar-win2k-cold-2.css:
+ moved to CVS at sourceforge.net
+ release: 0.9.2 + new language packs
+
+
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/README
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/README 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/README 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,33 @@
+The DHTML Calendar
+-------------------
+
+ Author: Mihai Bazon, <mihai_bazon at yahoo.com>
+ http://dynarch.com/mishoo/
+
+ This program is free software published under the
+ terms of the GNU Lesser General Public License.
+
+ For the entire license text please refer to
+ http://www.gnu.org/licenses/lgpl.html
+
+Contents
+---------
+
+ calendar.js -- the main program file
+ lang/*.js -- internalization files
+ *.css -- color themes
+ cal.html -- example usage file
+ doc/ -- documentation, in PDF and HTML
+ simple-1.html -- quick setup examples [popup calendars]
+ simple-2.html -- quick setup example for flat calendar
+ calendar.php -- PHP wrapper
+ test.php -- test file for the PHP wrapper
+
+Homepage
+---------
+
+ For details and latest versions please refer to calendar
+ homepage, located on my website:
+
+ http://dynarch.com/mishoo/calendar.epl
+
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar-setup.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar-setup.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar-setup.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,200 @@
+/* Copyright Mihai Bazon, 2002, 2003 | http://dynarch.com/mishoo/
+ * ---------------------------------------------------------------------------
+ *
+ * The DHTML Calendar
+ *
+ * Details and latest version at:
+ * http://dynarch.com/mishoo/calendar.epl
+ *
+ * This script is distributed under the GNU Lesser General Public License.
+ * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
+ *
+ * This file defines helper functions for setting up the calendar. They are
+ * intended to help non-programmers get a working calendar on their site
+ * quickly. This script should not be seen as part of the calendar. It just
+ * shows you what one can do with the calendar, while in the same time
+ * providing a quick and simple method for setting it up. If you need
+ * exhaustive customization of the calendar creation process feel free to
+ * modify this code to suit your needs (this is recommended and much better
+ * than modifying calendar.js itself).
+ */
+
+// $Id: calendar-setup.js,v 1.1.2.1 2005/04/19 14:35:23 mithyt2 Exp $
+
+/**
+ * This function "patches" an input field (or other element) to use a calendar
+ * widget for date selection.
+ *
+ * The "params" is a single object that can have the following properties:
+ *
+ * prop. name | description
+ * -------------------------------------------------------------------------------------------------
+ * inputField | the ID of an input field to store the date
+ * displayArea | the ID of a DIV or other element to show the date
+ * button | ID of a button or other element that will trigger the calendar
+ * eventName | event that will trigger the calendar, without the "on" prefix (default: "click")
+ * ifFormat | date format that will be stored in the input field
+ * daFormat | the date format that will be used to display the date in displayArea
+ * singleClick | (true/false) wether the calendar is in single click mode or not (default: true)
+ * firstDay | numeric: 0 to 6. "0" means display Sunday first, "1" means display Monday first, etc.
+ * align | alignment (default: "Br"); if you don't know what's this see the calendar documentation
+ * range | array with 2 elements. Default: [1900, 2999] -- the range of years available
+ * weekNumbers | (true/false) if it's true (default) the calendar will display week numbers
+ * flat | null or element ID; if not null the calendar will be a flat calendar having the parent with the given ID
+ * flatCallback | function that receives a JS Date object and returns an URL to point the browser to (for flat calendar)
+ * disableFunc | function that receives a JS Date object and should return true if that date has to be disabled in the calendar
+ * onSelect | function that gets called when a date is selected. You don't _have_ to supply this (the default is generally okay)
+ * onClose | function that gets called when the calendar is closed. [default]
+ * onUpdate | function that gets called after the date is updated in the input field. Receives a reference to the calendar.
+ * date | the date that the calendar will be initially displayed to
+ * showsTime | default: false; if true the calendar will include a time selector
+ * timeFormat | the time format; can be "12" or "24", default is "12"
+ * electric | if true (default) then given fields/date areas are updated for each move; otherwise they're updated only on close
+ * step | configures the step of the years in drop-down boxes; default: 2
+ * position | configures the calendar absolute position; default: null
+ * cache | if "true" (but default: "false") it will reuse the same calendar object, where possible
+ * showOthers | if "true" (but default: "false") it will show days from other months too
+ *
+ * None of them is required, they all have default values. However, if you
+ * pass none of "inputField", "displayArea" or "button" you'll get a warning
+ * saying "nothing to setup".
+ */
+Calendar.setup = function (params) {
+ function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } };
+
+ param_default("inputField", null);
+ param_default("displayArea", null);
+ param_default("button", null);
+ param_default("eventName", "click");
+ param_default("ifFormat", "%Y/%m/%d");
+ param_default("daFormat", "%Y/%m/%d");
+ param_default("singleClick", true);
+ param_default("disableFunc", null);
+ param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined
+ param_default("dateText", null);
+ param_default("firstDay", null);
+ param_default("align", "Br");
+ param_default("range", [1900, 2999]);
+ param_default("weekNumbers", true);
+ param_default("flat", null);
+ param_default("flatCallback", null);
+ param_default("onSelect", null);
+ param_default("onClose", null);
+ param_default("onUpdate", null);
+ param_default("date", null);
+ param_default("showsTime", false);
+ param_default("timeFormat", "24");
+ param_default("electric", true);
+ param_default("step", 2);
+ param_default("position", null);
+ param_default("cache", false);
+ param_default("showOthers", false);
+ param_default("multiple", null);
+
+ var tmp = ["inputField", "displayArea", "button"];
+ for (var i in tmp) {
+ if (typeof params[tmp[i]] == "string") {
+ params[tmp[i]] = document.getElementById(params[tmp[i]]);
+ }
+ }
+ if (!(params.flat || params.multiple || params.inputField || params.displayArea || params.button)) {
+ alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code");
+ return false;
+ }
+
+ function onSelect(cal) {
+ var p = cal.params;
+ var update = (cal.dateClicked || p.electric);
+ if (update && p.inputField) {
+ p.inputField.value = cal.date.print(p.ifFormat);
+ if (typeof p.inputField.onchange == "function")
+ p.inputField.onchange();
+ }
+ if (update && p.displayArea)
+ p.displayArea.innerHTML = cal.date.print(p.daFormat);
+ if (update && typeof p.onUpdate == "function")
+ p.onUpdate(cal);
+ if (update && p.flat) {
+ if (typeof p.flatCallback == "function")
+ p.flatCallback(cal);
+ }
+ if (update && p.singleClick && cal.dateClicked)
+ cal.callCloseHandler();
+ };
+
+ if (params.flat != null) {
+ if (typeof params.flat == "string")
+ params.flat = document.getElementById(params.flat);
+ if (!params.flat) {
+ alert("Calendar.setup:\n Flat specified but can't find parent.");
+ return false;
+ }
+ var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect);
+ cal.showsOtherMonths = params.showOthers;
+ cal.showsTime = params.showsTime;
+ cal.time24 = (params.timeFormat == "24");
+ cal.params = params;
+ cal.weekNumbers = params.weekNumbers;
+ cal.setRange(params.range[0], params.range[1]);
+ cal.setDateStatusHandler(params.dateStatusFunc);
+ cal.getDateText = params.dateText;
+ if (params.ifFormat) {
+ cal.setDateFormat(params.ifFormat);
+ }
+ if (params.inputField && typeof params.inputField.value == "string") {
+ cal.parseDate(params.inputField.value);
+ }
+ cal.create(params.flat);
+ cal.show();
+ return false;
+ }
+
+ var triggerEl = params.button || params.displayArea || params.inputField;
+ triggerEl["on" + params.eventName] = function() {
+ var dateEl = params.inputField || params.displayArea;
+ var dateFmt = params.inputField ? params.ifFormat : params.daFormat;
+ var mustCreate = false;
+ var cal = window.calendar;
+ if (dateEl)
+ params.date = Date.parseDate(dateEl.value || dateEl.innerHTML, dateFmt);
+ if (!(cal && params.cache)) {
+ window.calendar = cal = new Calendar(params.firstDay,
+ params.date,
+ params.onSelect || onSelect,
+ params.onClose || function(cal) { cal.hide(); });
+ cal.showsTime = params.showsTime;
+ cal.time24 = (params.timeFormat == "24");
+ cal.weekNumbers = params.weekNumbers;
+ mustCreate = true;
+ } else {
+ if (params.date)
+ cal.setDate(params.date);
+ cal.hide();
+ }
+ if (params.multiple) {
+ cal.multiple = {};
+ for (var i = params.multiple.length; --i >= 0;) {
+ var d = params.multiple[i];
+ var ds = d.print("%Y%m%d");
+ cal.multiple[ds] = d;
+ }
+ }
+ cal.showsOtherMonths = params.showOthers;
+ cal.yearStep = params.step;
+ cal.setRange(params.range[0], params.range[1]);
+ cal.params = params;
+ cal.setDateStatusHandler(params.dateStatusFunc);
+ cal.getDateText = params.dateText;
+ cal.setDateFormat(dateFmt);
+ if (mustCreate)
+ cal.create();
+ cal.refresh();
+ if (!params.position)
+ cal.showAtElement(params.button || params.displayArea || params.inputField, params.align);
+ else
+ cal.showAt(params.position[0], params.position[1]);
+ return false;
+ };
+
+ return cal;
+};
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar-setup_stripped.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar-setup_stripped.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar-setup_stripped.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,21 @@
+/* Copyright Mihai Bazon, 2002, 2003 | http://dynarch.com/mishoo/
+ * ---------------------------------------------------------------------------
+ *
+ * The DHTML Calendar
+ *
+ * Details and latest version at:
+ * http://dynarch.com/mishoo/calendar.epl
+ *
+ * This script is distributed under the GNU Lesser General Public License.
+ * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
+ *
+ * This file defines helper functions for setting up the calendar. They are
+ * intended to help non-programmers get a working calendar on their site
+ * quickly. This script should not be seen as part of the calendar. It just
+ * shows you what one can do with the calendar, while in the same time
+ * providing a quick and simple method for setting it up. If you need
+ * exhaustive customization of the calendar creation process feel free to
+ * modify this code to suit your needs (this is recommended and much better
+ * than modifying calendar.js itself).
+ */
+ Calendar.setup=function(params){function param_default(pname,def){if(typeof params[pname]=="undefined"){params[pname]=def;}};param_default("inputField",null);param_default("displayArea",null);param_default("button",null);param_default("eventName","click");param_default("ifFormat","%Y/%m/%d");param_default("daFormat","%Y/%m/%d");param_default("singleClick",true);param_default("disableFunc",null);param_default("dateStatusFunc",params["disableFunc"]);param_default("dateText",null);param_default("firstDay",null);param_default("align","Br");param_default("range",[1900,2999]);param_default("weekNumbers",true);param_default("flat",null);param_default("flatCallback",null);param_default("onSelect",null);param_default("onClose",null);param_default("onUpdate",null);param_default("date",null);param_default("showsTime",false);param_default("timeFormat","24");param_default("electric",true);param_default("step",2);param_default("position",null);param_default("cache",false);param_default(!
"showOthers",false);param_default("multiple",null);var tmp=["inputField","displayArea","button"];for(var i in tmp){if(typeof params[tmp[i]]=="string"){params[tmp[i]]=document.getElementById(params[tmp[i]]);}}if(!(params.flat||params.multiple||params.inputField||params.displayArea||params.button)){alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code");return false;}function onSelect(cal){var p=cal.params;var update=(cal.dateClicked||p.electric);if(update&&p.inputField){p.inputField.value=cal.date.print(p.ifFormat);if(typeof p.inputField.onchange=="function")p.inputField.onchange();}if(update&&p.displayArea)p.displayArea.innerHTML=cal.date.print(p.daFormat);if(update&&typeof p.onUpdate=="function")p.onUpdate(cal);if(update&&p.flat){if(typeof p.flatCallback=="function")p.flatCallback(cal);}if(update&&p.singleClick&&cal.dateClicked)cal.callCloseHandler();};if(params.flat!=null){if(typeof params.flat=="string")params.flat=document.getElementById(!
params.flat);if(!params.flat){alert("Calendar.setup:\n Flat s!
pecified
but can't find parent.");return false;}var cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect);cal.showsOtherMonths=params.showOthers;cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.params=params;cal.weekNumbers=params.weekNumbers;cal.setRange(params.range[0],params.range[1]);cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;if(params.ifFormat){cal.setDateFormat(params.ifFormat);}if(params.inputField&&typeof params.inputField.value=="string"){cal.parseDate(params.inputField.value);}cal.create(params.flat);cal.show();return false;}var triggerEl=params.button||params.displayArea||params.inputField;triggerEl["on"+params.eventName]=function(){var dateEl=params.inputField||params.displayArea;var dateFmt=params.inputField?params.ifFormat:params.daFormat;var mustCreate=false;var cal=window.calendar;if(dateEl)params.date=Date.parseDate(dateEl.value||dateEl.innerHTML,dateFmt);if(!(cal&¶ms.cache)){window.ca!
lendar=cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect,params.onClose||function(cal){cal.hide();});cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.weekNumbers=params.weekNumbers;mustCreate=true;}else{if(params.date)cal.setDate(params.date);cal.hide();}if(params.multiple){cal.multiple={};for(var i=params.multiple.length;--i>=0;){var d=params.multiple[i];var ds=d.print("%Y%m%d");cal.multiple[ds]=d;}}cal.showsOtherMonths=params.showOthers;cal.yearStep=params.step;cal.setRange(params.range[0],params.range[1]);cal.params=params;cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;cal.setDateFormat(dateFmt);if(mustCreate)cal.create();cal.refresh();if(!params.position)cal.showAtElement(params.button||params.displayArea||params.inputField,params.align);else cal.showAt(params.position[0],params.position[1]);return false;};return cal;};
\ No newline at end of file
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,1806 @@
+/* Copyright Mihai Bazon, 2002-2005 | www.bazon.net/mishoo
+ * -----------------------------------------------------------
+ *
+ * The DHTML Calendar, version 1.0 "It is happening again"
+ *
+ * Details and latest version at:
+ * www.dynarch.com/projects/calendar
+ *
+ * This script is developed by Dynarch.com. Visit us at www.dynarch.com.
+ *
+ * This script is distributed under the GNU Lesser General Public License.
+ * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
+ */
+
+// $Id: calendar.js,v 1.1.2.1 2005/04/19 14:35:24 mithyt2 Exp $
+
+/** The Calendar object constructor. */
+Calendar = function (firstDayOfWeek, dateStr, onSelected, onClose) {
+ // member variables
+ this.activeDiv = null;
+ this.currentDateEl = null;
+ this.getDateStatus = null;
+ this.getDateToolTip = null;
+ this.getDateText = null;
+ this.timeout = null;
+ this.onSelected = onSelected || null;
+ this.onClose = onClose || null;
+ this.dragging = false;
+ this.hidden = false;
+ this.minYear = 1970;
+ this.maxYear = 2050;
+ this.dateFormat = Calendar._TT["DEF_DATE_FORMAT"];
+ this.ttDateFormat = Calendar._TT["TT_DATE_FORMAT"];
+ this.isPopup = true;
+ this.weekNumbers = true;
+ this.firstDayOfWeek = typeof firstDayOfWeek == "number" ? firstDayOfWeek : Calendar._FD; // 0 for Sunday, 1 for Monday, etc.
+ this.showsOtherMonths = false;
+ this.dateStr = dateStr;
+ this.ar_days = null;
+ this.showsTime = false;
+ this.time24 = true;
+ this.yearStep = 2;
+ this.hiliteToday = true;
+ this.multiple = null;
+ // HTML elements
+ this.table = null;
+ this.element = null;
+ this.tbody = null;
+ this.firstdayname = null;
+ // Combo boxes
+ this.monthsCombo = null;
+ this.yearsCombo = null;
+ this.hilitedMonth = null;
+ this.activeMonth = null;
+ this.hilitedYear = null;
+ this.activeYear = null;
+ // Information
+ this.dateClicked = false;
+
+ // one-time initializations
+ if (typeof Calendar._SDN == "undefined") {
+ // table of short day names
+ if (typeof Calendar._SDN_len == "undefined")
+ Calendar._SDN_len = 3;
+ var ar = new Array();
+ for (var i = 8; i > 0;) {
+ ar[--i] = Calendar._DN[i].substr(0, Calendar._SDN_len);
+ }
+ Calendar._SDN = ar;
+ // table of short month names
+ if (typeof Calendar._SMN_len == "undefined")
+ Calendar._SMN_len = 3;
+ ar = new Array();
+ for (var i = 12; i > 0;) {
+ ar[--i] = Calendar._MN[i].substr(0, Calendar._SMN_len);
+ }
+ Calendar._SMN = ar;
+ }
+};
+
+// ** constants
+
+/// "static", needed for event handlers.
+Calendar._C = null;
+
+/// detect a special case of "web browser"
+Calendar.is_ie = ( /msie/i.test(navigator.userAgent) &&
+ !/opera/i.test(navigator.userAgent) );
+
+Calendar.is_ie5 = ( Calendar.is_ie && /msie 5\.0/i.test(navigator.userAgent) );
+
+/// detect Opera browser
+Calendar.is_opera = /opera/i.test(navigator.userAgent);
+
+/// detect KHTML-based browsers
+Calendar.is_khtml = /Konqueror|Safari|KHTML/i.test(navigator.userAgent);
+
+// BEGIN: UTILITY FUNCTIONS; beware that these might be moved into a separate
+// library, at some point.
+
+Calendar.getAbsolutePos = function(el) {
+ var SL = 0, ST = 0;
+ var is_div = /^div$/i.test(el.tagName);
+ if (is_div && el.scrollLeft)
+ SL = el.scrollLeft;
+ if (is_div && el.scrollTop)
+ ST = el.scrollTop;
+ var r = { x: el.offsetLeft - SL, y: el.offsetTop - ST };
+ if (el.offsetParent) {
+ var tmp = this.getAbsolutePos(el.offsetParent);
+ r.x += tmp.x;
+ r.y += tmp.y;
+ }
+ return r;
+};
+
+Calendar.isRelated = function (el, evt) {
+ var related = evt.relatedTarget;
+ if (!related) {
+ var type = evt.type;
+ if (type == "mouseover") {
+ related = evt.fromElement;
+ } else if (type == "mouseout") {
+ related = evt.toElement;
+ }
+ }
+ while (related) {
+ if (related == el) {
+ return true;
+ }
+ related = related.parentNode;
+ }
+ return false;
+};
+
+Calendar.removeClass = function(el, className) {
+ if (!(el && el.className)) {
+ return;
+ }
+ var cls = el.className.split(" ");
+ var ar = new Array();
+ for (var i = cls.length; i > 0;) {
+ if (cls[--i] != className) {
+ ar[ar.length] = cls[i];
+ }
+ }
+ el.className = ar.join(" ");
+};
+
+Calendar.addClass = function(el, className) {
+ Calendar.removeClass(el, className);
+ el.className += " " + className;
+};
+
+// FIXME: the following 2 functions totally suck, are useless and should be replaced immediately.
+Calendar.getElement = function(ev) {
+ var f = Calendar.is_ie ? window.event.srcElement : ev.currentTarget;
+ while (f.nodeType != 1 || /^div$/i.test(f.tagName))
+ f = f.parentNode;
+ return f;
+};
+
+Calendar.getTargetElement = function(ev) {
+ var f = Calendar.is_ie ? window.event.srcElement : ev.target;
+ while (f.nodeType != 1)
+ f = f.parentNode;
+ return f;
+};
+
+Calendar.stopEvent = function(ev) {
+ ev || (ev = window.event);
+ if (Calendar.is_ie) {
+ ev.cancelBubble = true;
+ ev.returnValue = false;
+ } else {
+ ev.preventDefault();
+ ev.stopPropagation();
+ }
+ return false;
+};
+
+Calendar.addEvent = function(el, evname, func) {
+ if (el.attachEvent) { // IE
+ el.attachEvent("on" + evname, func);
+ } else if (el.addEventListener) { // Gecko / W3C
+ el.addEventListener(evname, func, true);
+ } else {
+ el["on" + evname] = func;
+ }
+};
+
+Calendar.removeEvent = function(el, evname, func) {
+ if (el.detachEvent) { // IE
+ el.detachEvent("on" + evname, func);
+ } else if (el.removeEventListener) { // Gecko / W3C
+ el.removeEventListener(evname, func, true);
+ } else {
+ el["on" + evname] = null;
+ }
+};
+
+Calendar.createElement = function(type, parent) {
+ var el = null;
+ if (document.createElementNS) {
+ // use the XHTML namespace; IE won't normally get here unless
+ // _they_ "fix" the DOM2 implementation.
+ el = document.createElementNS("http://www.w3.org/1999/xhtml", type);
+ } else {
+ el = document.createElement(type);
+ }
+ if (typeof parent != "undefined") {
+ parent.appendChild(el);
+ }
+ return el;
+};
+
+// END: UTILITY FUNCTIONS
+
+// BEGIN: CALENDAR STATIC FUNCTIONS
+
+/** Internal -- adds a set of events to make some element behave like a button. */
+Calendar._add_evs = function(el) {
+ with (Calendar) {
+ addEvent(el, "mouseover", dayMouseOver);
+ addEvent(el, "mousedown", dayMouseDown);
+ addEvent(el, "mouseout", dayMouseOut);
+ if (is_ie) {
+ addEvent(el, "dblclick", dayMouseDblClick);
+ el.setAttribute("unselectable", true);
+ }
+ }
+};
+
+Calendar.findMonth = function(el) {
+ if (typeof el.month != "undefined") {
+ return el;
+ } else if (typeof el.parentNode.month != "undefined") {
+ return el.parentNode;
+ }
+ return null;
+};
+
+Calendar.findYear = function(el) {
+ if (typeof el.year != "undefined") {
+ return el;
+ } else if (typeof el.parentNode.year != "undefined") {
+ return el.parentNode;
+ }
+ return null;
+};
+
+Calendar.showMonthsCombo = function () {
+ var cal = Calendar._C;
+ if (!cal) {
+ return false;
+ }
+ var cal = cal;
+ var cd = cal.activeDiv;
+ var mc = cal.monthsCombo;
+ if (cal.hilitedMonth) {
+ Calendar.removeClass(cal.hilitedMonth, "hilite");
+ }
+ if (cal.activeMonth) {
+ Calendar.removeClass(cal.activeMonth, "active");
+ }
+ var mon = cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];
+ Calendar.addClass(mon, "active");
+ cal.activeMonth = mon;
+ var s = mc.style;
+ s.display = "block";
+ if (cd.navtype < 0)
+ s.left = cd.offsetLeft + "px";
+ else {
+ var mcw = mc.offsetWidth;
+ if (typeof mcw == "undefined")
+ // Konqueror brain-dead techniques
+ mcw = 50;
+ s.left = (cd.offsetLeft + cd.offsetWidth - mcw) + "px";
+ }
+ s.top = (cd.offsetTop + cd.offsetHeight) + "px";
+};
+
+Calendar.showYearsCombo = function (fwd) {
+ var cal = Calendar._C;
+ if (!cal) {
+ return false;
+ }
+ var cal = cal;
+ var cd = cal.activeDiv;
+ var yc = cal.yearsCombo;
+ if (cal.hilitedYear) {
+ Calendar.removeClass(cal.hilitedYear, "hilite");
+ }
+ if (cal.activeYear) {
+ Calendar.removeClass(cal.activeYear, "active");
+ }
+ cal.activeYear = null;
+ var Y = cal.date.getFullYear() + (fwd ? 1 : -1);
+ var yr = yc.firstChild;
+ var show = false;
+ for (var i = 12; i > 0; --i) {
+ if (Y >= cal.minYear && Y <= cal.maxYear) {
+ yr.innerHTML = Y;
+ yr.year = Y;
+ yr.style.display = "block";
+ show = true;
+ } else {
+ yr.style.display = "none";
+ }
+ yr = yr.nextSibling;
+ Y += fwd ? cal.yearStep : -cal.yearStep;
+ }
+ if (show) {
+ var s = yc.style;
+ s.display = "block";
+ if (cd.navtype < 0)
+ s.left = cd.offsetLeft + "px";
+ else {
+ var ycw = yc.offsetWidth;
+ if (typeof ycw == "undefined")
+ // Konqueror brain-dead techniques
+ ycw = 50;
+ s.left = (cd.offsetLeft + cd.offsetWidth - ycw) + "px";
+ }
+ s.top = (cd.offsetTop + cd.offsetHeight) + "px";
+ }
+};
+
+// event handlers
+
+Calendar.tableMouseUp = function(ev) {
+ var cal = Calendar._C;
+ if (!cal) {
+ return false;
+ }
+ if (cal.timeout) {
+ clearTimeout(cal.timeout);
+ }
+ var el = cal.activeDiv;
+ if (!el) {
+ return false;
+ }
+ var target = Calendar.getTargetElement(ev);
+ ev || (ev = window.event);
+ Calendar.removeClass(el, "active");
+ if (target == el || target.parentNode == el) {
+ Calendar.cellClick(el, ev);
+ }
+ var mon = Calendar.findMonth(target);
+ var date = null;
+ if (mon) {
+ date = new Date(cal.date);
+ if (mon.month != date.getMonth()) {
+ date.setMonth(mon.month);
+ cal.setDate(date);
+ cal.dateClicked = false;
+ cal.callHandler();
+ }
+ } else {
+ var year = Calendar.findYear(target);
+ if (year) {
+ date = new Date(cal.date);
+ if (year.year != date.getFullYear()) {
+ date.setFullYear(year.year);
+ cal.setDate(date);
+ cal.dateClicked = false;
+ cal.callHandler();
+ }
+ }
+ }
+ with (Calendar) {
+ removeEvent(document, "mouseup", tableMouseUp);
+ removeEvent(document, "mouseover", tableMouseOver);
+ removeEvent(document, "mousemove", tableMouseOver);
+ cal._hideCombos();
+ _C = null;
+ return stopEvent(ev);
+ }
+};
+
+Calendar.tableMouseOver = function (ev) {
+ var cal = Calendar._C;
+ if (!cal) {
+ return;
+ }
+ var el = cal.activeDiv;
+ var target = Calendar.getTargetElement(ev);
+ if (target == el || target.parentNode == el) {
+ Calendar.addClass(el, "hilite active");
+ Calendar.addClass(el.parentNode, "rowhilite");
+ } else {
+ if (typeof el.navtype == "undefined" || (el.navtype != 50 && (el.navtype == 0 || Math.abs(el.navtype) > 2)))
+ Calendar.removeClass(el, "active");
+ Calendar.removeClass(el, "hilite");
+ Calendar.removeClass(el.parentNode, "rowhilite");
+ }
+ ev || (ev = window.event);
+ if (el.navtype == 50 && target != el) {
+ var pos = Calendar.getAbsolutePos(el);
+ var w = el.offsetWidth;
+ var x = ev.clientX;
+ var dx;
+ var decrease = true;
+ if (x > pos.x + w) {
+ dx = x - pos.x - w;
+ decrease = false;
+ } else
+ dx = pos.x - x;
+
+ if (dx < 0) dx = 0;
+ var range = el._range;
+ var current = el._current;
+ var count = Math.floor(dx / 10) % range.length;
+ for (var i = range.length; --i >= 0;)
+ if (range[i] == current)
+ break;
+ while (count-- > 0)
+ if (decrease) {
+ if (--i < 0)
+ i = range.length - 1;
+ } else if ( ++i >= range.length )
+ i = 0;
+ var newval = range[i];
+ el.innerHTML = newval;
+
+ cal.onUpdateTime();
+ }
+ var mon = Calendar.findMonth(target);
+ if (mon) {
+ if (mon.month != cal.date.getMonth()) {
+ if (cal.hilitedMonth) {
+ Calendar.removeClass(cal.hilitedMonth, "hilite");
+ }
+ Calendar.addClass(mon, "hilite");
+ cal.hilitedMonth = mon;
+ } else if (cal.hilitedMonth) {
+ Calendar.removeClass(cal.hilitedMonth, "hilite");
+ }
+ } else {
+ if (cal.hilitedMonth) {
+ Calendar.removeClass(cal.hilitedMonth, "hilite");
+ }
+ var year = Calendar.findYear(target);
+ if (year) {
+ if (year.year != cal.date.getFullYear()) {
+ if (cal.hilitedYear) {
+ Calendar.removeClass(cal.hilitedYear, "hilite");
+ }
+ Calendar.addClass(year, "hilite");
+ cal.hilitedYear = year;
+ } else if (cal.hilitedYear) {
+ Calendar.removeClass(cal.hilitedYear, "hilite");
+ }
+ } else if (cal.hilitedYear) {
+ Calendar.removeClass(cal.hilitedYear, "hilite");
+ }
+ }
+ return Calendar.stopEvent(ev);
+};
+
+Calendar.tableMouseDown = function (ev) {
+ if (Calendar.getTargetElement(ev) == Calendar.getElement(ev)) {
+ return Calendar.stopEvent(ev);
+ }
+};
+
+Calendar.calDragIt = function (ev) {
+ var cal = Calendar._C;
+ if (!(cal && cal.dragging)) {
+ return false;
+ }
+ var posX;
+ var posY;
+ if (Calendar.is_ie) {
+ posY = window.event.clientY + document.body.scrollTop;
+ posX = window.event.clientX + document.body.scrollLeft;
+ } else {
+ posX = ev.pageX;
+ posY = ev.pageY;
+ }
+ cal.hideShowCovered();
+ var st = cal.element.style;
+ st.left = (posX - cal.xOffs) + "px";
+ st.top = (posY - cal.yOffs) + "px";
+ return Calendar.stopEvent(ev);
+};
+
+Calendar.calDragEnd = function (ev) {
+ var cal = Calendar._C;
+ if (!cal) {
+ return false;
+ }
+ cal.dragging = false;
+ with (Calendar) {
+ removeEvent(document, "mousemove", calDragIt);
+ removeEvent(document, "mouseup", calDragEnd);
+ tableMouseUp(ev);
+ }
+ cal.hideShowCovered();
+};
+
+Calendar.dayMouseDown = function(ev) {
+ var el = Calendar.getElement(ev);
+ if (el.disabled) {
+ return false;
+ }
+ var cal = el.calendar;
+ cal.activeDiv = el;
+ Calendar._C = cal;
+ if (el.navtype != 300) with (Calendar) {
+ if (el.navtype == 50) {
+ el._current = el.innerHTML;
+ addEvent(document, "mousemove", tableMouseOver);
+ } else
+ addEvent(document, Calendar.is_ie5 ? "mousemove" : "mouseover", tableMouseOver);
+ addClass(el, "hilite active");
+ addEvent(document, "mouseup", tableMouseUp);
+ } else if (cal.isPopup) {
+ cal._dragStart(ev);
+ }
+ if (el.navtype == -1 || el.navtype == 1) {
+ if (cal.timeout) clearTimeout(cal.timeout);
+ cal.timeout = setTimeout("Calendar.showMonthsCombo()", 250);
+ } else if (el.navtype == -2 || el.navtype == 2) {
+ if (cal.timeout) clearTimeout(cal.timeout);
+ cal.timeout = setTimeout((el.navtype > 0) ? "Calendar.showYearsCombo(true)" : "Calendar.showYearsCombo(false)", 250);
+ } else {
+ cal.timeout = null;
+ }
+ return Calendar.stopEvent(ev);
+};
+
+Calendar.dayMouseDblClick = function(ev) {
+ Calendar.cellClick(Calendar.getElement(ev), ev || window.event);
+ if (Calendar.is_ie) {
+ document.selection.empty();
+ }
+};
+
+Calendar.dayMouseOver = function(ev) {
+ var el = Calendar.getElement(ev);
+ if (Calendar.isRelated(el, ev) || Calendar._C || el.disabled) {
+ return false;
+ }
+ if (el.ttip) {
+ if (el.ttip.substr(0, 1) == "_") {
+ el.ttip = el.caldate.print(el.calendar.ttDateFormat) + el.ttip.substr(1);
+ }
+ el.calendar.tooltips.innerHTML = el.ttip;
+ }
+ if (el.navtype != 300) {
+ Calendar.addClass(el, "hilite");
+ if (el.caldate) {
+ Calendar.addClass(el.parentNode, "rowhilite");
+ }
+ }
+ return Calendar.stopEvent(ev);
+};
+
+Calendar.dayMouseOut = function(ev) {
+ with (Calendar) {
+ var el = getElement(ev);
+ if (isRelated(el, ev) || _C || el.disabled)
+ return false;
+ removeClass(el, "hilite");
+ if (el.caldate)
+ removeClass(el.parentNode, "rowhilite");
+ if (el.calendar)
+ el.calendar.tooltips.innerHTML = _TT["SEL_DATE"];
+ return stopEvent(ev);
+ }
+};
+
+/**
+ * A generic "click" handler :) handles all types of buttons defined in this
+ * calendar.
+ */
+Calendar.cellClick = function(el, ev) {
+ var cal = el.calendar;
+ var closing = false;
+ var newdate = false;
+ var date = null;
+ if (typeof el.navtype == "undefined") {
+ if (cal.currentDateEl) {
+ Calendar.removeClass(cal.currentDateEl, "selected");
+ Calendar.addClass(el, "selected");
+ closing = (cal.currentDateEl == el);
+ if (!closing) {
+ cal.currentDateEl = el;
+ }
+ }
+ cal.date.setDateOnly(el.caldate);
+ date = cal.date;
+ var other_month = !(cal.dateClicked = !el.otherMonth);
+ if (!other_month && !cal.currentDateEl)
+ cal._toggleMultipleDate(new Date(date));
+ else
+ newdate = !el.disabled;
+ // a date was clicked
+ if (other_month)
+ cal._init(cal.firstDayOfWeek, date);
+ } else {
+ if (el.navtype == 200) {
+ Calendar.removeClass(el, "hilite");
+ cal.callCloseHandler();
+ return;
+ }
+ date = new Date(cal.date);
+ if (el.navtype == 0)
+ date.setDateOnly(new Date()); // TODAY
+ // unless "today" was clicked, we assume no date was clicked so
+ // the selected handler will know not to close the calenar when
+ // in single-click mode.
+ // cal.dateClicked = (el.navtype == 0);
+ cal.dateClicked = false;
+ var year = date.getFullYear();
+ var mon = date.getMonth();
+ function setMonth(m) {
+ var day = date.getDate();
+ var max = date.getMonthDays(m);
+ if (day > max) {
+ date.setDate(max);
+ }
+ date.setMonth(m);
+ };
+ switch (el.navtype) {
+ case 400:
+ Calendar.removeClass(el, "hilite");
+ var text = Calendar._TT["ABOUT"];
+ if (typeof text != "undefined") {
+ text += cal.showsTime ? Calendar._TT["ABOUT_TIME"] : "";
+ } else {
+ // FIXME: this should be removed as soon as lang files get updated!
+ text = "Help and about box text is not translated into this language.\n" +
+ "If you know this language and you feel generous please update\n" +
+ "the corresponding file in \"lang\" subdir to match calendar-en.js\n" +
+ "and send it back to <mihai_bazon at yahoo.com> to get it into the distribution ;-)\n\n" +
+ "Thank you!\n" +
+ "http://dynarch.com/mishoo/calendar.epl\n";
+ }
+ alert(text);
+ return;
+ case -2:
+ if (year > cal.minYear) {
+ date.setFullYear(year - 1);
+ }
+ break;
+ case -1:
+ if (mon > 0) {
+ setMonth(mon - 1);
+ } else if (year-- > cal.minYear) {
+ date.setFullYear(year);
+ setMonth(11);
+ }
+ break;
+ case 1:
+ if (mon < 11) {
+ setMonth(mon + 1);
+ } else if (year < cal.maxYear) {
+ date.setFullYear(year + 1);
+ setMonth(0);
+ }
+ break;
+ case 2:
+ if (year < cal.maxYear) {
+ date.setFullYear(year + 1);
+ }
+ break;
+ case 100:
+ cal.setFirstDayOfWeek(el.fdow);
+ return;
+ case 50:
+ var range = el._range;
+ var current = el.innerHTML;
+ for (var i = range.length; --i >= 0;)
+ if (range[i] == current)
+ break;
+ if (ev && ev.shiftKey) {
+ if (--i < 0)
+ i = range.length - 1;
+ } else if ( ++i >= range.length )
+ i = 0;
+ var newval = range[i];
+ el.innerHTML = newval;
+ cal.onUpdateTime();
+ return;
+ case 0:
+ // TODAY will bring us here
+ if ((typeof cal.getDateStatus == "function") &&
+ cal.getDateStatus(date, date.getFullYear(), date.getMonth(), date.getDate())) {
+ return false;
+ }
+ break;
+ }
+ if (!date.equalsTo(cal.date)) {
+ cal.setDate(date);
+ newdate = true;
+ } else if (el.navtype == 0)
+ newdate = closing = true;
+ }
+ if (newdate) {
+ ev && cal.callHandler();
+ }
+ if (closing) {
+ Calendar.removeClass(el, "hilite");
+ ev && cal.callCloseHandler();
+ }
+};
+
+// END: CALENDAR STATIC FUNCTIONS
+
+// BEGIN: CALENDAR OBJECT FUNCTIONS
+
+/**
+ * This function creates the calendar inside the given parent. If _par is
+ * null than it creates a popup calendar inside the BODY element. If _par is
+ * an element, be it BODY, then it creates a non-popup calendar (still
+ * hidden). Some properties need to be set before calling this function.
+ */
+Calendar.prototype.create = function (_par) {
+ var parent = null;
+ if (! _par) {
+ // default parent is the document body, in which case we create
+ // a popup calendar.
+ parent = document.getElementsByTagName("body")[0];
+ this.isPopup = true;
+ } else {
+ parent = _par;
+ this.isPopup = false;
+ }
+ this.date = this.dateStr ? new Date(this.dateStr) : new Date();
+
+ var table = Calendar.createElement("table");
+ this.table = table;
+ table.cellSpacing = 0;
+ table.cellPadding = 0;
+ table.calendar = this;
+ Calendar.addEvent(table, "mousedown", Calendar.tableMouseDown);
+
+ var div = Calendar.createElement("div");
+ this.element = div;
+ div.className = "calendar";
+ if (this.isPopup) {
+ div.style.position = "absolute";
+ div.style.display = "none";
+ }
+ div.appendChild(table);
+
+ var thead = Calendar.createElement("thead", table);
+ var cell = null;
+ var row = null;
+
+ var cal = this;
+ var hh = function (text, cs, navtype) {
+ cell = Calendar.createElement("td", row);
+ cell.colSpan = cs;
+ cell.className = "button";
+ if (navtype != 0 && Math.abs(navtype) <= 2)
+ cell.className += " nav";
+ Calendar._add_evs(cell);
+ cell.calendar = cal;
+ cell.navtype = navtype;
+ cell.innerHTML = "<div unselectable='on'>" + text + "</div>";
+ return cell;
+ };
+
+ row = Calendar.createElement("tr", thead);
+ var title_length = 6;
+ (this.isPopup) && --title_length;
+ (this.weekNumbers) && ++title_length;
+
+ hh("?", 1, 400).ttip = Calendar._TT["INFO"];
+ this.title = hh("", title_length, 300);
+ this.title.className = "title";
+ if (this.isPopup) {
+ this.title.ttip = Calendar._TT["DRAG_TO_MOVE"];
+ this.title.style.cursor = "move";
+ hh("×", 1, 200).ttip = Calendar._TT["CLOSE"];
+ }
+
+ row = Calendar.createElement("tr", thead);
+ row.className = "headrow";
+
+ this._nav_py = hh("«", 1, -2);
+ this._nav_py.ttip = Calendar._TT["PREV_YEAR"];
+
+ this._nav_pm = hh("‹", 1, -1);
+ this._nav_pm.ttip = Calendar._TT["PREV_MONTH"];
+
+ this._nav_now = hh(Calendar._TT["TODAY"], this.weekNumbers ? 4 : 3, 0);
+ this._nav_now.ttip = Calendar._TT["GO_TODAY"];
+
+ this._nav_nm = hh("›", 1, 1);
+ this._nav_nm.ttip = Calendar._TT["NEXT_MONTH"];
+
+ this._nav_ny = hh("»", 1, 2);
+ this._nav_ny.ttip = Calendar._TT["NEXT_YEAR"];
+
+ // day names
+ row = Calendar.createElement("tr", thead);
+ row.className = "daynames";
+ if (this.weekNumbers) {
+ cell = Calendar.createElement("td", row);
+ cell.className = "name wn";
+ cell.innerHTML = Calendar._TT["WK"];
+ }
+ for (var i = 7; i > 0; --i) {
+ cell = Calendar.createElement("td", row);
+ if (!i) {
+ cell.navtype = 100;
+ cell.calendar = this;
+ Calendar._add_evs(cell);
+ }
+ }
+ this.firstdayname = (this.weekNumbers) ? row.firstChild.nextSibling : row.firstChild;
+ this._displayWeekdays();
+
+ var tbody = Calendar.createElement("tbody", table);
+ this.tbody = tbody;
+
+ for (i = 6; i > 0; --i) {
+ row = Calendar.createElement("tr", tbody);
+ if (this.weekNumbers) {
+ cell = Calendar.createElement("td", row);
+ }
+ for (var j = 7; j > 0; --j) {
+ cell = Calendar.createElement("td", row);
+ cell.calendar = this;
+ Calendar._add_evs(cell);
+ }
+ }
+
+ if (this.showsTime) {
+ row = Calendar.createElement("tr", tbody);
+ row.className = "time";
+
+ cell = Calendar.createElement("td", row);
+ cell.className = "time";
+ cell.colSpan = 2;
+ cell.innerHTML = Calendar._TT["TIME"] || " ";
+
+ cell = Calendar.createElement("td", row);
+ cell.className = "time";
+ cell.colSpan = this.weekNumbers ? 4 : 3;
+
+ (function(){
+ function makeTimePart(className, init, range_start, range_end) {
+ var part = Calendar.createElement("span", cell);
+ part.className = className;
+ part.innerHTML = init;
+ part.calendar = cal;
+ part.ttip = Calendar._TT["TIME_PART"];
+ part.navtype = 50;
+ part._range = [];
+ if (typeof range_start != "number")
+ part._range = range_start;
+ else {
+ for (var i = range_start; i <= range_end; ++i) {
+ var txt;
+ if (i < 10 && range_end >= 10) txt = '0' + i;
+ else txt = '' + i;
+ part._range[part._range.length] = txt;
+ }
+ }
+ Calendar._add_evs(part);
+ return part;
+ };
+ var hrs = cal.date.getHours();
+ var mins = cal.date.getMinutes();
+ var t12 = !cal.time24;
+ var pm = (hrs > 12);
+ if (t12 && pm) hrs -= 12;
+ var H = makeTimePart("hour", hrs, t12 ? 1 : 0, t12 ? 12 : 23);
+ var span = Calendar.createElement("span", cell);
+ span.innerHTML = ":";
+ span.className = "colon";
+ var M = makeTimePart("minute", mins, 0, 59);
+ var AP = null;
+ cell = Calendar.createElement("td", row);
+ cell.className = "time";
+ cell.colSpan = 2;
+ if (t12)
+ AP = makeTimePart("ampm", pm ? "pm" : "am", ["am", "pm"]);
+ else
+ cell.innerHTML = " ";
+
+ cal.onSetTime = function() {
+ var pm, hrs = this.date.getHours(),
+ mins = this.date.getMinutes();
+ if (t12) {
+ pm = (hrs >= 12);
+ if (pm) hrs -= 12;
+ if (hrs == 0) hrs = 12;
+ AP.innerHTML = pm ? "pm" : "am";
+ }
+ H.innerHTML = (hrs < 10) ? ("0" + hrs) : hrs;
+ M.innerHTML = (mins < 10) ? ("0" + mins) : mins;
+ };
+
+ cal.onUpdateTime = function() {
+ var date = this.date;
+ var h = parseInt(H.innerHTML, 10);
+ if (t12) {
+ if (/pm/i.test(AP.innerHTML) && h < 12)
+ h += 12;
+ else if (/am/i.test(AP.innerHTML) && h == 12)
+ h = 0;
+ }
+ var d = date.getDate();
+ var m = date.getMonth();
+ var y = date.getFullYear();
+ date.setHours(h);
+ date.setMinutes(parseInt(M.innerHTML, 10));
+ date.setFullYear(y);
+ date.setMonth(m);
+ date.setDate(d);
+ this.dateClicked = false;
+ this.callHandler();
+ };
+ })();
+ } else {
+ this.onSetTime = this.onUpdateTime = function() {};
+ }
+
+ var tfoot = Calendar.createElement("tfoot", table);
+
+ row = Calendar.createElement("tr", tfoot);
+ row.className = "footrow";
+
+ cell = hh(Calendar._TT["SEL_DATE"], this.weekNumbers ? 8 : 7, 300);
+ cell.className = "ttip";
+ if (this.isPopup) {
+ cell.ttip = Calendar._TT["DRAG_TO_MOVE"];
+ cell.style.cursor = "move";
+ }
+ this.tooltips = cell;
+
+ div = Calendar.createElement("div", this.element);
+ this.monthsCombo = div;
+ div.className = "combo";
+ for (i = 0; i < Calendar._MN.length; ++i) {
+ var mn = Calendar.createElement("div");
+ mn.className = Calendar.is_ie ? "label-IEfix" : "label";
+ mn.month = i;
+ mn.innerHTML = Calendar._SMN[i];
+ div.appendChild(mn);
+ }
+
+ div = Calendar.createElement("div", this.element);
+ this.yearsCombo = div;
+ div.className = "combo";
+ for (i = 12; i > 0; --i) {
+ var yr = Calendar.createElement("div");
+ yr.className = Calendar.is_ie ? "label-IEfix" : "label";
+ div.appendChild(yr);
+ }
+
+ this._init(this.firstDayOfWeek, this.date);
+ parent.appendChild(this.element);
+};
+
+/** keyboard navigation, only for popup calendars */
+Calendar._keyEvent = function(ev) {
+ var cal = window._dynarch_popupCalendar;
+ if (!cal || cal.multiple)
+ return false;
+ (Calendar.is_ie) && (ev = window.event);
+ var act = (Calendar.is_ie || ev.type == "keypress"),
+ K = ev.keyCode;
+ if (ev.ctrlKey) {
+ switch (K) {
+ case 37: // KEY left
+ act && Calendar.cellClick(cal._nav_pm);
+ break;
+ case 38: // KEY up
+ act && Calendar.cellClick(cal._nav_py);
+ break;
+ case 39: // KEY right
+ act && Calendar.cellClick(cal._nav_nm);
+ break;
+ case 40: // KEY down
+ act && Calendar.cellClick(cal._nav_ny);
+ break;
+ default:
+ return false;
+ }
+ } else switch (K) {
+ case 32: // KEY space (now)
+ Calendar.cellClick(cal._nav_now);
+ break;
+ case 27: // KEY esc
+ act && cal.callCloseHandler();
+ break;
+ case 37: // KEY left
+ case 38: // KEY up
+ case 39: // KEY right
+ case 40: // KEY down
+ if (act) {
+ var prev, x, y, ne, el, step;
+ prev = K == 37 || K == 38;
+ step = (K == 37 || K == 39) ? 1 : 7;
+ function setVars() {
+ el = cal.currentDateEl;
+ var p = el.pos;
+ x = p & 15;
+ y = p >> 4;
+ ne = cal.ar_days[y][x];
+ };setVars();
+ function prevMonth() {
+ var date = new Date(cal.date);
+ date.setDate(date.getDate() - step);
+ cal.setDate(date);
+ };
+ function nextMonth() {
+ var date = new Date(cal.date);
+ date.setDate(date.getDate() + step);
+ cal.setDate(date);
+ };
+ while (1) {
+ switch (K) {
+ case 37: // KEY left
+ if (--x >= 0)
+ ne = cal.ar_days[y][x];
+ else {
+ x = 6;
+ K = 38;
+ continue;
+ }
+ break;
+ case 38: // KEY up
+ if (--y >= 0)
+ ne = cal.ar_days[y][x];
+ else {
+ prevMonth();
+ setVars();
+ }
+ break;
+ case 39: // KEY right
+ if (++x < 7)
+ ne = cal.ar_days[y][x];
+ else {
+ x = 0;
+ K = 40;
+ continue;
+ }
+ break;
+ case 40: // KEY down
+ if (++y < cal.ar_days.length)
+ ne = cal.ar_days[y][x];
+ else {
+ nextMonth();
+ setVars();
+ }
+ break;
+ }
+ break;
+ }
+ if (ne) {
+ if (!ne.disabled)
+ Calendar.cellClick(ne);
+ else if (prev)
+ prevMonth();
+ else
+ nextMonth();
+ }
+ }
+ break;
+ case 13: // KEY enter
+ if (act)
+ Calendar.cellClick(cal.currentDateEl, ev);
+ break;
+ default:
+ return false;
+ }
+ return Calendar.stopEvent(ev);
+};
+
+/**
+ * (RE)Initializes the calendar to the given date and firstDayOfWeek
+ */
+Calendar.prototype._init = function (firstDayOfWeek, date) {
+ var today = new Date(),
+ TY = today.getFullYear(),
+ TM = today.getMonth(),
+ TD = today.getDate();
+ this.table.style.visibility = "hidden";
+ var year = date.getFullYear();
+ if (year < this.minYear) {
+ year = this.minYear;
+ date.setFullYear(year);
+ } else if (year > this.maxYear) {
+ year = this.maxYear;
+ date.setFullYear(year);
+ }
+ this.firstDayOfWeek = firstDayOfWeek;
+ this.date = new Date(date);
+ var month = date.getMonth();
+ var mday = date.getDate();
+ var no_days = date.getMonthDays();
+
+ // calendar voodoo for computing the first day that would actually be
+ // displayed in the calendar, even if it's from the previous month.
+ // WARNING: this is magic. ;-)
+ date.setDate(1);
+ var day1 = (date.getDay() - this.firstDayOfWeek) % 7;
+ if (day1 < 0)
+ day1 += 7;
+ date.setDate(-day1);
+ date.setDate(date.getDate() + 1);
+
+ var row = this.tbody.firstChild;
+ var MN = Calendar._SMN[month];
+ var ar_days = this.ar_days = new Array();
+ var weekend = Calendar._TT["WEEKEND"];
+ var dates = this.multiple ? (this.datesCells = {}) : null;
+ for (var i = 0; i < 6; ++i, row = row.nextSibling) {
+ var cell = row.firstChild;
+ if (this.weekNumbers) {
+ cell.className = "day wn";
+ cell.innerHTML = date.getWeekNumber();
+ cell = cell.nextSibling;
+ }
+ row.className = "daysrow";
+ var hasdays = false, iday, dpos = ar_days[i] = [];
+ for (var j = 0; j < 7; ++j, cell = cell.nextSibling, date.setDate(iday + 1)) {
+ iday = date.getDate();
+ var wday = date.getDay();
+ cell.className = "day";
+ cell.pos = i << 4 | j;
+ dpos[j] = cell;
+ var current_month = (date.getMonth() == month);
+ if (!current_month) {
+ if (this.showsOtherMonths) {
+ cell.className += " othermonth";
+ cell.otherMonth = true;
+ } else {
+ cell.className = "emptycell";
+ cell.innerHTML = " ";
+ cell.disabled = true;
+ continue;
+ }
+ } else {
+ cell.otherMonth = false;
+ hasdays = true;
+ }
+ cell.disabled = false;
+ cell.innerHTML = this.getDateText ? this.getDateText(date, iday) : iday;
+ if (dates)
+ dates[date.print("%Y%m%d")] = cell;
+ if (this.getDateStatus) {
+ var status = this.getDateStatus(date, year, month, iday);
+ if (this.getDateToolTip) {
+ var toolTip = this.getDateToolTip(date, year, month, iday);
+ if (toolTip)
+ cell.title = toolTip;
+ }
+ if (status === true) {
+ cell.className += " disabled";
+ cell.disabled = true;
+ } else {
+ if (/disabled/i.test(status))
+ cell.disabled = true;
+ cell.className += " " + status;
+ }
+ }
+ if (!cell.disabled) {
+ cell.caldate = new Date(date);
+ cell.ttip = "_";
+ if (!this.multiple && current_month
+ && iday == mday && this.hiliteToday) {
+ cell.className += " selected";
+ this.currentDateEl = cell;
+ }
+ if (date.getFullYear() == TY &&
+ date.getMonth() == TM &&
+ iday == TD) {
+ cell.className += " today";
+ cell.ttip += Calendar._TT["PART_TODAY"];
+ }
+ if (weekend.indexOf(wday.toString()) != -1)
+ cell.className += cell.otherMonth ? " oweekend" : " weekend";
+ }
+ }
+ if (!(hasdays || this.showsOtherMonths))
+ row.className = "emptyrow";
+ }
+ this.title.innerHTML = Calendar._MN[month] + ", " + year;
+ this.onSetTime();
+ this.table.style.visibility = "visible";
+ this._initMultipleDates();
+ // PROFILE
+ // this.tooltips.innerHTML = "Generated in " + ((new Date()) - today) + " ms";
+};
+
+Calendar.prototype._initMultipleDates = function() {
+ if (this.multiple) {
+ for (var i in this.multiple) {
+ var cell = this.datesCells[i];
+ var d = this.multiple[i];
+ if (!d)
+ continue;
+ if (cell)
+ cell.className += " selected";
+ }
+ }
+};
+
+Calendar.prototype._toggleMultipleDate = function(date) {
+ if (this.multiple) {
+ var ds = date.print("%Y%m%d");
+ var cell = this.datesCells[ds];
+ if (cell) {
+ var d = this.multiple[ds];
+ if (!d) {
+ Calendar.addClass(cell, "selected");
+ this.multiple[ds] = date;
+ } else {
+ Calendar.removeClass(cell, "selected");
+ delete this.multiple[ds];
+ }
+ }
+ }
+};
+
+Calendar.prototype.setDateToolTipHandler = function (unaryFunction) {
+ this.getDateToolTip = unaryFunction;
+};
+
+/**
+ * Calls _init function above for going to a certain date (but only if the
+ * date is different than the currently selected one).
+ */
+Calendar.prototype.setDate = function (date) {
+ if (!date.equalsTo(this.date)) {
+ this._init(this.firstDayOfWeek, date);
+ }
+};
+
+/**
+ * Refreshes the calendar. Useful if the "disabledHandler" function is
+ * dynamic, meaning that the list of disabled date can change at runtime.
+ * Just * call this function if you think that the list of disabled dates
+ * should * change.
+ */
+Calendar.prototype.refresh = function () {
+ this._init(this.firstDayOfWeek, this.date);
+};
+
+/** Modifies the "firstDayOfWeek" parameter (pass 0 for Synday, 1 for Monday, etc.). */
+Calendar.prototype.setFirstDayOfWeek = function (firstDayOfWeek) {
+ this._init(firstDayOfWeek, this.date);
+ this._displayWeekdays();
+};
+
+/**
+ * Allows customization of what dates are enabled. The "unaryFunction"
+ * parameter must be a function object that receives the date (as a JS Date
+ * object) and returns a boolean value. If the returned value is true then
+ * the passed date will be marked as disabled.
+ */
+Calendar.prototype.setDateStatusHandler = Calendar.prototype.setDisabledHandler = function (unaryFunction) {
+ this.getDateStatus = unaryFunction;
+};
+
+/** Customization of allowed year range for the calendar. */
+Calendar.prototype.setRange = function (a, z) {
+ this.minYear = a;
+ this.maxYear = z;
+};
+
+/** Calls the first user handler (selectedHandler). */
+Calendar.prototype.callHandler = function () {
+ if (this.onSelected) {
+ this.onSelected(this, this.date.print(this.dateFormat));
+ }
+};
+
+/** Calls the second user handler (closeHandler). */
+Calendar.prototype.callCloseHandler = function () {
+ if (this.onClose) {
+ this.onClose(this);
+ }
+ this.hideShowCovered();
+};
+
+/** Removes the calendar object from the DOM tree and destroys it. */
+Calendar.prototype.destroy = function () {
+ var el = this.element.parentNode;
+ el.removeChild(this.element);
+ Calendar._C = null;
+ window._dynarch_popupCalendar = null;
+};
+
+/**
+ * Moves the calendar element to a different section in the DOM tree (changes
+ * its parent).
+ */
+Calendar.prototype.reparent = function (new_parent) {
+ var el = this.element;
+ el.parentNode.removeChild(el);
+ new_parent.appendChild(el);
+};
+
+// This gets called when the user presses a mouse button anywhere in the
+// document, if the calendar is shown. If the click was outside the open
+// calendar this function closes it.
+Calendar._checkCalendar = function(ev) {
+ var calendar = window._dynarch_popupCalendar;
+ if (!calendar) {
+ return false;
+ }
+ var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev);
+ for (; el != null && el != calendar.element; el = el.parentNode);
+ if (el == null) {
+ // calls closeHandler which should hide the calendar.
+ window._dynarch_popupCalendar.callCloseHandler();
+ return Calendar.stopEvent(ev);
+ }
+};
+
+/** Shows the calendar. */
+Calendar.prototype.show = function () {
+ var rows = this.table.getElementsByTagName("tr");
+ for (var i = rows.length; i > 0;) {
+ var row = rows[--i];
+ Calendar.removeClass(row, "rowhilite");
+ var cells = row.getElementsByTagName("td");
+ for (var j = cells.length; j > 0;) {
+ var cell = cells[--j];
+ Calendar.removeClass(cell, "hilite");
+ Calendar.removeClass(cell, "active");
+ }
+ }
+ this.element.style.display = "block";
+ this.hidden = false;
+ if (this.isPopup) {
+ window._dynarch_popupCalendar = this;
+ Calendar.addEvent(document, "keydown", Calendar._keyEvent);
+ Calendar.addEvent(document, "keypress", Calendar._keyEvent);
+ Calendar.addEvent(document, "mousedown", Calendar._checkCalendar);
+ }
+ this.hideShowCovered();
+};
+
+/**
+ * Hides the calendar. Also removes any "hilite" from the class of any TD
+ * element.
+ */
+Calendar.prototype.hide = function () {
+ if (this.isPopup) {
+ Calendar.removeEvent(document, "keydown", Calendar._keyEvent);
+ Calendar.removeEvent(document, "keypress", Calendar._keyEvent);
+ Calendar.removeEvent(document, "mousedown", Calendar._checkCalendar);
+ }
+ this.element.style.display = "none";
+ this.hidden = true;
+ this.hideShowCovered();
+};
+
+/**
+ * Shows the calendar at a given absolute position (beware that, depending on
+ * the calendar element style -- position property -- this might be relative
+ * to the parent's containing rectangle).
+ */
+Calendar.prototype.showAt = function (x, y) {
+ var s = this.element.style;
+ s.left = x + "px";
+ s.top = y + "px";
+ this.show();
+};
+
+/** Shows the calendar near a given element. */
+Calendar.prototype.showAtElement = function (el, opts) {
+ var self = this;
+ var p = Calendar.getAbsolutePos(el);
+ if (!opts || typeof opts != "string") {
+ this.showAt(p.x, p.y + el.offsetHeight);
+ return true;
+ }
+ function fixPosition(box) {
+ if (box.x < 0)
+ box.x = 0;
+ if (box.y < 0)
+ box.y = 0;
+ var cp = document.createElement("div");
+ var s = cp.style;
+ s.position = "absolute";
+ s.right = s.bottom = s.width = s.height = "0px";
+ document.body.appendChild(cp);
+ var br = Calendar.getAbsolutePos(cp);
+ document.body.removeChild(cp);
+ if (Calendar.is_ie) {
+ br.y += document.body.scrollTop;
+ br.x += document.body.scrollLeft;
+ } else {
+ br.y += window.scrollY;
+ br.x += window.scrollX;
+ }
+ var tmp = box.x + box.width - br.x;
+ if (tmp > 0) box.x -= tmp;
+ tmp = box.y + box.height - br.y;
+ if (tmp > 0) box.y -= tmp;
+ };
+ this.element.style.display = "block";
+ Calendar.continuation_for_the_fucking_khtml_browser = function() {
+ var w = self.element.offsetWidth;
+ var h = self.element.offsetHeight;
+ self.element.style.display = "none";
+ var valign = opts.substr(0, 1);
+ var halign = "l";
+ if (opts.length > 1) {
+ halign = opts.substr(1, 1);
+ }
+ // vertical alignment
+ switch (valign) {
+ case "T": p.y -= h; break;
+ case "B": p.y += el.offsetHeight; break;
+ case "C": p.y += (el.offsetHeight - h) / 2; break;
+ case "t": p.y += el.offsetHeight - h; break;
+ case "b": break; // already there
+ }
+ // horizontal alignment
+ switch (halign) {
+ case "L": p.x -= w; break;
+ case "R": p.x += el.offsetWidth; break;
+ case "C": p.x += (el.offsetWidth - w) / 2; break;
+ case "l": p.x += el.offsetWidth - w; break;
+ case "r": break; // already there
+ }
+ p.width = w;
+ p.height = h + 40;
+ self.monthsCombo.style.display = "none";
+ fixPosition(p);
+ self.showAt(p.x, p.y);
+ };
+ if (Calendar.is_khtml)
+ setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()", 10);
+ else
+ Calendar.continuation_for_the_fucking_khtml_browser();
+};
+
+/** Customizes the date format. */
+Calendar.prototype.setDateFormat = function (str) {
+ this.dateFormat = str;
+};
+
+/** Customizes the tooltip date format. */
+Calendar.prototype.setTtDateFormat = function (str) {
+ this.ttDateFormat = str;
+};
+
+/**
+ * Tries to identify the date represented in a string. If successful it also
+ * calls this.setDate which moves the calendar to the given date.
+ */
+Calendar.prototype.parseDate = function(str, fmt) {
+ if (!fmt)
+ fmt = this.dateFormat;
+ this.setDate(Date.parseDate(str, fmt));
+};
+
+Calendar.prototype.hideShowCovered = function () {
+ if (!Calendar.is_ie && !Calendar.is_opera)
+ return;
+ function getVisib(obj){
+ var value = obj.style.visibility;
+ if (!value) {
+ if (document.defaultView && typeof (document.defaultView.getComputedStyle) == "function") { // Gecko, W3C
+ if (!Calendar.is_khtml)
+ value = document.defaultView.
+ getComputedStyle(obj, "").getPropertyValue("visibility");
+ else
+ value = '';
+ } else if (obj.currentStyle) { // IE
+ value = obj.currentStyle.visibility;
+ } else
+ value = '';
+ }
+ return value;
+ };
+
+ var tags = new Array("applet", "iframe", "select");
+ var el = this.element;
+
+ var p = Calendar.getAbsolutePos(el);
+ var EX1 = p.x;
+ var EX2 = el.offsetWidth + EX1;
+ var EY1 = p.y;
+ var EY2 = el.offsetHeight + EY1;
+
+ for (var k = tags.length; k > 0; ) {
+ var ar = document.getElementsByTagName(tags[--k]);
+ var cc = null;
+
+ for (var i = ar.length; i > 0;) {
+ cc = ar[--i];
+
+ p = Calendar.getAbsolutePos(cc);
+ var CX1 = p.x;
+ var CX2 = cc.offsetWidth + CX1;
+ var CY1 = p.y;
+ var CY2 = cc.offsetHeight + CY1;
+
+ if (this.hidden || (CX1 > EX2) || (CX2 < EX1) || (CY1 > EY2) || (CY2 < EY1)) {
+ if (!cc.__msh_save_visibility) {
+ cc.__msh_save_visibility = getVisib(cc);
+ }
+ cc.style.visibility = cc.__msh_save_visibility;
+ } else {
+ if (!cc.__msh_save_visibility) {
+ cc.__msh_save_visibility = getVisib(cc);
+ }
+ cc.style.visibility = "hidden";
+ }
+ }
+ }
+};
+
+/** Internal function; it displays the bar with the names of the weekday. */
+Calendar.prototype._displayWeekdays = function () {
+ var fdow = this.firstDayOfWeek;
+ var cell = this.firstdayname;
+ var weekend = Calendar._TT["WEEKEND"];
+ for (var i = 0; i < 7; ++i) {
+ cell.className = "day name";
+ var realday = (i + fdow) % 7;
+ if (i) {
+ cell.ttip = Calendar._TT["DAY_FIRST"].replace("%s", Calendar._DN[realday]);
+ cell.navtype = 100;
+ cell.calendar = this;
+ cell.fdow = realday;
+ Calendar._add_evs(cell);
+ }
+ if (weekend.indexOf(realday.toString()) != -1) {
+ Calendar.addClass(cell, "weekend");
+ }
+ cell.innerHTML = Calendar._SDN[(i + fdow) % 7];
+ cell = cell.nextSibling;
+ }
+};
+
+/** Internal function. Hides all combo boxes that might be displayed. */
+Calendar.prototype._hideCombos = function () {
+ this.monthsCombo.style.display = "none";
+ this.yearsCombo.style.display = "none";
+};
+
+/** Internal function. Starts dragging the element. */
+Calendar.prototype._dragStart = function (ev) {
+ if (this.dragging) {
+ return;
+ }
+ this.dragging = true;
+ var posX;
+ var posY;
+ if (Calendar.is_ie) {
+ posY = window.event.clientY + document.body.scrollTop;
+ posX = window.event.clientX + document.body.scrollLeft;
+ } else {
+ posY = ev.clientY + window.scrollY;
+ posX = ev.clientX + window.scrollX;
+ }
+ var st = this.element.style;
+ this.xOffs = posX - parseInt(st.left);
+ this.yOffs = posY - parseInt(st.top);
+ with (Calendar) {
+ addEvent(document, "mousemove", calDragIt);
+ addEvent(document, "mouseup", calDragEnd);
+ }
+};
+
+// BEGIN: DATE OBJECT PATCHES
+
+/** Adds the number of days array to the Date object. */
+Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
+
+/** Constants used for time computations */
+Date.SECOND = 1000 /* milliseconds */;
+Date.MINUTE = 60 * Date.SECOND;
+Date.HOUR = 60 * Date.MINUTE;
+Date.DAY = 24 * Date.HOUR;
+Date.WEEK = 7 * Date.DAY;
+
+Date.parseDate = function(str, fmt) {
+ var today = new Date();
+ var y = 0;
+ var m = -1;
+ var d = 0;
+ var a = str.split(/\W+/);
+ var b = fmt.match(/%./g);
+ var i = 0, j = 0;
+ var hr = 0;
+ var min = 0;
+ for (i = 0; i < a.length; ++i) {
+ if (!a[i])
+ continue;
+ switch (b[i]) {
+ case "%d":
+ case "%e":
+ d = parseInt(a[i], 10);
+ break;
+
+ case "%m":
+ m = parseInt(a[i], 10) - 1;
+ break;
+
+ case "%Y":
+ case "%y":
+ y = parseInt(a[i], 10);
+ (y < 100) && (y += (y > 29) ? 1900 : 2000);
+ break;
+
+ case "%b":
+ case "%B":
+ for (j = 0; j < 12; ++j) {
+ if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { m = j; break; }
+ }
+ break;
+
+ case "%H":
+ case "%I":
+ case "%k":
+ case "%l":
+ hr = parseInt(a[i], 10);
+ break;
+
+ case "%P":
+ case "%p":
+ if (/pm/i.test(a[i]) && hr < 12)
+ hr += 12;
+ else if (/am/i.test(a[i]) && hr >= 12)
+ hr -= 12;
+ break;
+
+ case "%M":
+ min = parseInt(a[i], 10);
+ break;
+ }
+ }
+ if (isNaN(y)) y = today.getFullYear();
+ if (isNaN(m)) m = today.getMonth();
+ if (isNaN(d)) d = today.getDate();
+ if (isNaN(hr)) hr = today.getHours();
+ if (isNaN(min)) min = today.getMinutes();
+ if (y != 0 && m != -1 && d != 0)
+ return new Date(y, m, d, hr, min, 0);
+ y = 0; m = -1; d = 0;
+ for (i = 0; i < a.length; ++i) {
+ if (a[i].search(/[a-zA-Z]+/) != -1) {
+ var t = -1;
+ for (j = 0; j < 12; ++j) {
+ if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { t = j; break; }
+ }
+ if (t != -1) {
+ if (m != -1) {
+ d = m+1;
+ }
+ m = t;
+ }
+ } else if (parseInt(a[i], 10) <= 12 && m == -1) {
+ m = a[i]-1;
+ } else if (parseInt(a[i], 10) > 31 && y == 0) {
+ y = parseInt(a[i], 10);
+ (y < 100) && (y += (y > 29) ? 1900 : 2000);
+ } else if (d == 0) {
+ d = a[i];
+ }
+ }
+ if (y == 0)
+ y = today.getFullYear();
+ if (m != -1 && d != 0)
+ return new Date(y, m, d, hr, min, 0);
+ return today;
+};
+
+/** Returns the number of days in the current month */
+Date.prototype.getMonthDays = function(month) {
+ var year = this.getFullYear();
+ if (typeof month == "undefined") {
+ month = this.getMonth();
+ }
+ if (((0 == (year%4)) && ( (0 != (year%100)) || (0 == (year%400)))) && month == 1) {
+ return 29;
+ } else {
+ return Date._MD[month];
+ }
+};
+
+/** Returns the number of day in the year. */
+Date.prototype.getDayOfYear = function() {
+ var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
+ var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0);
+ var time = now - then;
+ return Math.floor(time / Date.DAY);
+};
+
+/** Returns the number of the week in year, as defined in ISO 8601. */
+Date.prototype.getWeekNumber = function() {
+ var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
+ var DoW = d.getDay();
+ d.setDate(d.getDate() - (DoW + 6) % 7 + 3); // Nearest Thu
+ var ms = d.valueOf(); // GMT
+ d.setMonth(0);
+ d.setDate(4); // Thu in Week 1
+ return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1;
+};
+
+/** Checks date and time equality */
+Date.prototype.equalsTo = function(date) {
+ return ((this.getFullYear() == date.getFullYear()) &&
+ (this.getMonth() == date.getMonth()) &&
+ (this.getDate() == date.getDate()) &&
+ (this.getHours() == date.getHours()) &&
+ (this.getMinutes() == date.getMinutes()));
+};
+
+/** Set only the year, month, date parts (keep existing time) */
+Date.prototype.setDateOnly = function(date) {
+ var tmp = new Date(date);
+ this.setDate(1);
+ this.setFullYear(tmp.getFullYear());
+ this.setMonth(tmp.getMonth());
+ this.setDate(tmp.getDate());
+};
+
+/** Prints the date in a string according to the given format. */
+Date.prototype.print = function (str) {
+ var m = this.getMonth();
+ var d = this.getDate();
+ var y = this.getFullYear();
+ var wn = this.getWeekNumber();
+ var w = this.getDay();
+ var s = {};
+ var hr = this.getHours();
+ var pm = (hr >= 12);
+ var ir = (pm) ? (hr - 12) : hr;
+ var dy = this.getDayOfYear();
+ if (ir == 0)
+ ir = 12;
+ var min = this.getMinutes();
+ var sec = this.getSeconds();
+ s["%a"] = Calendar._SDN[w]; // abbreviated weekday name [FIXME: I18N]
+ s["%A"] = Calendar._DN[w]; // full weekday name
+ s["%b"] = Calendar._SMN[m]; // abbreviated month name [FIXME: I18N]
+ s["%B"] = Calendar._MN[m]; // full month name
+ // FIXME: %c : preferred date and time representation for the current locale
+ s["%C"] = 1 + Math.floor(y / 100); // the century number
+ s["%d"] = (d < 10) ? ("0" + d) : d; // the day of the month (range 01 to 31)
+ s["%e"] = d; // the day of the month (range 1 to 31)
+ // FIXME: %D : american date style: %m/%d/%y
+ // FIXME: %E, %F, %G, %g, %h (man strftime)
+ s["%H"] = (hr < 10) ? ("0" + hr) : hr; // hour, range 00 to 23 (24h format)
+ s["%I"] = (ir < 10) ? ("0" + ir) : ir; // hour, range 01 to 12 (12h format)
+ s["%j"] = (dy < 100) ? ((dy < 10) ? ("00" + dy) : ("0" + dy)) : dy; // day of the year (range 001 to 366)
+ s["%k"] = hr; // hour, range 0 to 23 (24h format)
+ s["%l"] = ir; // hour, range 1 to 12 (12h format)
+ s["%m"] = (m < 9) ? ("0" + (1+m)) : (1+m); // month, range 01 to 12
+ s["%M"] = (min < 10) ? ("0" + min) : min; // minute, range 00 to 59
+ s["%n"] = "\n"; // a newline character
+ s["%p"] = pm ? "PM" : "AM";
+ s["%P"] = pm ? "pm" : "am";
+ // FIXME: %r : the time in am/pm notation %I:%M:%S %p
+ // FIXME: %R : the time in 24-hour notation %H:%M
+ s["%s"] = Math.floor(this.getTime() / 1000);
+ s["%S"] = (sec < 10) ? ("0" + sec) : sec; // seconds, range 00 to 59
+ s["%t"] = "\t"; // a tab character
+ // FIXME: %T : the time in 24-hour notation (%H:%M:%S)
+ s["%U"] = s["%W"] = s["%V"] = (wn < 10) ? ("0" + wn) : wn;
+ s["%u"] = w + 1; // the day of the week (range 1 to 7, 1 = MON)
+ s["%w"] = w; // the day of the week (range 0 to 6, 0 = SUN)
+ // FIXME: %x : preferred date representation for the current locale without the time
+ // FIXME: %X : preferred time representation for the current locale without the date
+ s["%y"] = ('' + y).substr(2, 2); // year without the century (range 00 to 99)
+ s["%Y"] = y; // year with the century
+ s["%%"] = "%"; // a literal '%' character
+
+ var re = /%./g;
+ if (!Calendar.is_ie5 && !Calendar.is_khtml)
+ return str.replace(re, function (par) { return s[par] || par; });
+
+ var a = str.match(re);
+ for (var i = 0; i < a.length; i++) {
+ var tmp = s[a[i]];
+ if (tmp) {
+ re = new RegExp(a[i], 'g');
+ str = str.replace(re, tmp);
+ }
+ }
+
+ return str;
+};
+
+Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
+Date.prototype.setFullYear = function(y) {
+ var d = new Date(this);
+ d.__msh_oldSetFullYear(y);
+ if (d.getMonth() != this.getMonth())
+ this.setDate(28);
+ this.__msh_oldSetFullYear(y);
+};
+
+// END: DATE OBJECT PATCHES
+
+
+// global object that remembers the calendar
+window._dynarch_popupCalendar = null;
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,120 @@
+<?php
+
+/**
+ * File: calendar.php | (c) dynarch.com 2004
+ * Distributed as part of "The Coolest DHTML Calendar"
+ * under the same terms.
+ * -----------------------------------------------------------------
+ * This file implements a simple PHP wrapper for the calendar. It
+ * allows you to easily include all the calendar files and setup the
+ * calendar by instantiating and calling a PHP object.
+ */
+
+define('NEWLINE', "\n");
+
+class DHTML_Calendar {
+ var $calendar_lib_path;
+
+ var $calendar_file;
+ var $calendar_lang_file;
+ var $calendar_setup_file;
+ var $calendar_theme_file;
+ var $calendar_options;
+
+ function DHTML_Calendar($calendar_lib_path = '/calendar/',
+ $lang = 'en',
+ $theme = 'calendar-win2k-1',
+ $stripped = true) {
+ if ($stripped) {
+ $this->calendar_file = 'calendar_stripped.js';
+ $this->calendar_setup_file = 'calendar-setup_stripped.js';
+ } else {
+ $this->calendar_file = 'calendar.js';
+ $this->calendar_setup_file = 'calendar-setup.js';
+ }
+ $lang = file_exists('lang/calendar-' . $lang . '.js')?$lang:"en";
+ $this->calendar_lang_file = 'lang/calendar-' . $lang . '.js';
+ $this->calendar_theme_file = 'css/'.$theme.'.css';
+ $this->calendar_lib_path = preg_replace('/\/+$/', '/', $calendar_lib_path);
+ $this->calendar_options = array('ifFormat' => '%Y/%m/%d',
+ 'daFormat' => '%Y/%m/%d');
+ }
+
+ function set_option($name, $value) {
+ $this->calendar_options[$name] = $value;
+ }
+
+ function load_files() {
+ echo $this->get_load_files_code();
+ }
+
+ function get_load_files_code() {
+ $code = ( '<link rel="stylesheet" type="text/css" media="all" href="' .
+ $this->calendar_lib_path . $this->calendar_theme_file .
+ '" />' . NEWLINE );
+ $code .= ( '<script type="text/javascript" src="' .
+ $this->calendar_lib_path . $this->calendar_file .
+ '"></script>' . NEWLINE );
+ $code .= ( '<script type="text/javascript" src="' .
+ $this->calendar_lib_path . $this->calendar_lang_file .
+ '"></script>' . NEWLINE );
+ $code .= ( '<script type="text/javascript" src="' .
+ $this->calendar_lib_path . $this->calendar_setup_file .
+ '"></script>' );
+ return $code;
+ }
+
+ function _make_calendar($other_options = array()) {
+ $js_options = $this->_make_js_hash(array_merge($this->calendar_options, $other_options));
+ $code = ( '<script type="text/javascript">Calendar.setup({' .
+ $js_options .
+ '});</script>' );
+ return $code;
+ }
+
+ function make_input_field($cal_options = array(), $field_attributes = array()) {
+ $id = $this->_gen_id();
+ $attrstr = $this->_make_html_attr(array_merge($field_attributes,
+ array('id' => $this->_field_id($id),
+ 'type' => 'text')));
+ echo '<input ' . $attrstr .'/>';
+ echo '<a href="#" id="'. $this->_trigger_id($id) . '">' .
+ '<img align="middle" border="0" src="' . $this->calendar_lib_path . 'img.gif" alt="" /></a>';
+
+ $options = array_merge($cal_options,
+ array('inputField' => $this->_field_id($id),
+ 'button' => $this->_trigger_id($id)));
+ echo $this->_make_calendar($options);
+ }
+
+ /// PRIVATE SECTION
+
+ function _field_id($id) { return 'f-calendar-field-' . $id; }
+ function _trigger_id($id) { return 'f-calendar-trigger-' . $id; }
+ function _gen_id() { static $id = 0; return ++$id; }
+
+ function _make_js_hash($array) {
+ $jstr = '';
+ reset($array);
+ while (list($key, $val) = each($array)) {
+ if (is_bool($val))
+ $val = $val ? 'true' : 'false';
+ else if (!is_numeric($val))
+ $val = '"'.$val.'"';
+ if ($jstr) $jstr .= ',';
+ $jstr .= '"' . $key . '":' . $val;
+ }
+ return $jstr;
+ }
+
+ function _make_html_attr($array) {
+ $attrstr = '';
+ reset($array);
+ while (list($key, $val) = each($array)) {
+ $attrstr .= $key . '="' . $val . '" ';
+ }
+ return $attrstr;
+ }
+};
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar_stripped.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar_stripped.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/calendar_stripped.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,14 @@
+/* Copyright Mihai Bazon, 2002-2005 | www.bazon.net/mishoo
+ * -----------------------------------------------------------
+ *
+ * The DHTML Calendar, version 1.0 "It is happening again"
+ *
+ * Details and latest version at:
+ * www.dynarch.com/projects/calendar
+ *
+ * This script is developed by Dynarch.com. Visit us at www.dynarch.com.
+ *
+ * This script is distributed under the GNU Lesser General Public License.
+ * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
+ */
+ Calendar=function(firstDayOfWeek,dateStr,onSelected,onClose){this.activeDiv=null;this.currentDateEl=null;this.getDateStatus=null;this.getDateToolTip=null;this.getDateText=null;this.timeout=null;this.onSelected=onSelected||null;this.onClose=onClose||null;this.dragging=false;this.hidden=false;this.minYear=1970;this.maxYear=2050;this.dateFormat=Calendar._TT["DEF_DATE_FORMAT"];this.ttDateFormat=Calendar._TT["TT_DATE_FORMAT"];this.isPopup=true;this.weekNumbers=true;this.firstDayOfWeek=typeof firstDayOfWeek=="number"?firstDayOfWeek:Calendar._FD;this.showsOtherMonths=false;this.dateStr=dateStr;this.ar_days=null;this.showsTime=false;this.time24=true;this.yearStep=2;this.hiliteToday=true;this.multiple=null;this.table=null;this.element=null;this.tbody=null;this.firstdayname=null;this.monthsCombo=null;this.yearsCombo=null;this.hilitedMonth=null;this.activeMonth=null;this.hilitedYear=null;this.activeYear=null;this.dateClicked=false;if(typeof Calendar._SDN=="undefined"){if(typeof Calen!
dar._SDN_len=="undefined")Calendar._SDN_len=3;var ar=new Array();for(var i=8;i>0;){ar[--i]=Calendar._DN[i].substr(0,Calendar._SDN_len);}Calendar._SDN=ar;if(typeof Calendar._SMN_len=="undefined")Calendar._SMN_len=3;ar=new Array();for(var i=12;i>0;){ar[--i]=Calendar._MN[i].substr(0,Calendar._SMN_len);}Calendar._SMN=ar;}};Calendar._C=null;Calendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));Calendar.is_ie5=(Calendar.is_ie&&/msie 5\.0/i.test(navigator.userAgent));Calendar.is_opera=/opera/i.test(navigator.userAgent);Calendar.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);Calendar.getAbsolutePos=function(el){var SL=0,ST=0;var is_div=/^div$/i.test(el.tagName);if(is_div&&el.scrollLeft)SL=el.scrollLeft;if(is_div&&el.scrollTop)ST=el.scrollTop;var r={x:el.offsetLeft-SL,y:el.offsetTop-ST};if(el.offsetParent){var tmp=this.getAbsolutePos(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}return r;};Calendar.isRelated=function(el,evt){var related=evt.!
relatedTarget;if(!related){var type=evt.type;if(type=="mouseov!
er"){rel
ated=evt.fromElement;}else if(type=="mouseout"){related=evt.toElement;}}while(related){if(related==el){return true;}related=related.parentNode;}return false;};Calendar.removeClass=function(el,className){if(!(el&&el.className)){return;}var cls=el.className.split(" ");var ar=new Array();for(var i=cls.length;i>0;){if(cls[--i]!=className){ar[ar.length]=cls[i];}}el.className=ar.join(" ");};Calendar.addClass=function(el,className){Calendar.removeClass(el,className);el.className+=" "+className;};Calendar.getElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.currentTarget;while(f.nodeType!=1||/^div$/i.test(f.tagName))f=f.parentNode;return f;};Calendar.getTargetElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.target;while(f.nodeType!=1)f=f.parentNode;return f;};Calendar.stopEvent=function(ev){ev||(ev=window.event);if(Calendar.is_ie){ev.cancelBubble=true;ev.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}return false;};Calendar.a!
ddEvent=function(el,evname,func){if(el.attachEvent){el.attachEvent("on"+evname,func);}else if(el.addEventListener){el.addEventListener(evname,func,true);}else{el["on"+evname]=func;}};Calendar.removeEvent=function(el,evname,func){if(el.detachEvent){el.detachEvent("on"+evname,func);}else if(el.removeEventListener){el.removeEventListener(evname,func,true);}else{el["on"+evname]=null;}};Calendar.createElement=function(type,parent){var el=null;if(document.createElementNS){el=document.createElementNS("http://www.w3.org/1999/xhtml",type);}else{el=document.createElement(type);}if(typeof parent!="undefined"){parent.appendChild(el);}return el;};Calendar._add_evs=function(el){with(Calendar){addEvent(el,"mouseover",dayMouseOver);addEvent(el,"mousedown",dayMouseDown);addEvent(el,"mouseout",dayMouseOut);if(is_ie){addEvent(el,"dblclick",dayMouseDblClick);el.setAttribute("unselectable",true);}}};Calendar.findMonth=function(el){if(typeof el.month!="undefined"){return el;}else if(typeof el.pa!
rentNode.month!="undefined"){return el.parentNode;}return null!
;};Calen
dar.findYear=function(el){if(typeof el.year!="undefined"){return el;}else if(typeof el.parentNode.year!="undefined"){return el.parentNode;}return null;};Calendar.showMonthsCombo=function(){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var mc=cal.monthsCombo;if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}if(cal.activeMonth){Calendar.removeClass(cal.activeMonth,"active");}var mon=cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];Calendar.addClass(mon,"active");cal.activeMonth=mon;var s=mc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var mcw=mc.offsetWidth;if(typeof mcw=="undefined")mcw=50;s.left=(cd.offsetLeft+cd.offsetWidth-mcw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";};Calendar.showYearsCombo=function(fwd){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var yc=cal.yearsCombo;if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}if(ca!
l.activeYear){Calendar.removeClass(cal.activeYear,"active");}cal.activeYear=null;var Y=cal.date.getFullYear()+(fwd?1:-1);var yr=yc.firstChild;var show=false;for(var i=12;i>0;--i){if(Y>=cal.minYear&&Y<=cal.maxYear){yr.innerHTML=Y;yr.year=Y;yr.style.display="block";show=true;}else{yr.style.display="none";}yr=yr.nextSibling;Y+=fwd?cal.yearStep:-cal.yearStep;}if(show){var s=yc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var ycw=yc.offsetWidth;if(typeof ycw=="undefined")ycw=50;s.left=(cd.offsetLeft+cd.offsetWidth-ycw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";}};Calendar.tableMouseUp=function(ev){var cal=Calendar._C;if(!cal){return false;}if(cal.timeout){clearTimeout(cal.timeout);}var el=cal.activeDiv;if(!el){return false;}var target=Calendar.getTargetElement(ev);ev||(ev=window.event);Calendar.removeClass(el,"active");if(target==el||target.parentNode==el){Calendar.cellClick(el,ev);}var mon=Calendar.findMonth(target);var date=null;if(mon){date=new!
Date(cal.date);if(mon.month!=date.getMonth()){date.setMonth(m!
on.month
);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}else{var year=Calendar.findYear(target);if(year){date=new Date(cal.date);if(year.year!=date.getFullYear()){date.setFullYear(year.year);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}}with(Calendar){removeEvent(document,"mouseup",tableMouseUp);removeEvent(document,"mouseover",tableMouseOver);removeEvent(document,"mousemove",tableMouseOver);cal._hideCombos();_C=null;return stopEvent(ev);}};Calendar.tableMouseOver=function(ev){var cal=Calendar._C;if(!cal){return;}var el=cal.activeDiv;var target=Calendar.getTargetElement(ev);if(target==el||target.parentNode==el){Calendar.addClass(el,"hilite active");Calendar.addClass(el.parentNode,"rowhilite");}else{if(typeof el.navtype=="undefined"||(el.navtype!=50&&(el.navtype==0||Math.abs(el.navtype)>2)))Calendar.removeClass(el,"active");Calendar.removeClass(el,"hilite");Calendar.removeClass(el.parentNode,"rowhilite");}ev||(ev=window.event);if(el.navtype==50&&target!=e!
l){var pos=Calendar.getAbsolutePos(el);var w=el.offsetWidth;var x=ev.clientX;var dx;var decrease=true;if(x>pos.x+w){dx=x-pos.x-w;decrease=false;}else dx=pos.x-x;if(dx<0)dx=0;var range=el._range;var current=el._current;var count=Math.floor(dx/10)%range.length;for(var i=range.length;--i>=0;)if(range[i]==current)break;while(count-->0)if(decrease){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();}var mon=Calendar.findMonth(target);if(mon){if(mon.month!=cal.date.getMonth()){if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}Calendar.addClass(mon,"hilite");cal.hilitedMonth=mon;}else if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}}else{if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}var year=Calendar.findYear(target);if(year){if(year.year!=cal.date.getFullYear()){if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}Calendar.addClass(year!
,"hilite");cal.hilitedYear=year;}else if(cal.hilitedYear){Cale!
ndar.rem
oveClass(cal.hilitedYear,"hilite");}}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}return Calendar.stopEvent(ev);};Calendar.tableMouseDown=function(ev){if(Calendar.getTargetElement(ev)==Calendar.getElement(ev)){return Calendar.stopEvent(ev);}};Calendar.calDragIt=function(ev){var cal=Calendar._C;if(!(cal&&cal.dragging)){return false;}var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posX=ev.pageX;posY=ev.pageY;}cal.hideShowCovered();var st=cal.element.style;st.left=(posX-cal.xOffs)+"px";st.top=(posY-cal.yOffs)+"px";return Calendar.stopEvent(ev);};Calendar.calDragEnd=function(ev){var cal=Calendar._C;if(!cal){return false;}cal.dragging=false;with(Calendar){removeEvent(document,"mousemove",calDragIt);removeEvent(document,"mouseup",calDragEnd);tableMouseUp(ev);}cal.hideShowCovered();};Calendar.dayMouseDown=function(ev){var el=Calendar.getElement(ev);if(el.disa!
bled){return false;}var cal=el.calendar;cal.activeDiv=el;Calendar._C=cal;if(el.navtype!=300)with(Calendar){if(el.navtype==50){el._current=el.innerHTML;addEvent(document,"mousemove",tableMouseOver);}else addEvent(document,Calendar.is_ie5?"mousemove":"mouseover",tableMouseOver);addClass(el,"hilite active");addEvent(document,"mouseup",tableMouseUp);}else if(cal.isPopup){cal._dragStart(ev);}if(el.navtype==-1||el.navtype==1){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout("Calendar.showMonthsCombo()",250);}else if(el.navtype==-2||el.navtype==2){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout((el.navtype>0)?"Calendar.showYearsCombo(true)":"Calendar.showYearsCombo(false)",250);}else{cal.timeout=null;}return Calendar.stopEvent(ev);};Calendar.dayMouseDblClick=function(ev){Calendar.cellClick(Calendar.getElement(ev),ev||window.event);if(Calendar.is_ie){document.selection.empty();}};Calendar.dayMouseOver=function(ev){var el=Calendar.getElement(ev);if(Cal!
endar.isRelated(el,ev)||Calendar._C||el.disabled){return false!
;}if(el.
ttip){if(el.ttip.substr(0,1)=="_"){el.ttip=el.caldate.print(el.calendar.ttDateFormat)+el.ttip.substr(1);}el.calendar.tooltips.innerHTML=el.ttip;}if(el.navtype!=300){Calendar.addClass(el,"hilite");if(el.caldate){Calendar.addClass(el.parentNode,"rowhilite");}}return Calendar.stopEvent(ev);};Calendar.dayMouseOut=function(ev){with(Calendar){var el=getElement(ev);if(isRelated(el,ev)||_C||el.disabled)return false;removeClass(el,"hilite");if(el.caldate)removeClass(el.parentNode,"rowhilite");if(el.calendar)el.calendar.tooltips.innerHTML=_TT["SEL_DATE"];return stopEvent(ev);}};Calendar.cellClick=function(el,ev){var cal=el.calendar;var closing=false;var newdate=false;var date=null;if(typeof el.navtype=="undefined"){if(cal.currentDateEl){Calendar.removeClass(cal.currentDateEl,"selected");Calendar.addClass(el,"selected");closing=(cal.currentDateEl==el);if(!closing){cal.currentDateEl=el;}}cal.date.setDateOnly(el.caldate);date=cal.date;var other_month=!(cal.dateClicked=!el.otherMonth);if(!
!other_month&&!cal.currentDateEl)cal._toggleMultipleDate(new Date(date));else newdate=!el.disabled;if(other_month)cal._init(cal.firstDayOfWeek,date);}else{if(el.navtype==200){Calendar.removeClass(el,"hilite");cal.callCloseHandler();return;}date=new Date(cal.date);if(el.navtype==0)date.setDateOnly(new Date());cal.dateClicked=false;var year=date.getFullYear();var mon=date.getMonth();function setMonth(m){var day=date.getDate();var max=date.getMonthDays(m);if(day>max){date.setDate(max);}date.setMonth(m);};switch(el.navtype){case 400:Calendar.removeClass(el,"hilite");var text=Calendar._TT["ABOUT"];if(typeof text!="undefined"){text+=cal.showsTime?Calendar._TT["ABOUT_TIME"]:"";}else{text="Help and about box text is not translated into this language.\n"+"If you know this language and you feel generous please update\n"+"the corresponding file in \"lang\" subdir to match calendar-en.js\n"+"and send it back to <mihai_bazon at yahoo.com> to get it into the distribution ;-)\n\n"+"Thank yo!
u!\n"+"http://dynarch.com/mishoo/calendar.epl\n";}alert(text);!
return;c
ase-2:if(year>cal.minYear){date.setFullYear(year-1);}break;case-1:if(mon>0){setMonth(mon-1);}else if(year-->cal.minYear){date.setFullYear(year);setMonth(11);}break;case 1:if(mon<11){setMonth(mon+1);}else if(year<cal.maxYear){date.setFullYear(year+1);setMonth(0);}break;case 2:if(year<cal.maxYear){date.setFullYear(year+1);}break;case 100:cal.setFirstDayOfWeek(el.fdow);return;case 50:var range=el._range;var current=el.innerHTML;for(var i=range.length;--i>=0;)if(range[i]==current)break;if(ev&&ev.shiftKey){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();return;case 0:if((typeof cal.getDateStatus=="function")&&cal.getDateStatus(date,date.getFullYear(),date.getMonth(),date.getDate())){return false;}break;}if(!date.equalsTo(cal.date)){cal.setDate(date);newdate=true;}else if(el.navtype==0)newdate=closing=true;}if(newdate){ev&&cal.callHandler();}if(closing){Calendar.removeClass(el,"hilite");ev&&cal.callCloseHandler();!
}};Calendar.prototype.create=function(_par){var parent=null;if(!_par){parent=document.getElementsByTagName("body")[0];this.isPopup=true;}else{parent=_par;this.isPopup=false;}this.date=this.dateStr?new Date(this.dateStr):new Date();var table=Calendar.createElement("table");this.table=table;table.cellSpacing=0;table.cellPadding=0;table.calendar=this;Calendar.addEvent(table,"mousedown",Calendar.tableMouseDown);var div=Calendar.createElement("div");this.element=div;div.className="calendar";if(this.isPopup){div.style.position="absolute";div.style.display="none";}div.appendChild(table);var thead=Calendar.createElement("thead",table);var cell=null;var row=null;var cal=this;var hh=function(text,cs,navtype){cell=Calendar.createElement("td",row);cell.colSpan=cs;cell.className="button";if(navtype!=0&&Math.abs(navtype)<=2)cell.className+=" nav";Calendar._add_evs(cell);cell.calendar=cal;cell.navtype=navtype;cell.innerHTML="<div unselectable='on'>"+text+"</div>";return cell;};row=Calenda!
r.createElement("tr",thead);var title_length=6;(this.isPopup)&!
&--title
_length;(this.weekNumbers)&&++title_length;hh("?",1,400).ttip=Calendar._TT["INFO"];this.title=hh("",title_length,300);this.title.className="title";if(this.isPopup){this.title.ttip=Calendar._TT["DRAG_TO_MOVE"];this.title.style.cursor="move";hh("×",1,200).ttip=Calendar._TT["CLOSE"];}row=Calendar.createElement("tr",thead);row.className="headrow";this._nav_py=hh("«",1,-2);this._nav_py.ttip=Calendar._TT["PREV_YEAR"];this._nav_pm=hh("‹",1,-1);this._nav_pm.ttip=Calendar._TT["PREV_MONTH"];this._nav_now=hh(Calendar._TT["TODAY"],this.weekNumbers?4:3,0);this._nav_now.ttip=Calendar._TT["GO_TODAY"];this._nav_nm=hh("›",1,1);this._nav_nm.ttip=Calendar._TT["NEXT_MONTH"];this._nav_ny=hh("»",1,2);this._nav_ny.ttip=Calendar._TT["NEXT_YEAR"];row=Calendar.createElement("tr",thead);row.className="daynames";if(this.weekNumbers){cell=Calendar.createElement("td",row);cell.className="name wn";cell.innerHTML=Calendar._TT["WK"];}for(var i=7;i>0;--i){cell=Calendar.crea!
teElement("td",row);if(!i){cell.navtype=100;cell.calendar=this;Calendar._add_evs(cell);}}this.firstdayname=(this.weekNumbers)?row.firstChild.nextSibling:row.firstChild;this._displayWeekdays();var tbody=Calendar.createElement("tbody",table);this.tbody=tbody;for(i=6;i>0;--i){row=Calendar.createElement("tr",tbody);if(this.weekNumbers){cell=Calendar.createElement("td",row);}for(var j=7;j>0;--j){cell=Calendar.createElement("td",row);cell.calendar=this;Calendar._add_evs(cell);}}if(this.showsTime){row=Calendar.createElement("tr",tbody);row.className="time";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;cell.innerHTML=Calendar._TT["TIME"]||" ";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=this.weekNumbers?4:3;(function(){function makeTimePart(className,init,range_start,range_end){var part=Calendar.createElement("span",cell);part.className=className;part.innerHTML=init;part.calendar=cal;part.ttip=Calendar._TT["TIME_PART"];p!
art.navtype=50;part._range=[];if(typeof range_start!="number")!
part._ra
nge=range_start;else{for(var i=range_start;i<=range_end;++i){var txt;if(i<10&&range_end>=10)txt='0'+i;else txt=''+i;part._range[part._range.length]=txt;}}Calendar._add_evs(part);return part;};var hrs=cal.date.getHours();var mins=cal.date.getMinutes();var t12=!cal.time24;var pm=(hrs>12);if(t12&&pm)hrs-=12;var H=makeTimePart("hour",hrs,t12?1:0,t12?12:23);var span=Calendar.createElement("span",cell);span.innerHTML=":";span.className="colon";var M=makeTimePart("minute",mins,0,59);var AP=null;cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;if(t12)AP=makeTimePart("ampm",pm?"pm":"am",["am","pm"]);else cell.innerHTML=" ";cal.onSetTime=function(){var pm,hrs=this.date.getHours(),mins=this.date.getMinutes();if(t12){pm=(hrs>=12);if(pm)hrs-=12;if(hrs==0)hrs=12;AP.innerHTML=pm?"pm":"am";}H.innerHTML=(hrs<10)?("0"+hrs):hrs;M.innerHTML=(mins<10)?("0"+mins):mins;};cal.onUpdateTime=function(){var date=this.date;var h=parseInt(H.innerHTML,10);if(t12){if(/pm/i.te!
st(AP.innerHTML)&&h<12)h+=12;else if(/am/i.test(AP.innerHTML)&&h==12)h=0;}var d=date.getDate();var m=date.getMonth();var y=date.getFullYear();date.setHours(h);date.setMinutes(parseInt(M.innerHTML,10));date.setFullYear(y);date.setMonth(m);date.setDate(d);this.dateClicked=false;this.callHandler();};})();}else{this.onSetTime=this.onUpdateTime=function(){};}var tfoot=Calendar.createElement("tfoot",table);row=Calendar.createElement("tr",tfoot);row.className="footrow";cell=hh(Calendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);cell.className="ttip";if(this.isPopup){cell.ttip=Calendar._TT["DRAG_TO_MOVE"];cell.style.cursor="move";}this.tooltips=cell;div=Calendar.createElement("div",this.element);this.monthsCombo=div;div.className="combo";for(i=0;i<Calendar._MN.length;++i){var mn=Calendar.createElement("div");mn.className=Calendar.is_ie?"label-IEfix":"label";mn.month=i;mn.innerHTML=Calendar._SMN[i];div.appendChild(mn);}div=Calendar.createElement("div",this.element);this.yearsCombo=di!
v;div.className="combo";for(i=12;i>0;--i){var yr=Calendar.crea!
teElemen
t("div");yr.className=Calendar.is_ie?"label-IEfix":"label";div.appendChild(yr);}this._init(this.firstDayOfWeek,this.date);parent.appendChild(this.element);};Calendar._keyEvent=function(ev){var cal=window._dynarch_popupCalendar;if(!cal||cal.multiple)return false;(Calendar.is_ie)&&(ev=window.event);var act=(Calendar.is_ie||ev.type=="keypress"),K=ev.keyCode;if(ev.ctrlKey){switch(K){case 37:act&&Calendar.cellClick(cal._nav_pm);break;case 38:act&&Calendar.cellClick(cal._nav_py);break;case 39:act&&Calendar.cellClick(cal._nav_nm);break;case 40:act&&Calendar.cellClick(cal._nav_ny);break;default:return false;}}else switch(K){case 32:Calendar.cellClick(cal._nav_now);break;case 27:act&&cal.callCloseHandler();break;case 37:case 38:case 39:case 40:if(act){var prev,x,y,ne,el,step;prev=K==37||K==38;step=(K==37||K==39)?1:7;function setVars(){el=cal.currentDateEl;var p=el.pos;x=p&15;y=p>>4;ne=cal.ar_days[y][x];};setVars();function prevMonth(){var date=new Date(cal.date);date.setDate(date.get!
Date()-step);cal.setDate(date);};function nextMonth(){var date=new Date(cal.date);date.setDate(date.getDate()+step);cal.setDate(date);};while(1){switch(K){case 37:if(--x>=0)ne=cal.ar_days[y][x];else{x=6;K=38;continue;}break;case 38:if(--y>=0)ne=cal.ar_days[y][x];else{prevMonth();setVars();}break;case 39:if(++x<7)ne=cal.ar_days[y][x];else{x=0;K=40;continue;}break;case 40:if(++y<cal.ar_days.length)ne=cal.ar_days[y][x];else{nextMonth();setVars();}break;}break;}if(ne){if(!ne.disabled)Calendar.cellClick(ne);else if(prev)prevMonth();else nextMonth();}}break;case 13:if(act)Calendar.cellClick(cal.currentDateEl,ev);break;default:return false;}return Calendar.stopEvent(ev);};Calendar.prototype._init=function(firstDayOfWeek,date){var today=new Date(),TY=today.getFullYear(),TM=today.getMonth(),TD=today.getDate();this.table.style.visibility="hidden";var year=date.getFullYear();if(year<this.minYear){year=this.minYear;date.setFullYear(year);}else if(year>this.maxYear){year=this.maxYear;da!
te.setFullYear(year);}this.firstDayOfWeek=firstDayOfWeek;this.!
date=new
Date(date);var month=date.getMonth();var mday=date.getDate();var no_days=date.getMonthDays();date.setDate(1);var day1=(date.getDay()-this.firstDayOfWeek)%7;if(day1<0)day1+=7;date.setDate(-day1);date.setDate(date.getDate()+1);var row=this.tbody.firstChild;var MN=Calendar._SMN[month];var ar_days=this.ar_days=new Array();var weekend=Calendar._TT["WEEKEND"];var dates=this.multiple?(this.datesCells={}):null;for(var i=0;i<6;++i,row=row.nextSibling){var cell=row.firstChild;if(this.weekNumbers){cell.className="day wn";cell.innerHTML=date.getWeekNumber();cell=cell.nextSibling;}row.className="daysrow";var hasdays=false,iday,dpos=ar_days[i]=[];for(var j=0;j<7;++j,cell=cell.nextSibling,date.setDate(iday+1)){iday=date.getDate();var wday=date.getDay();cell.className="day";cell.pos=i<<4|j;dpos[j]=cell;var current_month=(date.getMonth()==month);if(!current_month){if(this.showsOtherMonths){cell.className+=" othermonth";cell.otherMonth=true;}else{cell.className="emptycell";cell.innerHTML="&n!
bsp;";cell.disabled=true;continue;}}else{cell.otherMonth=false;hasdays=true;}cell.disabled=false;cell.innerHTML=this.getDateText?this.getDateText(date,iday):iday;if(dates)dates[date.print("%Y%m%d")]=cell;if(this.getDateStatus){var status=this.getDateStatus(date,year,month,iday);if(this.getDateToolTip){var toolTip=this.getDateToolTip(date,year,month,iday);if(toolTip)cell.title=toolTip;}if(status===true){cell.className+=" disabled";cell.disabled=true;}else{if(/disabled/i.test(status))cell.disabled=true;cell.className+=" "+status;}}if(!cell.disabled){cell.caldate=new Date(date);cell.ttip="_";if(!this.multiple&¤t_month&&iday==mday&&this.hiliteToday){cell.className+=" selected";this.currentDateEl=cell;}if(date.getFullYear()==TY&&date.getMonth()==TM&&iday==TD){cell.className+=" today";cell.ttip+=Calendar._TT["PART_TODAY"];}if(weekend.indexOf(wday.toString())!=-1)cell.className+=cell.otherMonth?" oweekend":" weekend";}}if(!(hasdays||this.showsOtherMonths))row.className="empt!
yrow";}this.title.innerHTML=Calendar._MN[month]+", "+year;this!
.onSetTi
me();this.table.style.visibility="visible";this._initMultipleDates();};Calendar.prototype._initMultipleDates=function(){if(this.multiple){for(var i in this.multiple){var cell=this.datesCells[i];var d=this.multiple[i];if(!d)continue;if(cell)cell.className+=" selected";}}};Calendar.prototype._toggleMultipleDate=function(date){if(this.multiple){var ds=date.print("%Y%m%d");var cell=this.datesCells[ds];if(cell){var d=this.multiple[ds];if(!d){Calendar.addClass(cell,"selected");this.multiple[ds]=date;}else{Calendar.removeClass(cell,"selected");delete this.multiple[ds];}}}};Calendar.prototype.setDateToolTipHandler=function(unaryFunction){this.getDateToolTip=unaryFunction;};Calendar.prototype.setDate=function(date){if(!date.equalsTo(this.date)){this._init(this.firstDayOfWeek,date);}};Calendar.prototype.refresh=function(){this._init(this.firstDayOfWeek,this.date);};Calendar.prototype.setFirstDayOfWeek=function(firstDayOfWeek){this._init(firstDayOfWeek,this.date);this._displayWeekdays(!
);};Calendar.prototype.setDateStatusHandler=Calendar.prototype.setDisabledHandler=function(unaryFunction){this.getDateStatus=unaryFunction;};Calendar.prototype.setRange=function(a,z){this.minYear=a;this.maxYear=z;};Calendar.prototype.callHandler=function(){if(this.onSelected){this.onSelected(this,this.date.print(this.dateFormat));}};Calendar.prototype.callCloseHandler=function(){if(this.onClose){this.onClose(this);}this.hideShowCovered();};Calendar.prototype.destroy=function(){var el=this.element.parentNode;el.removeChild(this.element);Calendar._C=null;window._dynarch_popupCalendar=null;};Calendar.prototype.reparent=function(new_parent){var el=this.element;el.parentNode.removeChild(el);new_parent.appendChild(el);};Calendar._checkCalendar=function(ev){var calendar=window._dynarch_popupCalendar;if(!calendar){return false;}var el=Calendar.is_ie?Calendar.getElement(ev):Calendar.getTargetElement(ev);for(;el!=null&&el!=calendar.element;el=el.parentNode);if(el==null){window._dynar!
ch_popupCalendar.callCloseHandler();return Calendar.stopEvent(!
ev);}};C
alendar.prototype.show=function(){var rows=this.table.getElementsByTagName("tr");for(var i=rows.length;i>0;){var row=rows[--i];Calendar.removeClass(row,"rowhilite");var cells=row.getElementsByTagName("td");for(var j=cells.length;j>0;){var cell=cells[--j];Calendar.removeClass(cell,"hilite");Calendar.removeClass(cell,"active");}}this.element.style.display="block";this.hidden=false;if(this.isPopup){window._dynarch_popupCalendar=this;Calendar.addEvent(document,"keydown",Calendar._keyEvent);Calendar.addEvent(document,"keypress",Calendar._keyEvent);Calendar.addEvent(document,"mousedown",Calendar._checkCalendar);}this.hideShowCovered();};Calendar.prototype.hide=function(){if(this.isPopup){Calendar.removeEvent(document,"keydown",Calendar._keyEvent);Calendar.removeEvent(document,"keypress",Calendar._keyEvent);Calendar.removeEvent(document,"mousedown",Calendar._checkCalendar);}this.element.style.display="none";this.hidden=true;this.hideShowCovered();};Calendar.prototype.showAt=functio!
n(x,y){var s=this.element.style;s.left=x+"px";s.top=y+"px";this.show();};Calendar.prototype.showAtElement=function(el,opts){var self=this;var p=Calendar.getAbsolutePos(el);if(!opts||typeof opts!="string"){this.showAt(p.x,p.y+el.offsetHeight);return true;}function fixPosition(box){if(box.x<0)box.x=0;if(box.y<0)box.y=0;var cp=document.createElement("div");var s=cp.style;s.position="absolute";s.right=s.bottom=s.width=s.height="0px";document.body.appendChild(cp);var br=Calendar.getAbsolutePos(cp);document.body.removeChild(cp);if(Calendar.is_ie){br.y+=document.body.scrollTop;br.x+=document.body.scrollLeft;}else{br.y+=window.scrollY;br.x+=window.scrollX;}var tmp=box.x+box.width-br.x;if(tmp>0)box.x-=tmp;tmp=box.y+box.height-br.y;if(tmp>0)box.y-=tmp;};this.element.style.display="block";Calendar.continuation_for_the_fucking_khtml_browser=function(){var w=self.element.offsetWidth;var h=self.element.offsetHeight;self.element.style.display="none";var valign=opts.substr(0,1);var halign=!
"l";if(opts.length>1){halign=opts.substr(1,1);}switch(valign){!
case "T"
:p.y-=h;break;case "B":p.y+=el.offsetHeight;break;case "C":p.y+=(el.offsetHeight-h)/2;break;case "t":p.y+=el.offsetHeight-h;break;case "b":break;}switch(halign){case "L":p.x-=w;break;case "R":p.x+=el.offsetWidth;break;case "C":p.x+=(el.offsetWidth-w)/2;break;case "l":p.x+=el.offsetWidth-w;break;case "r":break;}p.width=w;p.height=h+40;self.monthsCombo.style.display="none";fixPosition(p);self.showAt(p.x,p.y);};if(Calendar.is_khtml)setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()",10);else Calendar.continuation_for_the_fucking_khtml_browser();};Calendar.prototype.setDateFormat=function(str){this.dateFormat=str;};Calendar.prototype.setTtDateFormat=function(str){this.ttDateFormat=str;};Calendar.prototype.parseDate=function(str,fmt){if(!fmt)fmt=this.dateFormat;this.setDate(Date.parseDate(str,fmt));};Calendar.prototype.hideShowCovered=function(){if(!Calendar.is_ie&&!Calendar.is_opera)return;function getVisib(obj){var value=obj.style.visibility;if(!value){if(documen!
t.defaultView&&typeof(document.defaultView.getComputedStyle)=="function"){if(!Calendar.is_khtml)value=document.defaultView. getComputedStyle(obj,"").getPropertyValue("visibility");else value='';}else if(obj.currentStyle){value=obj.currentStyle.visibility;}else value='';}return value;};var tags=new Array("applet","iframe","select");var el=this.element;var p=Calendar.getAbsolutePos(el);var EX1=p.x;var EX2=el.offsetWidth+EX1;var EY1=p.y;var EY2=el.offsetHeight+EY1;for(var k=tags.length;k>0;){var ar=document.getElementsByTagName(tags[--k]);var cc=null;for(var i=ar.length;i>0;){cc=ar[--i];p=Calendar.getAbsolutePos(cc);var CX1=p.x;var CX2=cc.offsetWidth+CX1;var CY1=p.y;var CY2=cc.offsetHeight+CY1;if(this.hidden||(CX1>EX2)||(CX2<EX1)||(CY1>EY2)||(CY2<EY1)){if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}cc.style.visibility=cc.__msh_save_visibility;}else{if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}cc.style.visibility="hidden";}}}};Calen!
dar.prototype._displayWeekdays=function(){var fdow=this.firstD!
ayOfWeek
;var cell=this.firstdayname;var weekend=Calendar._TT["WEEKEND"];for(var i=0;i<7;++i){cell.className="day name";var realday=(i+fdow)%7;if(i){cell.ttip=Calendar._TT["DAY_FIRST"].replace("%s",Calendar._DN[realday]);cell.navtype=100;cell.calendar=this;cell.fdow=realday;Calendar._add_evs(cell);}if(weekend.indexOf(realday.toString())!=-1){Calendar.addClass(cell,"weekend");}cell.innerHTML=Calendar._SDN[(i+fdow)%7];cell=cell.nextSibling;}};Calendar.prototype._hideCombos=function(){this.monthsCombo.style.display="none";this.yearsCombo.style.display="none";};Calendar.prototype._dragStart=function(ev){if(this.dragging){return;}this.dragging=true;var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posY=ev.clientY+window.scrollY;posX=ev.clientX+window.scrollX;}var st=this.element.style;this.xOffs=posX-parseInt(st.left);this.yOffs=posY-parseInt(st.top);with(Calendar){addEvent(document,"mousemove",c!
alDragIt);addEvent(document,"mouseup",calDragEnd);}};Date._MD=new Array(31,28,31,30,31,30,31,31,30,31,30,31);Date.SECOND=1000;Date.MINUTE=60*Date.SECOND;Date.HOUR=60*Date.MINUTE;Date.DAY=24*Date.HOUR;Date.WEEK=7*Date.DAY;Date.parseDate=function(str,fmt){var today=new Date();var y=0;var m=-1;var d=0;var a=str.split(/\W+/);var b=fmt.match(/%./g);var i=0,j=0;var hr=0;var min=0;for(i=0;i<a.length;++i){if(!a[i])continue;switch(b[i]){case "%d":case "%e":d=parseInt(a[i],10);break;case "%m":m=parseInt(a[i],10)-1;break;case "%Y":case "%y":y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);break;case "%b":case "%B":for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){m=j;break;}}break;case "%H":case "%I":case "%k":case "%l":hr=parseInt(a[i],10);break;case "%P":case "%p":if(/pm/i.test(a[i])&&hr<12)hr+=12;else if(/am/i.test(a[i])&&hr>=12)hr-=12;break;case "%M":min=parseInt(a[i],10);break;}}if(isNaN(y))y=today.getFullYear();if(isNaN(m))m=today.ge!
tMonth();if(isNaN(d))d=today.getDate();if(isNaN(hr))hr=today.g!
etHours(
);if(isNaN(min))min=today.getMinutes();if(y!=0&&m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);y=0;m=-1;d=0;for(i=0;i<a.length;++i){if(a[i].search(/[a-zA-Z]+/)!=-1){var t=-1;for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){t=j;break;}}if(t!=-1){if(m!=-1){d=m+1;}m=t;}}else if(parseInt(a[i],10)<=12&&m==-1){m=a[i]-1;}else if(parseInt(a[i],10)>31&&y==0){y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);}else if(d==0){d=a[i];}}if(y==0)y=today.getFullYear();if(m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);return today;};Date.prototype.getMonthDays=function(month){var year=this.getFullYear();if(typeof month=="undefined"){month=this.getMonth();}if(((0==(year%4))&&((0!=(year%100))||(0==(year%400))))&&month==1){return 29;}else{return Date._MD[month];}};Date.prototype.getDayOfYear=function(){var now=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var then=new Date(this.getFullYear(),0,0,0,0,0);var time=now-then;return Math.floo!
r(time/Date.DAY);};Date.prototype.getWeekNumber=function(){var d=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var DoW=d.getDay();d.setDate(d.getDate()-(DoW+6)%7+3);var ms=d.valueOf();d.setMonth(0);d.setDate(4);return Math.round((ms-d.valueOf())/(7*864e5))+1;};Date.prototype.equalsTo=function(date){return((this.getFullYear()==date.getFullYear())&&(this.getMonth()==date.getMonth())&&(this.getDate()==date.getDate())&&(this.getHours()==date.getHours())&&(this.getMinutes()==date.getMinutes()));};Date.prototype.setDateOnly=function(date){var tmp=new Date(date);this.setDate(1);this.setFullYear(tmp.getFullYear());this.setMonth(tmp.getMonth());this.setDate(tmp.getDate());};Date.prototype.print=function(str){var m=this.getMonth();var d=this.getDate();var y=this.getFullYear();var wn=this.getWeekNumber();var w=this.getDay();var s={};var hr=this.getHours();var pm=(hr>=12);var ir=(pm)?(hr-12):hr;var dy=this.getDayOfYear();if(ir==0)ir=12;var min=this.getMinutes();var !
sec=this.getSeconds();s["%a"]=Calendar._SDN[w];s["%A"]=Calenda!
r._DN[w]
;s["%b"]=Calendar._SMN[m];s["%B"]=Calendar._MN[m];s["%C"]=1+Math.floor(y/100);s["%d"]=(d<10)?("0"+d):d;s["%e"]=d;s["%H"]=(hr<10)?("0"+hr):hr;s["%I"]=(ir<10)?("0"+ir):ir;s["%j"]=(dy<100)?((dy<10)?("00"+dy):("0"+dy)):dy;s["%k"]=hr;s["%l"]=ir;s["%m"]=(m<9)?("0"+(1+m)):(1+m);s["%M"]=(min<10)?("0"+min):min;s["%n"]="\n";s["%p"]=pm?"PM":"AM";s["%P"]=pm?"pm":"am";s["%s"]=Math.floor(this.getTime()/1000);s["%S"]=(sec<10)?("0"+sec):sec;s["%t"]="\t";s["%U"]=s["%W"]=s["%V"]=(wn<10)?("0"+wn):wn;s["%u"]=w+1;s["%w"]=w;s["%y"]=(''+y).substr(2,2);s["%Y"]=y;s["%%"]="%";var re=/%./g;if(!Calendar.is_ie5&&!Calendar.is_khtml)return str.replace(re,function(par){return s[par]||par;});var a=str.match(re);for(var i=0;i<a.length;i++){var tmp=s[a[i]];if(tmp){re=new RegExp(a[i],'g');str=str.replace(re,tmp);}}return str;};Date.prototype.__msh_oldSetFullYear=Date.prototype.setFullYear;Date.prototype.setFullYear=function(y){var d=new Date(this);d.__msh_oldSetFullYear(y);if(d.getMonth()!=this.getMonth())this!
.setDate(28);this.__msh_oldSetFullYear(y);};window._dynarch_popupCalendar=null;
\ No newline at end of file
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/field-button.jpg
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/field-button.jpg
___________________________________________________________________
Name: svn:mime-type
+ image/jpeg
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/reference-Z-S.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/reference-Z-S.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/reference-Z-S.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,193 @@
+
+ body {
+ color: black;
+ /* background-color: #e5e5e5;*/
+ background-color: #ffffff;
+ /*background-color: beige;*/
+ margin-top: 2em;
+ margin-left: 8%;
+ margin-right: 8%;
+ }
+
+ h1,h2,h3,h4,h5,h6 {
+ margin-top: .5em;
+ }
+
+ .title {
+ font-size: 200%;
+ font-weight: normal;
+ }
+
+ .partheading {
+ font-size: 100%;
+ }
+
+ .chapterheading {
+ font-size: 100%;
+ }
+
+ .beginsection {
+ font-size: 110%;
+ }
+
+ .tiny {
+ font-size: 40%;
+ }
+
+ .scriptsize {
+ font-size: 60%;
+ }
+
+ .footnotesize {
+ font-size: 75%;
+ }
+
+ .small {
+ font-size: 90%;
+ }
+
+ .normalsize {
+ font-size: 100%;
+ }
+
+ .large {
+ font-size: 120%;
+ }
+
+ .largecap {
+ font-size: 150%;
+ }
+
+ .largeup {
+ font-size: 200%;
+ }
+
+ .huge {
+ font-size: 300%;
+ }
+
+ .hugecap {
+ font-size: 350%;
+ }
+
+ pre {
+ margin-left: 2em;
+ }
+
+ blockquote {
+ margin-left: 2em;
+ }
+
+ ol {
+ list-style-type: decimal;
+ }
+
+ ol ol {
+ list-style-type: lower-alpha;
+ }
+
+ ol ol ol {
+ list-style-type: lower-roman;
+ }
+
+ ol ol ol ol {
+ list-style-type: upper-alpha;
+ }
+
+ /*
+ .verbatim {
+ color: #4d0000;
+ }
+ */
+
+ tt i {
+ font-family: serif;
+ }
+
+ .verbatim em {
+ font-family: serif;
+ }
+
+ .scheme em {
+ font-family: serif;
+ color: black;
+ }
+
+ .scheme {
+ color: brown;
+ }
+
+ .scheme .keyword {
+ color: #990000;
+ font-weight: bold;
+ }
+
+ .scheme .builtin {
+ color: #990000;
+ }
+
+ .scheme .variable {
+ color: navy;
+ }
+
+ .scheme .global {
+ color: purple;
+ }
+
+ .scheme .selfeval {
+ color: green;
+ }
+
+ .scheme .comment {
+ color: teal;
+ }
+
+ .schemeresponse {
+ color: green;
+ }
+
+ .navigation {
+ color: red;
+ text-align: right;
+ font-size: medium;
+ font-style: italic;
+ }
+
+ .disable {
+ /* color: #e5e5e5; */
+ color: gray;
+ }
+
+ .smallcaps {
+ font-size: 75%;
+ }
+
+ .smallprint {
+ color: gray;
+ font-size: 75%;
+ text-align: right;
+ }
+
+ /*
+ .smallprint hr {
+ text-align: left;
+ width: 40%;
+ }
+ */
+
+ .footnoterule {
+ text-align: left;
+ width: 40%;
+ }
+
+ .colophon {
+ color: gray;
+ font-size: 80%;
+ text-align: right;
+ }
+
+ .colophon a {
+ color: gray;
+ }
+
+
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/reference-Z-S.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/reference.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/reference.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/reference.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,34 @@
+html { margin: 0px; padding: 0px; background-color: #08f; color: #444; font-family: georgia,serif; }
+body { margin: 2em 8%; background-color: #fff; padding: 1em; border: 2px ridge #048; }
+
+a:link, a:visited { text-decoration: none; color: #00f; }
+a:hover { color: #f00; text-decoration: underline; }
+a:active { color: #f84; }
+
+h1, h2, h3, h4, h5, h6 { font-family: tahoma,verdana,sans-serif; }
+
+h2, h3 { font-weight: normal; }
+
+h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover { text-decoration: none; }
+
+h1 { font-size: 170%; border: 2px ridge #048; letter-spacing: 2px; color: #000; margin-left: -2em; margin-right: -2em;
+background-color: #fff; padding: 2px 1em; background-color: #def; }
+h2 { font-size: 140%; color: #222; }
+h3 { font-size: 120%; color: #444; }
+
+h1.title { font-size: 300%; font-family: georgia,serif; font-weight: normal; color: #846; letter-spacing: -1px;
+border: none;
+padding: none;
+background-color: #fff;
+border-bottom: 3px double #624; padding-bottom: 2px; margin-left: 8%; margin-right: 8%; }
+
+.colophon { padding-top: 2em; color: #999; font-size: 90%; font-family: georgia,"times new roman",serif; }
+.colophon a:link, .colophon a:visited { color: #755; }
+.colophon a:hover { color: #422; text-decoration: underline; }
+
+.footnote { font-size: 90%; font-style: italic; font-family: georgia,"times new roman",serif; margin: 0px 3em; }
+.footnote sup { font-size: 120%; padding: 0px 0.3em; position: relative; top: -0.2em; }
+
+.small { font-size: 90%; }
+
+.verbatim { background-color: #eee; padding: 0.2em 1em; border: 1px solid #aaa; }
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/reference.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/reference.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/reference.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/reference.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,1738 @@
+<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!--
+
+Generated from ../reference.tex by tex2page, v 2004-09-11
+(running on MzScheme 209, unix),
+(c) Dorai Sitaram,
+http://www.ccs.neu.edu/~dorai/tex2page/tex2page-doc.html
+
+-->
+<head>
+<title>
+DHTML Calendar Widget
+</title>
+<link rel="stylesheet" type="text/css" href="reference.css" title=default>
+<link rel="stylesheet" type="text/css" href="reference-Z-S.css" title=default>
+<meta name=robots content="index,follow">
+</head>
+<body>
+<p>
+</p>
+<p>
+</p>
+<p>
+</p>
+<p>
+</p>
+<p>
+</p>
+<p>
+</p>
+<p>
+
+
+
+
+</p>
+<p>
+
+
+</p>
+<p>
+</p>
+<p>
+</p>
+<h1 class=title align=center><br><br>DHTML Calendar Widget</h1>
+<p></p>
+<div align=center>
+Mihai Bazon, <tt><mihai_bazon at yahoo.com></tt><br>
+© Dynarch.com 2002-2005, <a href="http://www.dynarch.com/"><tt>www.dynarch.com</tt></a><p>March 7, 2005<br></p>
+<p></p>
+<p>
+<span class=small>calendar version: 1.0 ``It is happening again''</span>
+</p>
+</div>
+<p></p>
+<p>
+<span class=small><code class=verbatim>$Id$</code></span>
+</p>
+<span class=small><blockquote>
+<div align=right><table><tr><td>
+
+</td></tr></table></div>
+
+</blockquote></span>
+<a name="node_sec_Temp_1"></a>
+<h1><a href="#node_toc_node_sec_Temp_1">Contents</a></h1>
+<p><a name="node_toc_start"></a></p>
+<p><b>
+ <a name="node_toc_node_sec_1"></a><a href="#node_sec_1">1 Overview</a></b><br>
+ <a name="node_toc_node_sec_1.1"></a><a href="#node_sec_1.1">1.1 How does this thing work?</a><br>
+ <a name="node_toc_node_sec_1.2"></a><a href="#node_sec_1.2">1.2 Project files</a><br>
+ <a name="node_toc_node_sec_1.3"></a><a href="#node_sec_1.3">1.3 License</a><br>
+</p>
+<p><b>
+ <a name="node_toc_node_sec_2"></a><a href="#node_sec_2">2 Quick startup</a></b><br>
+ <a name="node_toc_node_sec_2.1"></a><a href="#node_sec_2.1">2.1 Installing a popup calendar</a><br>
+ <a name="node_toc_node_sec_2.2"></a><a href="#node_sec_2.2">2.2 Installing a flat calendar</a><br>
+ <a name="node_toc_node_sec_2.3"></a><a href="#node_sec_2.3">2.3 <tt>Calendar.setup</tt> in detail</a><br>
+</p>
+<p><b>
+ <a name="node_toc_node_sec_3"></a><a href="#node_sec_3">3 Recipes</a></b><br>
+ <a name="node_toc_node_sec_3.1"></a><a href="#node_sec_3.1">3.1 Popup calendars</a><br>
+ <a name="node_toc_node_sec_3.1.1"></a><a href="#node_sec_3.1.1">3.1.1 Simple text field with calendar attached to a button</a><br>
+ <a name="node_toc_node_sec_3.1.2"></a><a href="#node_sec_3.1.2">3.1.2 Simple field with calendar attached to an image</a><br>
+ <a name="node_toc_node_sec_3.1.3"></a><a href="#node_sec_3.1.3">3.1.3 Hidden field, plain text triggers</a><br>
+ <a name="node_toc_node_sec_3.1.4"></a><a href="#node_sec_3.1.4">3.1.4 2 Linked fields, no trigger buttons</a><br>
+ <a name="node_toc_node_sec_3.2"></a><a href="#node_sec_3.2">3.2 Flat calendars</a><br>
+ <a name="node_toc_node_sec_3.3"></a><a href="#node_sec_3.3">3.3 Highlight special dates</a><br>
+ <a name="node_toc_node_sec_3.4"></a><a href="#node_sec_3.4">3.4 Select multiple dates</a><br>
+</p>
+<p><b>
+ <a name="node_toc_node_sec_4"></a><a href="#node_sec_4">4 The Calendar object overview</a></b><br>
+ <a name="node_toc_node_sec_4.1"></a><a href="#node_sec_4.1">4.1 Creating a calendar</a><br>
+ <a name="node_toc_node_sec_4.2"></a><a href="#node_sec_4.2">4.2 Order does matter ;-)</a><br>
+ <a name="node_toc_node_sec_4.3"></a><a href="#node_sec_4.3">4.3 Caching the object</a><br>
+ <a name="node_toc_node_sec_4.4"></a><a href="#node_sec_4.4">4.4 Callback functions</a><br>
+</p>
+<p><b>
+ <a name="node_toc_node_sec_5"></a><a href="#node_sec_5">5 The Calendar object API reference</a></b><br>
+ <a name="node_toc_node_sec_5.1"></a><a href="#node_sec_5.1">5.1 <tt>Calendar</tt> constructor</a><br>
+ <a name="node_toc_node_sec_5.2"></a><a href="#node_sec_5.2">5.2 Useful member variables (properties)</a><br>
+ <a name="node_toc_node_sec_5.3"></a><a href="#node_sec_5.3">5.3 Public methods</a><br>
+ <a name="node_toc_node_sec_5.3.1"></a><a href="#node_sec_5.3.1">5.3.1 <tt>Calendar.create</tt></a><br>
+ <a name="node_toc_node_sec_5.3.2"></a><a href="#node_sec_5.3.2">5.3.2 <tt>Calendar.callHandler</tt></a><br>
+ <a name="node_toc_node_sec_5.3.3"></a><a href="#node_sec_5.3.3">5.3.3 <tt>Calendar.callCloseHandler</tt></a><br>
+ <a name="node_toc_node_sec_5.3.4"></a><a href="#node_sec_5.3.4">5.3.4 <tt>Calendar.hide</tt></a><br>
+ <a name="node_toc_node_sec_5.3.5"></a><a href="#node_sec_5.3.5">5.3.5 <tt>Calendar.setDateFormat</tt></a><br>
+ <a name="node_toc_node_sec_5.3.6"></a><a href="#node_sec_5.3.6">5.3.6 <tt>Calendar.setTtDateFormat</tt></a><br>
+ <a name="node_toc_node_sec_5.3.7"></a><a href="#node_sec_5.3.7">5.3.7 <tt>Calendar.setDisabledHandler</tt></a><br>
+ <a name="node_toc_node_sec_5.3.8"></a><a href="#node_sec_5.3.8">5.3.8 <tt>Calendar.setDateStatusHandler</tt></a><br>
+ <a name="node_toc_node_sec_5.3.9"></a><a href="#node_sec_5.3.9">5.3.9 <tt>Calendar.show</tt></a><br>
+ <a name="node_toc_node_sec_5.3.10"></a><a href="#node_sec_5.3.10">5.3.10 <tt>Calendar.showAt</tt></a><br>
+ <a name="node_toc_node_sec_5.3.11"></a><a href="#node_sec_5.3.11">5.3.11 <tt>Calendar.showAtElement</tt></a><br>
+ <a name="node_toc_node_sec_5.3.12"></a><a href="#node_sec_5.3.12">5.3.12 <tt>Calendar.setDate</tt></a><br>
+ <a name="node_toc_node_sec_5.3.13"></a><a href="#node_sec_5.3.13">5.3.13 <tt>Calendar.setFirstDayOfWeek</tt></a><br>
+ <a name="node_toc_node_sec_5.3.14"></a><a href="#node_sec_5.3.14">5.3.14 <tt>Calendar.parseDate</tt></a><br>
+ <a name="node_toc_node_sec_5.3.15"></a><a href="#node_sec_5.3.15">5.3.15 <tt>Calendar.setRange</tt></a><br>
+</p>
+<p><b>
+ <a name="node_toc_node_sec_6"></a><a href="#node_sec_6">6 Side effects</a></b><br>
+</p>
+<p><b>
+ <a name="node_toc_node_sec_7"></a><a href="#node_sec_7">7 Credits</a></b><br>
+</p>
+<p>
+</p>
+<p>
+</p>
+<a name="node_sec_1"></a>
+<h1><a href="#node_toc_node_sec_1">1 Overview</a></h1>
+<p>The DHTML Calendar widget<a name="call_footnote_Temp_2"></a><a href="#footnote_Temp_2"><sup><small>1</small></sup></a>
+is an (HTML) user interface element that gives end-users a friendly way to
+select date and time. It works in a web browser. The first versions only provided
+support for popup calendars, while starting with version 0.9 it also supports
+``flat'' display. A ``flat'' calendar is a calendar that stays visible in the
+page all the time. In this mode it could be very useful for ``blog'' pages and
+other pages that require the calendar to be always present.</p>
+<p>
+The calendar is compatible with most popular browsers nowadays. While it's
+created using web standards and it should generally work with any compliant
+browser, the following browsers were found to work: Mozilla/Firefox (the
+development platform), Netscape 6.0 or better, all other Gecko-based browsers,
+Internet Explorer 5.0 or better <em>for Windows</em><a name="call_footnote_Temp_3"></a><a href="#footnote_Temp_3"><sup><small>2</small></sup></a>, Opera 7<a name="call_footnote_Temp_4"></a><a href="#footnote_Temp_4"><sup><small>3</small></sup></a>, Konqueror 3.1.2 and Apple Safari for
+MacOSX.</p>
+<p>
+You can find the latest info and version at the calendar homepage:</p>
+<p>
+</p>
+<div align=center><table><tr><td>
+
+<a href="http://www.dynarch.com/projects/calendar/"><tt>www.dynarch.com/projects/calendar</tt></a>
+</td></tr></table></div>
+<p>
+</p>
+<a name="node_sec_1.1"></a>
+<h2><a href="#node_toc_node_sec_1.1">1.1 How does this thing work?</a></h2>
+<p>DHTML is not ``another kind of HTML''. It's merely a naming convention. DHTML
+refers to the combination of HTML, CSS, JavaScript and DOM. DOM (Document
+Object Model) is a set of interfaces that glues the other three together. In
+other words, DOM allows dynamic modification of an HTML page through a program.
+JavaScript is our programming language, since that's what browsers like. CSS
+is a way to make it look good ;-). So all this soup is generically known as
+DHTML.</p>
+<p>
+Using DOM calls, the program dynamically creates a <tt><table></tt> element
+that contains a calendar for the given date and then inserts it in the document
+body. Then it shows this table at a specified position. Usually the position
+is related to some element in which the date needs to be displayed/entered,
+such as an input field.</p>
+<p>
+By assigning a certain CSS class to the table we can control the look of the
+calendar through an external CSS file; therefore, in order to change the
+colors, backgrounds, rollover effects and other stuff, you can only change a
+CSS file -- modification of the program itself is not necessary.</p>
+<p>
+</p>
+<a name="node_sec_1.2"></a>
+<h2><a href="#node_toc_node_sec_1.2">1.2 Project files</a></h2>
+<p>Here's a description of the project files, excluding documentation and example
+files.</p>
+<p>
+</p>
+<ul><p>
+</p>
+<li><p>the main program file (<tt>calendar.js</tt>). This defines all the logic
+behind the calendar widget.</p>
+<p>
+</p>
+<li><p>the CSS files (<tt>calendar-*.css</tt>). Loading one of them is
+necessary in order to see the calendar as intended.</p>
+<p>
+</p>
+<li><p>the language definition files (<tt>lang/calendar-*.js</tt>). They are
+plain JavaScript files that contain all texts that are displayed by the
+calendar. Loading one of them is necessary.</p>
+<p>
+</p>
+<li><p>helper functions for quick setup of the calendar
+(<tt>calendar-setup.js</tt>). You can do fine without it, but starting with
+version 0.9.3 this is the recommended way to setup a calendar.</p>
+<p>
+</p>
+</ul><p></p>
+<p>
+</p>
+<a name="node_sec_1.3"></a>
+<h2><a href="#node_toc_node_sec_1.3">1.3 License</a></h2>
+<p></p>
+<div align=center><table><tr><td>
+
+© Dynarch.com 2002-2005,
+<a href="http://www.dynarch.com/"><tt>www.dynarch.com</tt></a>
+Author: Mihai Bazon
+</td></tr></table></div>
+<p>
+The calendar is released under the
+<a href="http://www.gnu.org/licenses/lgpl.html">GNU Lesser General Public License</a>.</p>
+<p>
+</p>
+<a name="node_sec_2"></a>
+<h1><a href="#node_toc_node_sec_2">2 Quick startup</a></h1>
+<p></p>
+<p>
+Installing the calendar used to be quite a task until version 0.9.3. Starting
+with 0.9.3 I have included the file <tt>calendar-setup.js</tt> whose goal is to
+assist you to setup a popup or flat calendar in minutes. You are
+encouraged to modify this file and <em>not</em> calendar.js if you need
+extra customization, but you're on your own.</p>
+<p>
+First you have to include the needed scripts and style-sheet. Make sure you do
+this in your document's <tt><head></tt> section, also make sure you put the
+correct paths to the scripts.</p>
+<p>
+</p>
+<pre class=verbatim><style type="text/css">@import url(calendar-win2k-1.css);</style>
+<script type="text/javascript" src="calendar.js"></script>
+<script type="text/javascript" src="lang/calendar-en.js"></script>
+<script type="text/javascript" src="calendar-setup.js"></script>
+</pre><p></p>
+<p>
+</p>
+<a name="node_sec_2.1"></a>
+<h2><a href="#node_toc_node_sec_2.1">2.1 Installing a popup calendar</a></h2>
+<p></p>
+<p>
+Now suppose you have the following HTML:</p>
+<p>
+</p>
+<pre class=verbatim><form ...>
+ <input type="text" id="data" name="data" />
+ <button id="trigger">...</button>
+</form>
+</pre><p></p>
+<p>
+You want the button to popup a calendar widget when clicked? Just
+insert the following code immediately <em>after</em> the HTML form:</p>
+<p>
+</p>
+<pre class=verbatim><script type="text/javascript">
+ Calendar.setup(
+ {
+ inputField : "data", // ID of the input field
+ ifFormat : "%m %d, %Y", // the date format
+ button : "trigger" // ID of the button
+ }
+ );
+</script>
+</pre><p></p>
+<p>
+The <tt>Calendar.setup</tt> function, defined in <tt>calendar-setup.js</tt>
+takes care of ``patching'' the button to display a calendar when clicked. The
+calendar is by default in single-click mode and linked with the given input
+field, so that when the end-user selects a date it will update the input field
+with the date in the given format and close the calendar. If you are a
+long-term user of the calendar you probably remember that for doing this you
+needed to write a couple functions and add an ``onclick'' handler for the
+button by hand.</p>
+<p>
+By looking at the example above we can see that the function
+<tt>Calendar.setup</tt> receives only one parameter: a JavaScript object.
+Further, that object can have lots of properties that tell to the setup
+function how would we like to have the calendar. For instance, if we would
+like a calendar that closes at double-click instead of single-click we would
+also include the following: <tt>singleClick:false</tt>.</p>
+<p>
+For a list of all supported parameters please see the section
+<a href="#node_sec_2.3">2.3</a>.</p>
+<p>
+</p>
+<a name="node_sec_2.2"></a>
+<h2><a href="#node_toc_node_sec_2.2">2.2 Installing a flat calendar</a></h2>
+<p></p>
+<p>
+Here's how to configure a flat calendar, using the same <tt>Calendar.setup</tt>
+function. First, you should have an empty element with an ID. This element
+will act as a container for the calendar. It can be any block-level element,
+such as DIV, TABLE, etc. We will use a DIV in this example.</p>
+<p>
+</p>
+<pre class=verbatim><div id="calendar-container"></div>
+</pre><p></p>
+<p>
+Then there is the JavaScript code that sets up the calendar into the
+``calendar-container'' DIV. The code can occur anywhere in HTML
+<em>after</em> the DIV element.</p>
+<p>
+</p>
+<pre class=verbatim><script type="text/javascript">
+ function dateChanged(calendar) {
+ // Beware that this function is called even if the end-user only
+ // changed the month/year. In order to determine if a date was
+ // clicked you can use the dateClicked property of the calendar:
+ if (calendar.dateClicked) {
+ // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php
+ var y = calendar.date.getFullYear();
+ var m = calendar.date.getMonth(); // integer, 0..11
+ var d = calendar.date.getDate(); // integer, 1..31
+ // redirect...
+ window.location = "/" + y + "/" + m + "/" + d + "/index.php";
+ }
+ };
+
+ Calendar.setup(
+ {
+ flat : "calendar-container", // ID of the parent element
+ flatCallback : dateChanged // our callback function
+ }
+ );
+</script>
+</pre><p></p>
+<p>
+</p>
+<a name="node_sec_2.3"></a>
+<h2><a href="#node_toc_node_sec_2.3">2.3 <tt>Calendar.setup</tt> in detail</a></h2>
+<p></p>
+<p>
+Following there is the complete list of properties interpreted by
+Calendar.setup. All of them have default values, so you can pass only those
+which you would like to customize. Anyway, you <em>must</em> pass at least one
+of <tt>inputField</tt>, <tt>displayArea</tt> or <tt>button</tt>, for a popup
+calendar, or <tt>flat</tt> for a flat calendar. Otherwise you will get a
+warning message saying that there's nothing to setup.</p>
+<p>
+</p>
+<span class=small><table border=0><tr><td valign=top ><b>property</b> </td><td valign=top ><b>type</b> </td><td valign=top ><b>description</b> </td><td valign=top ><b>default</b>
+</td></tr>
+<tr><td valign=top ><tt>inputField</tt>
+</td><td valign=top >string </td><td valign=top >The ID of your input field.
+</td><td valign=top >null
+</td></tr>
+<tr><td valign=top ><tt>displayArea</tt>
+</td><td valign=top >string </td><td valign=top >This is the ID of a <span>, <div>, or any other element that you would like to use to display the current date. This is generally useful only if the input field is hidden, as an area to display the date.
+</td><td valign=top >null
+</td></tr>
+<tr><td valign=top ><tt>button</tt>
+</td><td valign=top >string </td><td valign=top >The ID of the calendar ``trigger''. This is an element (ordinarily a button or an image) that will dispatch a certain event (usually ``click'') to the function that creates and displays the calendar.
+</td><td valign=top >null
+</td></tr>
+<tr><td valign=top ><tt>eventName</tt>
+</td><td valign=top >string </td><td valign=top >The name of the event that will trigger the calendar. The name should be without the ``on'' prefix, such as ``click'' instead of ``onclick''. Virtually all users will want to let this have the default value (``click''). Anyway, it could be useful if, say, you want the calendar to appear when the input field is focused and have no trigger button (in this case use ``focus'' as the event name).
+</td><td valign=top >``click''
+</td></tr>
+<tr><td valign=top ><tt>ifFormat</tt>
+</td><td valign=top >string </td><td valign=top >The format string that will be used to enter the date in the input field. This format will be honored even if the input field is hidden.
+</td><td valign=top >``%Y/%m/%d''
+</td></tr>
+<tr><td valign=top ><tt>daFormat</tt>
+</td><td valign=top >string </td><td valign=top >Format of the date displayed in the displayArea (if specified).
+</td><td valign=top >``%Y/%m/%d''
+</td></tr>
+<tr><td valign=top ><tt>singleClick</tt>
+</td><td valign=top >boolean </td><td valign=top >Wether the calendar is in ``single-click mode'' or ``double-click mode''. If true (the default) the calendar will be created in single-click mode.
+</td><td valign=top >true
+</td></tr>
+<tr><td valign=top ><tt>disableFunc</tt>
+</td><td valign=top >function </td><td valign=top >A function that receives a JS Date object. It should return
+<tt>true</tt> if that date has to be disabled, <tt>false</tt> otherwise.
+<font color="red">DEPRECATED (see below).</font>
+</td><td valign=top >null
+</td></tr>
+<tr><td valign=top ><tt>dateStatusFunc</tt>
+</td><td valign=top >function </td><td valign=top >A function that receives a JS Date object and returns a boolean
+or a string. This function allows one to set a certain CSS class to some
+date, therefore making it look different. If it returns <tt>true</tt> then
+the date will be disabled. If it returns <tt>false</tt> nothing special
+happens with the given date. If it returns a string then that will be taken
+as a CSS class and appended to the date element. If this string is
+``disabled'' then the date is also disabled (therefore is like returning
+<tt>true</tt>). For more information please also refer to section
+<a href="#node_sec_5.3.8">5.3.8</a>.
+</td><td valign=top >null
+</td></tr>
+<tr><td valign=top ><tt>firstDay</tt>
+</td><td valign=top >integer </td><td valign=top >Specifies which day is to be displayed as the first day of
+week. Possible values are 0 to 6; 0 means Sunday, 1 means Monday, ..., 6
+means Saturday. The end user can easily change this too, by clicking on the
+day name in the calendar header.
+</td><td valign=top >0
+</td></tr>
+<tr><td valign=top ><tt>weekNumbers</tt>
+</td><td valign=top >boolean </td><td valign=top >If ``true'' then the calendar will display week numbers.
+</td><td valign=top >true
+</td></tr>
+<tr><td valign=top ><tt>align</tt>
+</td><td valign=top >string </td><td valign=top >Alignment of the calendar, relative to the reference element. The
+reference element is dynamically chosen like this: if a displayArea is
+specified then it will be the reference element. Otherwise, the input field
+is the reference element. For the meaning of the alignment characters
+please section <a href="#node_sec_5.3.11">5.3.11</a>.
+</td><td valign=top >``Bl''
+</td></tr>
+<tr><td valign=top ><tt>range</tt>
+</td><td valign=top >array </td><td valign=top >An array having exactly 2 elements, integers. (!) The first [0] element is the minimum year that is available, and the second [1] element is the maximum year that the calendar will allow.
+</td><td valign=top >[1900, 2999]
+</td></tr>
+<tr><td valign=top ><tt>flat</tt>
+</td><td valign=top >string </td><td valign=top >If you want a flat calendar, pass the ID of the parent object in
+this property. If not, pass <tt>null</tt> here (or nothing at all as
+<tt>null</tt> is the default value).
+</td><td valign=top >null
+</td></tr>
+<tr><td valign=top ><tt>flatCallback</tt>
+</td><td valign=top >function </td><td valign=top >You should provide this function if the calendar is flat. It
+will be called when the date in the calendar is changed with a reference to
+the calendar object. See section <a href="#node_sec_2.2">2.2</a> for an example
+of how to setup a flat calendar.
+</td><td valign=top >null
+</td></tr>
+<tr><td valign=top ><tt>onSelect</tt>
+</td><td valign=top >function </td><td valign=top >If you provide a function handler here then you have to manage
+the ``click-on-date'' event by yourself. Look in the calendar-setup.js and
+take as an example the onSelect handler that you can see there.
+</td><td valign=top >null
+</td></tr>
+<tr><td valign=top ><tt>onClose</tt>
+</td><td valign=top >function </td><td valign=top >This handler will be called when the calendar needs to close.
+You don't need to provide one, but if you do it's your responsibility to
+hide/destroy the calendar. You're on your own. Check the calendar-setup.js
+file for an example.
+</td><td valign=top >null
+</td></tr>
+<tr><td valign=top ><tt>onUpdate</tt>
+</td><td valign=top >function </td><td valign=top >If you supply a function handler here, it will be called right
+after the target field is updated with a new date. You can use this to
+chain 2 calendars, for instance to setup a default date in the second just
+after a date was selected in the first.
+</td><td valign=top >null
+</td></tr>
+<tr><td valign=top ><tt>date</tt>
+</td><td valign=top >date </td><td valign=top >This allows you to setup an initial date where the calendar will be
+positioned to. If absent then the calendar will open to the today date.
+</td><td valign=top >null
+</td></tr>
+<tr><td valign=top ><tt>showsTime</tt>
+</td><td valign=top >boolean </td><td valign=top >If this is set to <tt>true</tt> then the calendar will also
+allow time selection.
+</td><td valign=top >false
+</td></tr>
+<tr><td valign=top ><tt>timeFormat</tt>
+</td><td valign=top >string </td><td valign=top >Set this to ``12'' or ``24'' to configure the way that the
+calendar will display time.
+</td><td valign=top >``24''
+</td></tr>
+<tr><td valign=top ><tt>electric</tt>
+</td><td valign=top >boolean </td><td valign=top >Set this to ``false'' if you want the calendar to update the
+field only when closed (by default it updates the field at each date change,
+even if the calendar is not closed) </td><td valign=top >true
+</td></tr>
+<tr><td valign=top ><tt>position</tt>
+</td><td valign=top >array </td><td valign=top >Specifies the [x, y] position, relative to page's top-left corner,
+where the calendar will be displayed. If not passed then the position will
+be computed based on the ``align'' parameter. Defaults to ``null'' (not
+used). </td><td valign=top >null
+</td></tr>
+<tr><td valign=top ><tt>cache</tt>
+</td><td valign=top >boolean </td><td valign=top >Set this to ``true'' if you want to cache the calendar object.
+This means that a single calendar object will be used for all fields that
+require a popup calendar </td><td valign=top >false
+</td></tr>
+<tr><td valign=top ><tt>showOthers</tt>
+</td><td valign=top >boolean </td><td valign=top >If set to ``true'' then days belonging to months overlapping
+with the currently displayed month will also be displayed in the calendar
+(but in a ``faded-out'' color) </td><td valign=top >false
+
+</td></tr></table>
+
+</span><p>
+</p>
+<a name="node_sec_3"></a>
+<h1><a href="#node_toc_node_sec_3">3 Recipes</a></h1>
+<p>This section presents some common ways to setup a calendar using the
+<tt>Calendar.setup</tt> function detailed in the previous section.</p>
+<p>
+We don't discuss here about loading the JS or CSS code -- so make sure you
+add the proper <script> and <style> or <link> elements in your
+HTML code. Also, when we present input fields, please note that they should
+be embedded in some form in order for data to be actually sent to server; we
+don't discuss these things here because they are not related to our
+calendar.</p>
+<p>
+</p>
+<a name="node_sec_3.1"></a>
+<h2><a href="#node_toc_node_sec_3.1">3.1 Popup calendars</a></h2>
+<p>These samples can be found in the file â<tt>simple-1.html</tt>â from the
+calendar package.</p>
+<p>
+</p>
+<a name="node_sec_3.1.1"></a>
+<h3><a href="#node_toc_node_sec_3.1.1">3.1.1 Simple text field with calendar attached to a button</a></h3>
+<p></p>
+<p>
+This piece of code will create a calendar for a simple input field with a
+button that will open the calendar when clicked.</p>
+<p>
+</p>
+<pre class=verbatim><input type="text" name="date" id="f_date_b"
+ /><button type="reset" id="f_trigger_b"
+ >...</button>
+<script type="text/javascript">
+ Calendar.setup({
+ inputField : "f_date_b", //*
+ ifFormat : "%m/%d/%Y %I:%M %p",
+ showsTime : true,
+ button : "f_trigger_b", //*
+ step : 1
+ });
+</script>
+</pre><p></p>
+<p>
+Note that this code does more actually; the only <em>required</em> fields are
+those marked with â//*â -- that is, the ID of the input field and the ID of
+the button need to be passed to <tt>Calendar.setup</tt> in order for the
+calendar to be properly assigned to this input field. As one can easily
+guess from the argument names, the other arguments configure a certain date
+format, instruct the calendar to also include a time selector and display
+every year in the drop-down boxes (the âstepâ parameter) -- instead of showing
+every other year as the default calendar does.</p>
+<p>
+</p>
+<a name="node_sec_3.1.2"></a>
+<h3><a href="#node_toc_node_sec_3.1.2">3.1.2 Simple field with calendar attached to an image</a></h3>
+<p>Same as the above, but the element that triggers the calendar is this time
+an image, not a button.</p>
+<p>
+</p>
+<pre class=verbatim><input type="text" name="date" id="f_date_c" readonly="1" />
+<img src="img.gif" id="f_trigger_c"
+ style="cursor: pointer; border: 1px solid red;"
+ title="Date selector"
+ onmouseover="this.style.background='red';"
+ onmouseout="this.style.background=''" />
+<script type="text/javascript">
+ Calendar.setup({
+ inputField : "f_date_c",
+ ifFormat : "%B %e, %Y",
+ button : "f_trigger_c",
+ align : "Tl",
+ singleClick : false
+ });
+</script>
+</pre><p></p>
+<p>
+Note that the same 2 parameters are required as in the previous case; the
+difference is that the 'button' parameter now gets the ID of the image
+instead of the ID of the button. But the event is the same: at 'onclick' on
+the element that is passed as 'button', the calendar will be shown.</p>
+<p>
+The above code additionally sets an alignment mode -- the parameters are
+described in <a href="#node_sec_5.3.11">5.3.11</a>.</p>
+<p>
+</p>
+<a name="node_sec_3.1.3"></a>
+<h3><a href="#node_toc_node_sec_3.1.3">3.1.3 Hidden field, plain text triggers</a></h3>
+<p>Sometimes, to assure that the date is well formatted, you might want not to
+allow the end user to write a date manually. This can easily be achieved
+with an input field by setting its <tt>readonly</tt> attribute, which is
+defined by the HTML4 standard; however, here's an even nicer approach: our
+calendar widget allows you to use a hidden field as the way to pass data to
+server, and a âdisplay areaâ to show the end user the selected date. The
+âdisplay areaâ can be any HTML element, such as a DIV or a SPAN or
+whatever -- we will use a SPAN in our sample.</p>
+<p>
+</p>
+<pre class=verbatim><input type="hidden" name="date" id="f_date_d" />
+
+<p>Your birthday:
+ <span style="background-color: #ff8; cursor: default;"
+ onmouseover="this.style.backgroundColor='#ff0';"
+ onmouseout="this.style.backgroundColor='#ff8';"
+ id="show_d"
+ >Click to open date selector</span>.</p>
+
+<script type="text/javascript">
+ Calendar.setup({
+ inputField : "f_date_d",
+ ifFormat : "%Y/%d/%m",
+ displayArea : "show_d",
+ daFormat : "%A, %B %d, %Y",
+ });
+</script>
+</pre><p></p>
+<p>
+The above code will configure a calendar attached to the hidden field and to
+the SPAN having the id=âshow_dâ. When the SPAN element is clicked, the
+calendar opens and allows the end user to chose a date. When the date is
+chosen, the input field will be updated with the value in the format
+â<tt>%Y/%d/%m</tt>â, and the SPAN element will display the date in a
+friendlier format (defined by â<tt>daFormat</tt>â).</p>
+<p>
+Beware that using this approach will make your page unfunctional in browsers
+that do not support JavaScript or our calendar.</p>
+<p>
+</p>
+<a name="node_sec_3.1.4"></a>
+<h3><a href="#node_toc_node_sec_3.1.4">3.1.4 2 Linked fields, no trigger buttons</a></h3>
+<p>Supposing you want to create 2 fields that hold an interval of exactly one
+week. The first is the starting date, and the second is the ending date.
+You want the fields to be automatically updated when some date is clicked in
+one or the other, in order to keep exactly one week difference between them.</p>
+<p>
+</p>
+<pre class=verbatim><input type="text" name="date" id="f_date_a" />
+<input type="text" name="date" id="f_calcdate" />
+
+<script type="text/javascript">
+ function catcalc(cal) {
+ var date = cal.date;
+ var time = date.getTime()
+ // use the _other_ field
+ var field = document.getElementById("f_calcdate");
+ if (field == cal.params.inputField) {
+ field = document.getElementById("f_date_a");
+ time -= Date.WEEK; // substract one week
+ } else {
+ time += Date.WEEK; // add one week
+ }
+ var date2 = new Date(time);
+ field.value = date2.print("%Y-%m-%d %H:%M");
+ }
+ Calendar.setup({
+ inputField : "f_date_a",
+ ifFormat : "%Y-%m-%d %H:%M",
+ showsTime : true,
+ timeFormat : "24",
+ onUpdate : catcalc
+ });
+ Calendar.setup({
+ inputField : "f_calcdate",
+ ifFormat : "%Y-%m-%d %H:%M",
+ showsTime : true,
+ timeFormat : "24",
+ onUpdate : catcalc
+ });
+</script>
+</pre><p></p>
+<p>
+The above code will configure 2 input fields with calendars attached, as
+usual. The first thing to note is that there's no trigger button -- in such
+case, the calendar will popup when one clicks into the input field. Using
+the <tt>onUpdate</tt> parameter, we pass a reference to a function of ours
+that will get called after a date was selected. In that function we
+determine what field was updated and we compute the date in the other input
+field such that it keeps a one week difference between the two. Enjoy! :-)</p>
+<p>
+</p>
+<a name="node_sec_3.2"></a>
+<h2><a href="#node_toc_node_sec_3.2">3.2 Flat calendars</a></h2>
+<p>This sample can be found in â<tt>simple-2.html</tt>â. It will configure a
+flat calendar that is always displayed in the page, in the DIV having the
+id=âcalendar-containerâ. When a date is clicked our function hander gets
+called (<tt>dateChanged</tt>) and it will compute an URL to jump to based on
+the selected date, then use <tt>window.location</tt> to visit the new link.</p>
+<p>
+</p>
+<pre class=verbatim><div style="float: right; margin-left: 1em; margin-bottom: 1em;"
+id="calendar-container"></div>
+
+<script type="text/javascript">
+ function dateChanged(calendar) {
+ // Beware that this function is called even if the end-user only
+ // changed the month/year. In order to determine if a date was
+ // clicked you can use the dateClicked property of the calendar:
+ if (calendar.dateClicked) {
+ // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php
+ var y = calendar.date.getFullYear();
+ var m = calendar.date.getMonth(); // integer, 0..11
+ var d = calendar.date.getDate(); // integer, 1..31
+ // redirect...
+ window.location = "/" + y + "/" + m + "/" + d + "/index.php";
+ }
+ };
+
+ Calendar.setup(
+ {
+ flat : "calendar-container", // ID of the parent element
+ flatCallback : dateChanged // our callback function
+ }
+ );
+</script>
+</pre><p></p>
+<p>
+</p>
+<a name="node_sec_3.3"></a>
+<h2><a href="#node_toc_node_sec_3.3">3.3 Highlight special dates</a></h2>
+<p>So you want to display certain dates in a different color, or with bold
+font, or whatever, right? Well, no problem -- our calendar can do this as
+well. It doesn't matter if it's a flat or popup calendar -- we'll use a flat
+one for this sample. The idea, however, is that you need to have the dates
+in an array or a JavaScript object -- whatever is suitable for your way of
+thinking -- and use it from a function that returns a value, telling the
+calendar what kind of date is the passed one.</p>
+<p>
+Too much talking, here's the code ;-)</p>
+<p>
+</p>
+<pre class=verbatim><!-- this goes into the <head> tag -->
+<style type="text/css">
+ .special { background-color: #000; color: #fff; }
+</style>
+
+<!-- and the rest inside the <body> -->
+<div style="float: right; margin-left: 1em; margin-bottom: 1em;"
+id="calendar-container"></div>
+
+<script type="text/javascript">
+ var SPECIAL_DAYS = {
+ 0 : [ 13, 24 ], // special days in January
+ 2 : [ 1, 6, 8, 12, 18 ], // special days in March
+ 8 : [ 21, 11 ] // special days in September
+ };
+
+ function dateIsSpecial(year, month, day) {
+ var m = SPECIAL_DAYS[month];
+ if (!m) return false;
+ for (var i in m) if (m[i] == day) return true;
+ return false;
+ };
+
+ function dateChanged(calendar) {
+ // Beware that this function is called even if the end-user only
+ // changed the month/year. In order to determine if a date was
+ // clicked you can use the dateClicked property of the calendar:
+ if (calendar.dateClicked) {
+ // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php
+ var y = calendar.date.getFullYear();
+ var m = calendar.date.getMonth(); // integer, 0..11
+ var d = calendar.date.getDate(); // integer, 1..31
+ // redirect...
+ window.location = "/" + y + "/" + m + "/" + d + "/index.php";
+ }
+ };
+
+ function ourDateStatusFunc(date, y, m, d) {
+ if (dateIsSpecial(y, m, d))
+ return "special";
+ else
+ return false; // other dates are enabled
+ // return true if you want to disable other dates
+ };
+
+ Calendar.setup(
+ {
+ flat : "calendar-container", // ID of the parent element
+ flatCallback : dateChanged, // our callback function
+ dateStatusFunc : ourDateStatusFunc
+ }
+ );
+</script>
+</pre><p></p>
+<p>
+So the above code creates a normal flat calendar, like in the previous
+sample. We hook into it with the function â<tt>ourDateStatusFunc</tt>â,
+which receives a date object as the first argument, and also the year,
+month, date as the next 3 arguments (normally, you can extract year, month,
+date from the first parameter too, but we pass them separately for
+convenience, as it's very likely that they are going to be used in this
+function).</p>
+<p>
+So, this function receives a date. It can return <tt>false</tt> if you want
+no special action to be taken on that date, <tt>true</tt> if that date
+should be disabled (unselectable), or a string if you want to assign a
+special CSS class to that date. We return âspecialâ for the dates that we
+want to highlight -- and note that we defined a âspecialâ look for them in
+the CSS section.</p>
+<p>
+I used a simple approach here to define what dates are special. There's a
+JavaScript object (the SPECIAL_DAYS global variable) which holds an array
+of dates for each month. Month numbers start at zero (January). Months
+that don't contain special dates can be absent from this object. Note that
+the way to implement this is completely separated from the calendar
+code -- therefore, feel free to use your imagination if you have better
+ideas. :-)</p>
+<p>
+</p>
+<a name="node_sec_3.4"></a>
+<h2><a href="#node_toc_node_sec_3.4">3.4 Select multiple dates</a></h2>
+<p>Starting version 1.0, the calendar is able to handle multiple dates
+selection. You just need to pass the â<tt>multiple</tt>â parameter to
+<tt>Calendar.setup</tt> and add some special code that interprets the
+selection once the calendar is closed.</p>
+<p>
+</p>
+<pre class=verbatim><a id="trigger" href="#">[open calendar...]</a>
+<div id="output"></div>
+<script type="text/javascript">//<![CDATA[
+ // the default multiple dates selected,
+ // first time the calendar is displayed
+ var MA = [];
+
+ function closed(cal) {
+
+ // here we'll write the output; this is only for example. You
+ // will normally fill an input field or something with the dates.
+ var el = document.getElementById("output");
+
+ // reset initial content.
+ el.innerHTML = "";
+
+ // Reset the "MA", in case one triggers the calendar again.
+ // CAREFUL! You don't want to do "MA = [];". We need to modify
+ // the value of the current array, instead of creating a new one.
+ // Calendar.setup is called only once! :-) So be careful.
+ MA.length = 0;
+
+ // walk the calendar's multiple dates selection hash
+ for (var i in cal.multiple) {
+ var d = cal.multiple[i];
+ // sometimes the date is not actually selected,
+ // so let's check
+ if (d) {
+ // OK, selected. Fill an input field or something.
+ el.innerHTML += d.print("%A, %Y %B %d") + "<br />";
+ // and push it in the "MA", in case one triggers the calendar again.
+ MA[MA.length] = d;
+ }
+ }
+ cal.hide();
+ return true;
+ };
+
+ Calendar.setup({
+ align : "BR",
+ showOthers : true,
+ multiple : MA, // pass the initial or computed array of multiple dates
+ onClose : closed,
+ button : "trigger"
+ });
+//]]></script>
+</pre><p></p>
+<p>
+The above code creates a popup calendar and passes to it an array of dates,
+which is initially empty, in the âmultipleâ argument. When the calendar is
+closed it will call our â<tt>closed</tt>â function handler; in this handler
+we determine what dates were actually selected, inspecting the
+â<tt>cal.multiple</tt>â property, we display them in a DIV element right
+next to the <a> element that opens the calendar, and we reinitialize the
+global array of selected dates (which will be used if the end user opens the
+calendar again). I guess the code speaks for itself, right? :-)</p>
+<p>
+</p>
+<a name="node_sec_4"></a>
+<h1><a href="#node_toc_node_sec_4">4 The Calendar object overview</a></h1>
+<p></p>
+<p>
+Basically you should be able to setup the calendar with the function presented
+in the previous section. However, if for some reason <tt>Calendar.setup</tt>
+doesn't provide all the functionality that you need and you want to tweak into
+the process of creating and configuring the calendar ``by hand'', then this
+section is the way to go.</p>
+<p>
+The file <tt>calendar.js</tt> implements the functionality of the calendar.
+All (well, almost all) functions and variables are embedded in the JavaScript
+object ``Calendar''.</p>
+<p>
+You can instantiate a <tt>Calendar</tt> object by calling the constructor, like
+this: <tt>var cal = new Calendar(<tt>...</tt>)</tt>. We will discuss the parameters
+later. After creating the object, the variable <tt>cal</tt> will contain a
+reference to it. You can use this reference to access further options of the
+calendar, for instance:</p>
+<p>
+</p>
+<pre class=verbatim>cal.weekNumbers = false; // do not display week numbers
+cal.showsTime = true; // include a time selector
+cal.setDateFormat("%Y.%m.%d %H:%M"); // set this format: 2003.12.31 23:59
+cal.setDisabledHandler(function(date, year, month, day) {
+ // verify date and return true if it has to be disabled
+ // ``date'' is a JS Date object, but if you only need the
+ // year, month and/or day you can get them separately as
+ // next 3 parameters, as you can see in the declaration
+ if (year == 2004) {
+ // disable all dates from 2004
+ return true;
+ }
+ return false;
+});
+</pre><p></p>
+<p>
+etc. Prior to version
+0.9.3 this was the only way to configure it. The <tt>Calendar.setup</tt>
+function, documented in section <a href="#node_sec_2">2</a>, basically does the same
+things (actually more) in order to setup the calendar, based on the parameters
+that you provided.</p>
+<p>
+</p>
+<a name="node_sec_4.1"></a>
+<h2><a href="#node_toc_node_sec_4.1">4.1 Creating a calendar</a></h2>
+<p>The calendar is created by following some steps (even the function
+<tt>Calendar.setup</tt>, described in section <a href="#node_sec_2">2</a>, does the
+same). While you can skip optional (marked ``opt'') steps if you're happy with
+the defaults, please respect the order below.</p>
+<p>
+</p>
+<ol><p>
+</p>
+<li><p><em>Instantiate</em> a <tt>Calendar</tt> object. Details about this in
+section <a href="#node_sec_5.1">5.1</a>.</p>
+<p>
+</p>
+<li><p><b>opt</b> Set the <tt>weekNumbers</tt> property to <tt>false</tt> if you don't want
+the calendar to display week numbers.</p>
+<p>
+</p>
+<li><p><b>opt</b> Set the <tt>showsTime</tt> property to <tt>true</tt> if you
+want the calendar to also provide a time selector.</p>
+<p>
+</p>
+<li><p><b>opt</b> Set the <tt>time24</tt> property to <tt>false</tt> if you want
+the time selector to be in 12-hour format. Default is 24-hour format. This
+property only has effect if you also set <tt>showsTime</tt> to
+<tt>true</tt>.</p>
+<p>
+</p>
+<li><p><b>opt</b> Set the range of years available for selection (see section
+<a href="#node_sec_5.3.15">5.3.15</a>). The default range is [1970..2050].</p>
+<p>
+</p>
+<li><p><b>opt</b> Set the <tt>getDateStatus</tt> property. You should pass
+here a function that receives a JavaScript <tt>Date</tt> object and returns
+<tt>true</tt> if the given date should be disabled, false otherwise (details in
+section <a href="#node_sec_5.3.7">5.3.7</a>).</p>
+<p>
+</p>
+<li><p><b>opt</b> Set a date format. Your handler function, passed to the
+calendar constructor, will be called when a date is selected with a reference
+to the calendar and a date string in this format.</p>
+<p>
+</p>
+<li><p><em>Create</em> the HTML elements related to the calendar. This step
+practically puts the calendar in your HTML page. You simply call
+<tt>Calendar.create()</tt>. You can give an optional parameter if you wanna
+create a flat calendar (details in section <a href="#node_sec_5.3.1">5.3.1</a>).</p>
+<p>
+</p>
+<li><p><b>opt</b> Initialize the calendar to a certain date, for instance from
+the input field.</p>
+<p>
+</p>
+<li><p>Show the calendar (details in section <a href="#node_sec_5.3.9">5.3.9</a>).</p>
+<p>
+</p>
+</ol><p></p>
+<p>
+</p>
+<a name="node_sec_4.2"></a>
+<h2><a href="#node_toc_node_sec_4.2">4.2 Order does matter ;-)</a></h2>
+<p>As you could see in the previous section, there are more steps to be followed
+in order to setup the calendar. This happens because there are two different
+things that need to be accomplished: first there is the JavaScript object, that
+is created with <tt>new Calendar(<tt>...</tt>)</tt>. Secondly there are the HTML
+elements that actually lets you see and manipulate the calendar.</p>
+<p>
+</p>
+<span class=small>[ Those that did UI<a name="call_footnote_Temp_5"></a><a href="#footnote_Temp_5"><sup><small>4</small></sup></a> programming, no matter in what
+language and on what platform, may be familiar with this concept. First there
+is the object in memory that lets you manipulate the UI element, and secondly
+there is the UI element (known as ``control'', ``window'', ``widget'', etc.),
+also in memory but you don't usually access it directly. ]
+</span><p>
+By instantiating the calendar we create the JavaScript object. It lets us
+configure some properties and it also knows how to create the UI element (the
+HTML elements actually) that will eventually be what the end-user sees on
+screen. Creation of the HTML element is accomplished by the function
+<tt>Calendar.create</tt>. It knows how to create popup or flat calendars.
+This function is described in section <a href="#node_sec_5.3.1">5.3.1</a>.</p>
+<p>
+Some properties need to be set prior to creating the HTML elements, because
+otherwise they wouldn't have any effect. Such a property is
+<tt>weekNumbers</tt> -- it has the default value ``true'', and if you don't
+want the calendar to display the week numbers you have to set it to false. If,
+however, you do that <em>after</em> calling <tt>Calendar.create</tt> the calendar
+would still display the week numbers, because the HTML elements are already
+created (including the <tt><td></tt>-s in the <tt><table></tt> element that
+should contain the week numbers). For this reason the order of the steps above
+is important.</p>
+<p>
+Another example is when you want to show the calendar. The ``create'' function
+does create the HTML elements, but they are initially hidden (have the style
+``display: none'') unless the calendar is a flat calendar that should be always
+visible in the page. Obviously, the <tt>Calendar.show</tt> function should be
+called <em>after</em> calling <tt>Calendar.create</tt>.</p>
+<p>
+</p>
+<a name="node_sec_4.3"></a>
+<h2><a href="#node_toc_node_sec_4.3">4.3 Caching the object</a></h2>
+<p>Suppose the end-user has popped up a calendar and selects a date. The calendar
+then closes. What really happens now?</p>
+<p>
+There are two approaches. The first (used in very old versions of the
+calendar) was to drop completely the Calendar object and when the end-user pops
+up the calendar again to create another one. This approach is bad for more
+reasons:</p>
+<p>
+</p>
+<ul><p>
+</p>
+<li><p>creating the JavaScript object and HTML elements is time-consuming</p>
+<p>
+</p>
+<li><p>we may loose some end-user preferences (i.e. he might prefer to have
+Monday for the first day of week and probably already clicked it the first time
+when the calendar was opened, but now he has to do it again)</p>
+<p>
+</p>
+</ul><p></p>
+<p>
+The second approach, implemented by the <tt>Calendar.setup</tt> function, is to
+cache the JavaScript object. It does this by checking the global variable
+<tt>window.calendar</tt> and if it is not null it assumes it is the created
+Calendar object. When the end-user closes the calendar, our code will only
+call ``<tt>hide</tt>'' on it, therefore keeping the JavaScript object and the
+HTML elements in place.</p>
+<p>
+<font color="red">CAVEAT:</font> Since time selection support was introduced, this
+``object caching'' mechanism has the following drawback: if you once created
+the calendar with the time selection support, then other items that may not
+require this functionality will still get a calendar with the time selection
+support enabled. And reciprocal. ;-) Hopefully this will be corrected in a
+later version, but for now it doesn't seem such a big problem.</p>
+<p>
+</p>
+<a name="node_sec_4.4"></a>
+<h2><a href="#node_toc_node_sec_4.4">4.4 Callback functions</a></h2>
+<p>You might rightfully wonder how is the calendar related to the input field?
+Who tells it that it has to update <em>that</em> input field when a date is
+selected, or that it has to jump to <em>that</em> URL when a date is clicked in
+flat mode?</p>
+<p>
+All this magic is done through callback functions. The calendar doesn't know
+anything about the existence of an input field, nor does it know where to
+redirect the browser when a date is clicked in flat mode. It just calls your
+callback when a particular event is happening, and you're responsible to handle
+it from there. For a general purpose library I think this is the best model of
+making a truly reusable thing.</p>
+<p>
+The calendar supports the following user callbacks:</p>
+<p>
+</p>
+<ul><p>
+</p>
+<li><p><b>onSelect</b> -- this gets called when the end-user changes the date in the
+calendar. Documented in section <a href="#node_sec_5.1">5.1</a>.</p>
+<p>
+</p>
+<li><p><b>onClose</b> -- this gets called when the calendar should close. It's
+user's responsibility to close the calendar. Details in section
+<a href="#node_sec_5.1">5.1</a>.</p>
+<p>
+</p>
+<li><p><b>getDateStatus</b> -- this function gets called for any day in a month,
+just before displaying the month. It is called with a JavaScript <tt>Date</tt>
+object and should return <tt>true</tt> if that date should be disabled, false
+if it's an ordinary date and no action should be taken, or it can return a
+string in which case the returned value will be appended to the element's CSS
+class (this way it provides a powerful way to make some dates ``special'',
+i.e. highlight them differently). Details in section
+<a href="#node_sec_5.3.8">5.3.8</a>.</p>
+<p>
+</p>
+</ul><p></p>
+<p>
+</p>
+<a name="node_sec_5"></a>
+<h1><a href="#node_toc_node_sec_5">5 The Calendar object API reference</a></h1>
+<p></p>
+<p>
+</p>
+<a name="node_sec_5.1"></a>
+<h2><a href="#node_toc_node_sec_5.1">5.1 <tt>Calendar</tt> constructor</a></h2>
+<p></p>
+<p>
+Synopsis:</p>
+<p>
+</p>
+<pre class=verbatim>var calendar = Calendar(firstDayOfWeek, date, onSelect, onClose);
+</pre><p></p>
+<p>
+Parameters are as follows:</p>
+<p>
+</p>
+<ul><p>
+</p>
+<li><p><b>firstDayOfWeek</b> -- specifies which day is to be displayed as the first
+day of week. Possible values are 0 to 6; 0 means Sunday, 1 means Monday,
+..., 6 means Saturday.</p>
+<p>
+</p>
+<li><p><b>date</b> -- a JavaScript Date object or <tt>null</tt>. If <tt>null</tt>
+is passed then the calendar will default to today date. Otherwise it will
+initialize on the given date.</p>
+<p>
+</p>
+<li><p><b>onSelect</b> -- your callback for the ``onChange'' event. See above.</p>
+<p>
+</p>
+<li><p><b>onClose</b> -- your callback for the ``onClose'' event. See above.</p>
+<p>
+</p>
+</ul><p></p>
+<p>
+</p>
+<a name="node_sec_Temp_6"></a>
+<h3><a href="#node_toc_node_sec_Temp_6">The <tt>onSelect</tt> event</a></h3>
+<p></p>
+<p>
+Here is a typical implementation of this function:</p>
+<p>
+</p>
+<pre class=verbatim>function onSelect(calendar, date) {
+ var input_field = document.getElementById("date");
+ input_field.value = date;
+};
+</pre><p></p>
+<p>
+<tt>date</tt> is in the format selected with <tt>calendar.setDateFormat</tt>
+(see section <a href="#node_sec_5.3.5">5.3.5</a>). This code simply updates the
+input field. If you want the calendar to be in single-click mode then you
+should also close the calendar after you updated the input field, so we come to
+the following version:</p>
+<p>
+</p>
+<pre class=verbatim>function onSelect(calendar, date) {
+ var input_field = document.getElementById("date");
+ input_field.value = date;
+ if (calendar.dateClicked) {
+ calendar.callCloseHandler(); // this calls "onClose" (see above)
+ }
+};
+</pre><p></p>
+<p>
+Note that we checked the member variable <tt>dateClicked</tt> and
+only hide the calendar if it's <tt>true</tt>. If this variable is <tt>false</tt> it
+means that no date was actually selected, but the user only changed the
+month/year using the navigation buttons or the menus. We don't want to hide
+the calendar in that case.</p>
+<p>
+</p>
+<a name="node_sec_Temp_7"></a>
+<h3><a href="#node_toc_node_sec_Temp_7">The <tt>onClose</tt> event</a></h3>
+<p></p>
+<p>
+This event is triggered when the calendar should close. It should hide or
+destroy the calendar object -- the calendar itself just triggers the event, but
+it won't close itself.</p>
+<p>
+A typical implementation of this function is the following:</p>
+<p>
+</p>
+<pre class=verbatim>function onClose(calendar) {
+ calendar.hide();
+ // or calendar.destroy();
+};
+</pre><p></p>
+<p>
+</p>
+<a name="node_sec_5.2"></a>
+<h2><a href="#node_toc_node_sec_5.2">5.2 Useful member variables (properties)</a></h2>
+<p></p>
+<p>
+After creating the Calendar object you can access the following properties:</p>
+<p>
+</p>
+<ul><p>
+</p>
+<li><p><tt>date</tt> -- is a JavaScript <tt>Date</tt> object. It will always
+reflect the date shown in the calendar (yes, even if the calendar is hidden).</p>
+<p>
+</p>
+<li><p><tt>isPopup</tt> -- if this is true then the current Calendar object is
+a popup calendar. Otherwise (false) we have a flat calendar. This variable is
+set from <tt>Calendar.create</tt> and has no meaning before this function was
+called.</p>
+<p>
+</p>
+<li><p><tt>dateClicked</tt> -- particularly useful in the <tt>onSelect</tt>
+handler, this variable tells us if a date was really clicked. That's because
+the <tt>onSelect</tt> handler is called even if the end-user only changed the
+month/year but did not select a date. We don't want to close the calendar in
+that case.</p>
+<p>
+</p>
+<li><p><tt>weekNumbers</tt> -- if <tt>true</tt> (default) then the calendar
+displays week numbers. If you don't want week numbers you have to set this
+variable to <tt>false</tt> <em>before</em> calling <tt>Calendar.create</tt>.</p>
+<p>
+</p>
+<li><p><tt>showsTime</tt> - if you set this to <tt>true</tt> (it is
+<tt>false</tt> by default) then the calendar will also include a time selector.</p>
+<p>
+</p>
+<li><p><tt>time24</tt> - if you set this to <tt>false</tt> then the time
+selector will be in 12-hour format. It is in 24-hour format by default.</p>
+<p>
+</p>
+<li><p><tt>firstDayOfWeek</tt> -- specifies the first day of week (0 to 6, pass
+0 for Sunday, 1 for Monday, ..., 6 for Saturday). This variable is set from
+constructor, but you still have a chance to modify it <em>before</em> calling
+<tt>Calendar.create</tt>.</p>
+<p>
+</p>
+</ul><p></p>
+<p>
+There are lots of other member variables, but one should access them only
+through member functions so I won't document them here.</p>
+<p>
+</p>
+<a name="node_sec_5.3"></a>
+<h2><a href="#node_toc_node_sec_5.3">5.3 Public methods</a></h2>
+<p></p>
+<a name="node_sec_5.3.1"></a>
+<h3><a href="#node_toc_node_sec_5.3.1">5.3.1 <tt>Calendar.create</tt></a></h3>
+<p></p>
+<p>
+This function creates the afferent HTML elements that are needed to display the
+calendar. You should call it after setting the calendar properties. Synopsis:
+</p>
+<pre class=verbatim>calendar.create(); // creates a popup calendar
+ // -- or --
+calendar.create(document.getElementById(parent_id)); // makes a flat calendar
+</pre><p></p>
+<p>
+It can create a popup calendar or a flat calendar. If the ``parent'' argument
+is present (it should be a <em>reference</em> -- not ID -- to an HTML element) then
+a flat calendar is created and it is inserted in the given element.</p>
+<p>
+At any moment, given a reference to a calendar object, we can inspect if it's a
+popup or a flat calendar by checking the boolean member variable
+<tt>isPopup</tt>:</p>
+<p>
+</p>
+<pre class=verbatim>if (calendar.isPopup) {
+ // this is a popup calendar
+} else {
+ // this is a flat calendar
+}
+</pre><p></p>
+<p>
+</p>
+<a name="node_sec_5.3.2"></a>
+<h3><a href="#node_toc_node_sec_5.3.2">5.3.2 <tt>Calendar.callHandler</tt></a></h3>
+<p></p>
+<p>
+This function calls the first user callback (the
+<tt>onSelect</tt> handler) with the required parameters.</p>
+<p>
+</p>
+<a name="node_sec_5.3.3"></a>
+<h3><a href="#node_toc_node_sec_5.3.3">5.3.3 <tt>Calendar.callCloseHandler</tt></a></h3>
+<p></p>
+<p>
+This function calls the second user callback (the
+<tt>onClose</tt> handler). It's useful when you want to have a
+``single-click'' calendar -- just call this in your <tt>onSelect</tt> handler,
+if a date was clicked.</p>
+<p>
+</p>
+<a name="node_sec_5.3.4"></a>
+<h3><a href="#node_toc_node_sec_5.3.4">5.3.4 <tt>Calendar.hide</tt></a></h3>
+<p></p>
+<p>
+Call this function to hide the calendar. The calendar object and HTML elements
+will not be destroyed, thus you can later call one of the <tt>show</tt>
+functions on the same element.</p>
+<p>
+</p>
+<a name="node_sec_5.3.5"></a>
+<h3><a href="#node_toc_node_sec_5.3.5">5.3.5 <tt>Calendar.setDateFormat</tt></a></h3>
+<p></p>
+<p>
+This function configures the format in which the calendar reports the date to
+your ``onSelect'' handler. Call it like this:</p>
+<p>
+</p>
+<pre class=verbatim>calendar.setDateFormat("%y/%m/%d");
+</pre><p></p>
+<p>
+As you can see, it receives only one parameter, the required format. The magic
+characters are the following:</p>
+<p>
+</p>
+<table border=0><tr><td valign=top ></td></tr>
+<tr><td valign=top ><tt>%a</tt> </td><td valign=top >abbreviated weekday name </td></tr>
+<tr><td valign=top ><tt>%A</tt> </td><td valign=top >full weekday name </td></tr>
+<tr><td valign=top ><tt>%b</tt> </td><td valign=top >abbreviated month name </td></tr>
+<tr><td valign=top ><tt>%B</tt> </td><td valign=top >full month name </td></tr>
+<tr><td valign=top ><tt>%C</tt> </td><td valign=top >century number </td></tr>
+<tr><td valign=top ><tt>%d</tt> </td><td valign=top >the day of the month ( 00 .. 31 ) </td></tr>
+<tr><td valign=top ><tt>%e</tt> </td><td valign=top >the day of the month ( 0 .. 31 ) </td></tr>
+<tr><td valign=top ><tt>%H</tt> </td><td valign=top >hour ( 00 .. 23 ) </td></tr>
+<tr><td valign=top ><tt>%I</tt> </td><td valign=top >hour ( 01 .. 12 ) </td></tr>
+<tr><td valign=top ><tt>%j</tt> </td><td valign=top >day of the year ( 000 .. 366 ) </td></tr>
+<tr><td valign=top ><tt>%k</tt> </td><td valign=top >hour ( 0 .. 23 ) </td></tr>
+<tr><td valign=top ><tt>%l</tt> </td><td valign=top >hour ( 1 .. 12 ) </td></tr>
+<tr><td valign=top ><tt>%m</tt> </td><td valign=top >month ( 01 .. 12 ) </td></tr>
+<tr><td valign=top ><tt>%M</tt> </td><td valign=top >minute ( 00 .. 59 ) </td></tr>
+<tr><td valign=top ><tt>%n</tt> </td><td valign=top >a newline character </td></tr>
+<tr><td valign=top ><tt>%p</tt> </td><td valign=top >``PM'' or ``AM'' </td></tr>
+<tr><td valign=top ><tt>%P</tt> </td><td valign=top >``pm'' or ``am'' </td></tr>
+<tr><td valign=top ><tt>%S</tt> </td><td valign=top >second ( 00 .. 59 ) </td></tr>
+<tr><td valign=top ><tt>%s</tt> </td><td valign=top >number of seconds since Epoch (since Jan 01 1970 00:00:00 UTC) </td></tr>
+<tr><td valign=top ><tt>%t</tt> </td><td valign=top >a tab character </td></tr>
+<tr><td valign=top ><tt>%U, %W, %V</tt> </td><td valign=top >the week number</td></tr>
+<tr><td valign=top ><tt>%u</tt> </td><td valign=top >the day of the week ( 1 .. 7, 1 = MON )</td></tr>
+<tr><td valign=top ><tt>%w</tt> </td><td valign=top >the day of the week ( 0 .. 6, 0 = SUN )</td></tr>
+<tr><td valign=top ><tt>%y</tt> </td><td valign=top >year without the century ( 00 .. 99 )</td></tr>
+<tr><td valign=top ><tt>%Y</tt> </td><td valign=top >year including the century ( ex. 1979 )</td></tr>
+<tr><td valign=top ><tt>%%</tt> </td><td valign=top >a literal <tt>%</tt> character
+</td></tr></table><p>
+There are more algorithms for computing the week number. All
+three specifiers currently implement the same one, as defined by ISO 8601:
+``the week 01 is the week that has the Thursday in the current year, which is
+equivalent to the week that contains the fourth day of January. Weeks start on
+Monday.''</p>
+<p>
+</p>
+<a name="node_sec_5.3.6"></a>
+<h3><a href="#node_toc_node_sec_5.3.6">5.3.6 <tt>Calendar.setTtDateFormat</tt></a></h3>
+<p></p>
+<p>
+Has the same prototype as <tt>Calendar.setDateFormat</tt>, but refers to the
+format of the date displayed in the ``status bar'' when the mouse is over some
+date.</p>
+<p>
+</p>
+<a name="node_sec_5.3.7"></a>
+<h3><a href="#node_toc_node_sec_5.3.7">5.3.7 <tt>Calendar.setDisabledHandler</tt></a></h3>
+<p></p>
+<p>
+This function allows you to specify a callback function that checks if a
+certain date must be disabled by the calendar. You are responsible to write
+the callback function. Synopsis:</p>
+<p>
+</p>
+<pre class=verbatim>function disallowDate(date) {
+ // date is a JS Date object
+ if ( date.getFullYear() == 2003 &&
+ date.getMonth() == 6 /* July, it's zero-based */ &&
+ date.getDate() == 5 ) {
+ return true; // disable July 5 2003
+ }
+ return false; // enable other dates
+};
+
+calendar.setDisabledHandler(disallowDate);
+</pre><p></p>
+<p>
+If you change this function in ``real-time'', meaning, without creating a new
+calendar, then you have to call <tt>calendar.refresh()</tt> to make it
+redisplay the month and take into account the new disabledHandler.
+<tt>Calendar.setup</tt> does this, so you have no such trouble with it.</p>
+<p>
+Note that <tt>disallowDate</tt> should be very fast, as it is called for each
+date in the month. Thus, it gets called, say, 30 times before displaying the
+calendar, and 30 times when the month is changed. Tests I've done so far show
+that it's still good, but in the future I might switch it to a different design
+(for instance, to call it once per month and to return an array of dates that
+must be disabled).</p>
+<p>
+This function should be considered deprecated in the favor of
+<tt>Calendar.setDateStatusHandler</tt>, described below.</p>
+<p>
+</p>
+<a name="node_sec_5.3.8"></a>
+<h3><a href="#node_toc_node_sec_5.3.8">5.3.8 <tt>Calendar.setDateStatusHandler</tt></a></h3>
+<p></p>
+<p>
+This function obsoletes <tt>Calendar.setDisabledHandler</tt>. You call it with
+a function parameter, but this function can return a boolean
+<em>or a string</em>. If the return value is a boolean (<tt>true</tt> or
+<tt>false</tt>) then it behaves just like <tt>setDisabledHandler</tt>,
+therefore disabling the date if the return value is <tt>true</tt>.</p>
+<p>
+If the returned value is a string then the given date will gain an additional
+CSS class, namely the returned value. You can use this to highlight some dates
+in some way. Note that you are responsible for defining the CSS class that you
+return. If you return the string ``disabled'' then that date will be disabled,
+just as if you returned <tt>true</tt>.</p>
+<p>
+Here is a simple scenario that shows what you can do with this function. The
+following should be present in some of your styles, or in the document head in
+a STYLE tag (but put it <em>after</em> the place where the calendar styles were
+loaded):</p>
+<p>
+</p>
+<pre class=verbatim>.special { background-color: #000; color: #fff; }
+</pre><p></p>
+<p>
+And you would use the following code before calling <tt>Calendar.create()</tt>:</p>
+<p>
+</p>
+<pre class=verbatim>// this table holds your special days, so that we can automatize
+// things a bit:
+var SPECIAL_DAYS = {
+ 0 : [ 13, 24 ], // special days in January
+ 2 : [ 1, 6, 8, 12, 18 ], // special days in March
+ 8 : [ 21, 11 ], // special days in September
+ 11 : [ 25, 28 ] // special days in December
+};
+
+// this function returns true if the passed date is special
+function dateIsSpecial(year, month, day) {
+ var m = SPECIAL_DAYS[month];
+ if (!m) return false;
+ for (var i in m) if (m[i] == day) return true;
+ return false;
+}
+
+// this is the actual date status handler. Note that it receives the
+// date object as well as separate values of year, month and date, for
+// your confort.
+function dateStatusHandler(date, y, m, d) {
+ if (dateIsSpecial(y, m, d)) return ``special'';
+ else return false;
+ // return true above if you want to disable other dates
+}
+
+// configure it to the calendar
+calendar.setDateStatusHandler(dateStatusHandler);
+</pre><p></p>
+<p>
+The above code adds the ``special'' class name to some dates that are defined
+in the SPECIAL_DAYS table. Other dates will simply be displayed as default,
+enabled.</p>
+<p>
+</p>
+<a name="node_sec_5.3.9"></a>
+<h3><a href="#node_toc_node_sec_5.3.9">5.3.9 <tt>Calendar.show</tt></a></h3>
+<p></p>
+<p>
+Call this function do show the calendar. It basically sets the CSS ``display''
+property to ``block''. It doesn't modify the calendar position.</p>
+<p>
+This function only makes sense when the calendar is in popup mode.</p>
+<p>
+</p>
+<a name="node_sec_5.3.10"></a>
+<h3><a href="#node_toc_node_sec_5.3.10">5.3.10 <tt>Calendar.showAt</tt></a></h3>
+<p></p>
+<p>
+Call this to show the calendar at a certain (x, y) position. Prototype:</p>
+<p>
+</p>
+<pre class=verbatim>calendar.showAt(x, y);
+</pre><p></p>
+<p>
+The parameters are absolute coordinates relative to the top left
+corner <em>of the page</em>, thus they are <em>page</em> coordinates not screen
+coordinates.</p>
+<p>
+After setting the given coordinates it calls Calendar.show. This function only
+makes sense when the calendar is in popup mode.</p>
+<p>
+</p>
+<a name="node_sec_5.3.11"></a>
+<h3><a href="#node_toc_node_sec_5.3.11">5.3.11 <tt>Calendar.showAtElement</tt></a></h3>
+<p></p>
+<p>
+This function is useful if you want to display the calendar near some element.
+You call it like this:</p>
+<p>
+</p>
+<pre class=verbatim>calendar.showAtElement(element, align);
+</pre><p></p>
+<p>
+where element is a reference to your element (for instance it can be the input
+field that displays the date) and align is an optional parameter, of type string,
+containing one or two characters. For instance, if you pass <tt>"Br"</tt> as
+align, the calendar will appear <em>below</em> the element and with its right
+margin continuing the element's right margin.</p>
+<p>
+As stated above, align may contain one or two characters. The first character
+dictates the vertical alignment, relative to the element, and the second
+character dictates the horizontal alignment. If the second character is
+missing it will be assumed <tt>"l"</tt> (the left margin of the calendar will
+be at the same horizontal position as the left margin of the element).</p>
+<p>
+The characters given for the align parameters are case sensitive. This
+function only makes sense when the calendar is in popup mode. After computing
+the position it uses <tt>Calendar.showAt</tt> to display the calendar there.</p>
+<p>
+</p>
+<a name="node_sec_Temp_8"></a>
+<h4><a href="#node_toc_node_sec_Temp_8">Vertical alignment</a></h4>
+<p>The first character in ``<tt>align</tt>'' can take one of the following values:</p>
+<p>
+</p>
+<ul><p>
+</p>
+<li><p><tt>T</tt> -- completely above the reference element (bottom margin of
+the calendar aligned to the top margin of the element).</p>
+<p>
+</p>
+<li><p><tt>t</tt> -- above the element but may overlap it (bottom margin of the calendar aligned to
+the bottom margin of the element).</p>
+<p>
+</p>
+<li><p><tt>c</tt> -- the calendar displays vertically centered to the reference
+element. It might overlap it (that depends on the horizontal alignment).</p>
+<p>
+</p>
+<li><p><tt>b</tt> -- below the element but may overlap it (top margin of the calendar aligned to
+the top margin of the element).</p>
+<p>
+</p>
+<li><p><tt>B</tt> -- completely below the element (top margin of the calendar
+aligned to the bottom margin of the element).</p>
+<p>
+</p>
+</ul><p></p>
+<p>
+</p>
+<a name="node_sec_Temp_9"></a>
+<h4><a href="#node_toc_node_sec_Temp_9">Horizontal alignment</a></h4>
+<p>The second character in ``<tt>align</tt>'' can take one of the following values:</p>
+<p>
+</p>
+<ul><p>
+</p>
+<li><p><tt>L</tt> -- completely to the left of the reference element (right
+margin of the calendar aligned to the left margin of the element).</p>
+<p>
+</p>
+<li><p><tt>l</tt> -- to the left of the element but may overlap it (left margin
+of the calendar aligned to the left margin of the element).</p>
+<p>
+</p>
+<li><p><tt>c</tt> -- horizontally centered to the element. Might overlap it,
+depending on the vertical alignment.</p>
+<p>
+</p>
+<li><p><tt>r</tt> -- to the right of the element but may overlap it (right
+margin of the calendar aligned to the right margin of the element).</p>
+<p>
+</p>
+<li><p><tt>R</tt> -- completely to the right of the element (left margin of the
+calendar aligned to the right margin of the element).</p>
+<p>
+</p>
+</ul><p></p>
+<p>
+</p>
+<a name="node_sec_Temp_10"></a>
+<h4><a href="#node_toc_node_sec_Temp_10">Default values</a></h4>
+<p>If the ``<tt>align</tt>'' parameter is missing the calendar will choose
+``<tt>Br</tt>''.</p>
+<p>
+</p>
+<a name="node_sec_5.3.12"></a>
+<h3><a href="#node_toc_node_sec_5.3.12">5.3.12 <tt>Calendar.setDate</tt></a></h3>
+<p></p>
+<p>
+Receives a JavaScript <tt>Date</tt> object. Sets the given date in the
+calendar. If the calendar is visible the new date is displayed immediately.</p>
+<p>
+</p>
+<pre class=verbatim>calendar.setDate(new Date()); // go today
+</pre><p></p>
+<p>
+</p>
+<a name="node_sec_5.3.13"></a>
+<h3><a href="#node_toc_node_sec_5.3.13">5.3.13 <tt>Calendar.setFirstDayOfWeek</tt></a></h3>
+<p></p>
+<p>
+Changes the first day of week. The parameter has to be a numeric value ranging
+from 0 to 6. Pass 0 for Sunday, 1 for Monday, ..., 6 for Saturday.</p>
+<p>
+</p>
+<pre class=verbatim>calendar.setFirstDayOfWeek(5); // start weeks on Friday
+</pre><p></p>
+<p>
+</p>
+<a name="node_sec_5.3.14"></a>
+<h3><a href="#node_toc_node_sec_5.3.14">5.3.14 <tt>Calendar.parseDate</tt></a></h3>
+<p></p>
+<p>
+Use this function to parse a date given as string and to move the calendar to
+that date.</p>
+<p>
+The algorithm tries to parse the date according to the format that was
+previously set with <tt>Calendar.setDateFormat</tt>; if that fails, it still
+tries to get some valid date out of it (it doesn't read your thoughts, though).</p>
+<p>
+</p>
+<pre class=verbatim>calendar.parseDate("2003/07/06");
+</pre><p></p>
+<p>
+</p>
+<a name="node_sec_5.3.15"></a>
+<h3><a href="#node_toc_node_sec_5.3.15">5.3.15 <tt>Calendar.setRange</tt></a></h3>
+<p></p>
+<p>
+Sets the range of years that are allowed in the calendar. Synopsis:</p>
+<p>
+</p>
+<pre class=verbatim>calendar.setRange(1970, 2050);
+</pre><p></p>
+<p>
+</p>
+<a name="node_sec_6"></a>
+<h1><a href="#node_toc_node_sec_6">6 Side effects</a></h1>
+<p>The calendar code was intentionally embedded in an object to make it have as
+less as possible side effects. However, there are some -- not harmful, after
+all. Here is a list of side effects; you can count they already happened after
+<tt>calendar.js</tt> was loaded.</p>
+<p>
+</p>
+<ol><p>
+</p>
+<li><p>The global variable <tt>window.calendar</tt> will be set to null. This
+variable is used by the calendar code, especially when doing drag & drop for
+moving the calendar. In the future I might get rid of it, but for now it
+didn't harm anyone.</p>
+<p>
+</p>
+<li><p>The JavaScript <tt>Date</tt> object is modified. We add some properties
+and functions that are very useful to our calendar. It made more sense to add
+them directly to the <tt>Date</tt> object than to the calendar itself.
+Complete list:</p>
+<p>
+</p>
+<ol><p>
+</p>
+<li><p><tt>Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31);</tt>
+</p>
+<li><p><tt>Date.SECOND = 1000 /* milliseconds */;</tt>
+</p>
+<li><p><tt>Date.MINUTE = 60 * Date.SECOND;</tt>
+</p>
+<li><p><tt>Date.HOUR = 60 * Date.MINUTE;</tt>
+</p>
+<li><p><tt>Date.DAY = 24 * Date.HOUR;</tt>
+</p>
+<li><p><tt>Date.WEEK = 7 * Date.DAY;</tt></p>
+<p>
+</p>
+<li><p><tt>Date.prototype.getMonthDays</tt>(month) -- returns the number of days
+of the given month, or of the current date object if no month was given.</p>
+<p>
+</p>
+<li><p><tt>Date.prototype.getWeekNumber</tt>() -- returns the week number of the
+date in the current object.</p>
+<p>
+</p>
+<li><p><tt>Date.prototype.equalsTo</tt>(other_date) -- compare the current date
+object with <tt>other_date</tt> and returns <tt>true</tt> if the dates are
+equal. <em>It ignores time</em>.</p>
+<p>
+</p>
+<li><p><tt>Date.prototype.print</tt>(format) -- returns a string with the
+current date object represented in the given format. It implements the format
+specified in section <a href="#node_sec_5.3.5">5.3.5</a>.</p>
+<p>
+</p>
+</ol><p></p>
+<p>
+</p>
+</ol><p></p>
+<p>
+</p>
+<a name="node_sec_7"></a>
+<h1><a href="#node_toc_node_sec_7">7 Credits</a></h1>
+<p>The following people either sponsored, donated money to the project or bought
+commercial licenses (listed in reverse chronological order). Your name could
+be here too! If you wish to sponsor the project (for instance request a
+feature and pay me for implementing it) or donate some money please
+<em>please</em> contact me at <tt><a href="mailto:mihai\_bazon at yahoo.com">mihai_bazon at yahoo.com</a></tt>.</p>
+<p>
+</p>
+<ul><p>
+</p>
+<li><p>Sunny Chowdhury (<a href="http://www.ex3.com">www.ex3.com</a>)</p>
+<p>
+</p>
+<li><p>Ian Barrack (<a href="http://www.simban.com">www.simban.com</a>)</p>
+<p>
+</p>
+<li><p>Himanshukumar Shah</p>
+<p>
+</p>
+<li><p>Seyhan Ersoy (<a href="http://www.oocgi.com">www.oocgi.com</a>)</p>
+<p>
+</p>
+<li><p>Jon Stokkeland (<a href="http://www.sauen.com">www.sauen.com</a>)</p>
+<p>
+</p>
+</ul><p></p>
+<p>
+</p>
+<div align=right><table><tr><td>
+
+<b>Thank you!</b><br>
+ -- <tt>mihai_bazon at yahoo.com</tt>
+</td></tr></table></div>
+<p>
+</p>
+<div class=footnoterule><hr></div><p></p>
+<div class=footnote><p><a name="footnote_Temp_2"></a><a href="#call_footnote_Temp_2"><sup><small>1</small></sup></a>
+by the term ``widget'' I understand a single element of user interface.
+But that's in Linux world. For those that did lots of Windows
+programming the term ``control'' might be more familiar
+</p>
+<p><a name="footnote_Temp_3"></a><a href="#call_footnote_Temp_3"><sup><small>2</small></sup></a> people report that the calendar does
+not work with IE5/Mac. However, this browser was discontinued and we
+believe that supporting it doesn't worth the efforts, given the fact that
+it has the worst, buggiest implementation for DOM I've ever seen.</p>
+<p><a name="footnote_Temp_4"></a><a href="#call_footnote_Temp_4"><sup><small>3</small></sup></a> under Opera 7 the calendar still lacks some functionality, such as
+keyboard navigation; also Opera doesn't seem to allow disabling text
+selection when one drags the mouse on the page; despite all that, the
+calendar is still highly functional under Opera 7 and looks as good as
+in other supported browsers. </p>
+<p><a name="footnote_Temp_5"></a><a href="#call_footnote_Temp_5"><sup><small>4</small></sup></a> user interface</p>
+</div>
+<div align=right class=colophon>
+<i>Last modified: Saturday, March 5th, 2005<br>
+HTML conversion by <a href="http://www.ccs.neu.edu/~dorai/tex2page/tex2page-doc.html">TeX2page 2004-09-11</a></i>
+</div>
+</body>
+</html>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/html/reference.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/doc/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/img.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/img.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,330 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<!-- $Id$ -->
+
+<head>
+<meta http-equiv="content-type" content="text/xml; charset=utf-8" />
+<title>The Coolest DHTML Calendar - Online Demo</title>
+<link rel="stylesheet" type="text/css" media="all" href="skins/aqua/theme.css" title="Aqua" />
+<link rel="alternate stylesheet" type="text/css" media="all" href="calendar-blue.css" title="winter" />
+<link rel="alternate stylesheet" type="text/css" media="all" href="calendar-blue2.css" title="blue" />
+<link rel="alternate stylesheet" type="text/css" media="all" href="calendar-brown.css" title="summer" />
+<link rel="alternate stylesheet" type="text/css" media="all" href="calendar-green.css" title="green" />
+<link rel="alternate stylesheet" type="text/css" media="all" href="calendar-win2k-1.css" title="win2k-1" />
+<link rel="alternate stylesheet" type="text/css" media="all" href="calendar-win2k-2.css" title="win2k-2" />
+<link rel="alternate stylesheet" type="text/css" media="all" href="calendar-win2k-cold-1.css" title="win2k-cold-1" />
+<link rel="alternate stylesheet" type="text/css" media="all" href="calendar-win2k-cold-2.css" title="win2k-cold-2" />
+<link rel="alternate stylesheet" type="text/css" media="all" href="calendar-system.css" title="system" />
+
+<!-- import the calendar script -->
+<script type="text/javascript" src="calendar.js"></script>
+
+<!-- import the language module -->
+<script type="text/javascript" src="lang/calendar-en.js"></script>
+
+<!-- other languages might be available in the lang directory; please check
+your distribution archive. -->
+
+<!-- helper script that uses the calendar -->
+<script type="text/javascript">
+
+var oldLink = null;
+// code to change the active stylesheet
+function setActiveStyleSheet(link, title) {
+ var i, a, main;
+ for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
+ if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
+ a.disabled = true;
+ if(a.getAttribute("title") == title) a.disabled = false;
+ }
+ }
+ if (oldLink) oldLink.style.fontWeight = 'normal';
+ oldLink = link;
+ link.style.fontWeight = 'bold';
+ return false;
+}
+
+// This function gets called when the end-user clicks on some date.
+function selected(cal, date) {
+ cal.sel.value = date; // just update the date in the input field.
+ if (cal.dateClicked && (cal.sel.id == "sel1" || cal.sel.id == "sel3"))
+ // if we add this call we close the calendar on single-click.
+ // just to exemplify both cases, we are using this only for the 1st
+ // and the 3rd field, while 2nd and 4th will still require double-click.
+ cal.callCloseHandler();
+}
+
+// And this gets called when the end-user clicks on the _selected_ date,
+// or clicks on the "Close" button. It just hides the calendar without
+// destroying it.
+function closeHandler(cal) {
+ cal.hide(); // hide the calendar
+// cal.destroy();
+ _dynarch_popupCalendar = null;
+}
+
+// This function shows the calendar under the element having the given id.
+// It takes care of catching "mousedown" signals on document and hiding the
+// calendar if the click was outside.
+function showCalendar(id, format, showsTime, showsOtherMonths) {
+ var el = document.getElementById(id);
+ if (_dynarch_popupCalendar != null) {
+ // we already have some calendar created
+ _dynarch_popupCalendar.hide(); // so we hide it first.
+ } else {
+ // first-time call, create the calendar.
+ var cal = new Calendar(1, null, selected, closeHandler);
+ // uncomment the following line to hide the week numbers
+ // cal.weekNumbers = false;
+ if (typeof showsTime == "string") {
+ cal.showsTime = true;
+ cal.time24 = (showsTime == "24");
+ }
+ if (showsOtherMonths) {
+ cal.showsOtherMonths = true;
+ }
+ _dynarch_popupCalendar = cal; // remember it in the global var
+ cal.setRange(1900, 2070); // min/max year allowed.
+ cal.create();
+ }
+ _dynarch_popupCalendar.setDateFormat(format); // set the specified date format
+ _dynarch_popupCalendar.parseDate(el.value); // try to parse the text in field
+ _dynarch_popupCalendar.sel = el; // inform it what input field we use
+
+ // the reference element that we pass to showAtElement is the button that
+ // triggers the calendar. In this example we align the calendar bottom-right
+ // to the button.
+ _dynarch_popupCalendar.showAtElement(el.nextSibling, "Br"); // show the calendar
+
+ return false;
+}
+
+var MINUTE = 60 * 1000;
+var HOUR = 60 * MINUTE;
+var DAY = 24 * HOUR;
+var WEEK = 7 * DAY;
+
+// If this handler returns true then the "date" given as
+// parameter will be disabled. In this example we enable
+// only days within a range of 10 days from the current
+// date.
+// You can use the functions date.getFullYear() -- returns the year
+// as 4 digit number, date.getMonth() -- returns the month as 0..11,
+// and date.getDate() -- returns the date of the month as 1..31, to
+// make heavy calculations here. However, beware that this function
+// should be very fast, as it is called for each day in a month when
+// the calendar is (re)constructed.
+function isDisabled(date) {
+ var today = new Date();
+ return (Math.abs(date.getTime() - today.getTime()) / DAY) > 10;
+}
+
+function flatSelected(cal, date) {
+ var el = document.getElementById("preview");
+ el.innerHTML = date;
+}
+
+function showFlatCalendar() {
+ var parent = document.getElementById("display");
+
+ // construct a calendar giving only the "selected" handler.
+ var cal = new Calendar(0, null, flatSelected);
+
+ // hide week numbers
+ cal.weekNumbers = false;
+
+ // We want some dates to be disabled; see function isDisabled above
+ cal.setDisabledHandler(isDisabled);
+ cal.setDateFormat("%A, %B %e");
+
+ // this call must be the last as it might use data initialized above; if
+ // we specify a parent, as opposite to the "showCalendar" function above,
+ // then we create a flat calendar -- not popup. Hidden, though, but...
+ cal.create(parent);
+
+ // ... we can show it here.
+ cal.show();
+}
+</script>
+
+<style type="text/css">
+.ex { font-weight: bold; background: #fed; color: #080 }
+.help { color: #080; font-style: italic; }
+body { background: #fea; font: 10pt tahoma,verdana,sans-serif; }
+table { font: 13px verdana,tahoma,sans-serif; }
+a { color: #00f; }
+a:visited { color: #00f; }
+a:hover { color: #f00; background: #fefaf0; }
+a:active { color: #08f; }
+.key { border: 1px solid #000; background: #fff; color: #008;
+padding: 0px 5px; cursor: default; font-size: 80%; }
+</style>
+
+</head>
+<body onload="showFlatCalendar()">
+
+<h2><a href="http://www.dynarch.com/projects/calendar/"
+title="Visit the project website">jscalendar</a>-1.0
+"It is happening again"</h2>
+
+<p>
+<div style="float: right; border: 1px solid #b87; padding: 2px; font-size: 90%; background: #ffb;">
+Theme:<br />
+<a href="#" id="defaultTheme" onclick="return setActiveStyleSheet(this, 'Aqua');">Aqua</a>
+|
+<a href="#" onclick="return setActiveStyleSheet(this, 'winter');">winter</a>
+|
+<a href="#" onclick="return setActiveStyleSheet(this, 'blue');">blue</a>
+|
+<a href="#" onclick="return setActiveStyleSheet(this, 'summer');">summer</a>
+|
+<a href="#" onclick="return setActiveStyleSheet(this, 'green');">green</a>
+<br />
+<a href="#" onclick="return setActiveStyleSheet(this, 'win2k-1');">win2k-1</a>
+|
+<a href="#" onclick="return setActiveStyleSheet(this, 'win2k-2');">win2k-2</a>
+|
+<a href="#" onclick="return setActiveStyleSheet(this, 'win2k-cold-1');">win2k-cold-1</a>
+|
+<a href="#" onclick="return setActiveStyleSheet(this, 'win2k-cold-2');">win2k-cold-2</a>
+<br />
+<a href="#" onclick="return setActiveStyleSheet(this, 'system');">system</a>
+<script type="text/javascript">
+setActiveStyleSheet(document.getElementById("defaultTheme"), "Aqua");
+</script>
+</div>
+<a href="release-notes.html">Release notes</a>.
+<br />
+Set it up in minutes:
+ <a href="simple-1.html">popup calendar</a>,
+ <a href="simple-2.html">flat calendar</a>.
+Other samples:
+ <a href="simple-3.html">special days</a>,
+ <a href="dayinfo.html">day info</a>,
+ <a href="multiple-dates.html">multiple dates selection</a>
+<br />
+Documentation:
+ <a href="doc/html/reference.html">HTML</a>,
+ <a href="doc/reference.pdf">PDF</a>.
+<br />
+</p>
+
+<div style="padding-left:20px; font-size: 90%; font-style: italic;">
+
+</div>
+
+<table style="width: 100%">
+<tr valign="top">
+<td style="background: #ffa; padding: 5px; border: 1px solid #995;">
+
+<form action="#">
+<div style="background: #995; color: #ffa; font-weight: bold; padding: 2px;">
+Popup examples
+</div>
+
+<br />
+
+<b>Date #1:</b> <input type="text" name="date1" id="sel1" size="30"
+><input type="reset" value=" ... "
+onclick="return showCalendar('sel1', '%Y-%m-%d [%W] %H:%M', '24', true);"> %Y-%m-%d [%W] %H:%M -- single
+click<br />
+
+<b>Date #2:</b> <input type="text" name="date2" id="sel2" size="30"
+><input type="reset" value=" ... "
+onclick="return showCalendar('sel2', '%a, %b %e, %Y [%I:%M %p]', '12');"> %a, %b %e, %Y [%I:%M %p]
+-- double click
+
+<br /><br />
+<!--
+if you remove this comment and leave the following HTML code
+you will see a horrible effect, in all supported browsers (IE and Mozilla).
+-->
+<SELECT multiple size="4" name="component-select">
+ <OPTION selected value="Component_1_a">Component_1</OPTION>
+ <OPTION selected value="Component_1_b">Component_2</OPTION>
+ <OPTION>Component_3</OPTION>
+ <OPTION>Component_4</OPTION>
+ <OPTION>Component_5</OPTION>
+ <OPTION>Component_6</OPTION>
+ <OPTION>Component_7</OPTION>
+</SELECT>
+this select should hide when the calendar is above it.
+<br /><br />
+
+<b>Date #3:</b> <input type="text" name="date3" id="sel3" size="30"
+><input type="reset" value=" ... "
+onclick="return showCalendar('sel3', '%d/%m/%Y');"> %d/%m/%Y
+-- single click
+<br />
+
+<b>Date #4:</b> <input type="text" name="date4" id="sel4" size="30"
+><input type="reset" value=" ... "
+onclick="return showCalendar('sel4', '%A, %B %e, %Y');"> %A, %B %e, %Y --
+double click
+
+</form>
+
+<p>This is release <b>1.0</b>. Works on MSIE/Win 5.0 or better (really),
+Opera 7+, Mozilla, Firefox, Netscape 6.x, 7.0 and all other Gecko-s,
+Konqueror and Safari.</p>
+
+<h4>Keyboard navigation</h4>
+
+<p>Starting with version 0.9.2, you can also use the keyboard to select
+dates (only for popup calendars; does <em>not</em> work with Opera
+7 or Konqueror/Safari). The following keys are available:</p>
+
+<ul>
+
+ <li><span class="key">←</span> , <span class="key">→</span> ,
+ <span class="key">↑</span> , <span class="key">↓</span> -- select date</li>
+ <li><span class="key">CTRL</span> + <span class="key">←</span> ,
+ <span class="key">→</span> -- select month</li>
+ <li><span class="key">CTRL</span> + <span class="key">↑</span> ,
+ <span class="key">↓</span> -- select year</li>
+ <li><span class="key">SPACE</span> -- go to <em>today</em> date</li>
+ <li><span class="key">ENTER</span> -- accept the currently selected date</li>
+ <li><span class="key">ESC</span> -- cancel selection</li>
+
+</ul>
+
+ </td>
+
+ <td style="padding: 5px; margin: 5px; border: 1px solid #984; background: #ed9; width: 19em;">
+
+ <div style="background: #984; color: #fea; font-weight: bold; padding: 2px; text-align: center">
+ Flat calendar
+ </div>
+
+ <p style="width: 12em"><small>A non-popup version will appear below as soon
+ as the page is loaded. Note that it doesn't show the week number.</small></p>
+
+ <!-- the calendar will be inserted here -->
+ <div id="display" style="float: right; clear: both;"></div>
+ <div id="preview" style="font-size: 80%; text-align: center; padding: 2px"> </div>
+
+ <p style="clear: both;"><small>
+ The example above uses the <code>setDisabledHandler()</code> member function
+ to setup a handler that would only enable days withing a range of 10 days,
+ forward or backward, from the current date.
+ </small></p>
+
+ </div>
+
+ </td>
+
+ </tr>
+ </table>
+
+<hr /><address>
+© <a href="http://www.dynarch.com/">dynarch.com</a> 2002-2005 <br />
+Author: <a href="http://www.bazon.net/mishoo/">Mihai
+Bazon</a><br /> Distributed under the <a
+href="http://www.gnu.org/licenses/lgpl.html">GNU LGPL</a>.</address>
+
+<p style="font-size: smaller">If you use this script on a public page we
+would love it if you would <a href="http://www.dynarch.com/contact.html">let us
+know</a>.</p>
+
+</body></html>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-af.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-af.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-af.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,39 @@
+// ** I18N Afrikaans
+Calendar._DN = new Array
+("Sondag",
+ "Maandag",
+ "Dinsdag",
+ "Woensdag",
+ "Donderdag",
+ "Vrydag",
+ "Saterdag",
+ "Sondag");
+Calendar._MN = new Array
+("Januarie",
+ "Februarie",
+ "Maart",
+ "April",
+ "Mei",
+ "Junie",
+ "Julie",
+ "Augustus",
+ "September",
+ "Oktober",
+ "November",
+ "Desember");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Verander eerste dag van die week";
+Calendar._TT["PREV_YEAR"] = "Vorige jaar (hou vir keuselys)";
+Calendar._TT["PREV_MONTH"] = "Vorige maand (hou vir keuselys)";
+Calendar._TT["GO_TODAY"] = "Gaan na vandag";
+Calendar._TT["NEXT_MONTH"] = "Volgende maand (hou vir keuselys)";
+Calendar._TT["NEXT_YEAR"] = "Volgende jaar (hou vir keuselys)";
+Calendar._TT["SEL_DATE"] = "Kies datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Sleep om te skuif";
+Calendar._TT["PART_TODAY"] = " (vandag)";
+Calendar._TT["MON_FIRST"] = "Vertoon Maandag eerste";
+Calendar._TT["SUN_FIRST"] = "Display Sunday first";
+Calendar._TT["CLOSE"] = "Close";
+Calendar._TT["TODAY"] = "Today";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-al.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-al.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-al.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,101 @@
+// Calendar ALBANIAN language
+//author Rigels Gordani rige at hotmail.com
+
+// ditet
+Calendar._DN = new Array
+("E Diele",
+"E Hene",
+"E Marte",
+"E Merkure",
+"E Enjte",
+"E Premte",
+"E Shtune",
+"E Diele");
+
+//ditet shkurt
+Calendar._SDN = new Array
+("Die",
+"Hen",
+"Mar",
+"Mer",
+"Enj",
+"Pre",
+"Sht",
+"Die");
+
+// muajt
+Calendar._MN = new Array
+("Janar",
+"Shkurt",
+"Mars",
+"Prill",
+"Maj",
+"Qeshor",
+"Korrik",
+"Gusht",
+"Shtator",
+"Tetor",
+"Nentor",
+"Dhjetor");
+
+// muajte shkurt
+Calendar._SMN = new Array
+("Jan",
+"Shk",
+"Mar",
+"Pri",
+"Maj",
+"Qes",
+"Kor",
+"Gus",
+"Sht",
+"Tet",
+"Nen",
+"Dhj");
+
+// ndihmesa
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Per kalendarin";
+
+Calendar._TT["ABOUT"] =
+"Zgjedhes i ores/dates ne DHTML \n" +
+"\n\n" +"Zgjedhja e Dates:\n" +
+"- Perdor butonat \xab, \xbb per te zgjedhur vitin\n" +
+"- Perdor butonat" + String.fromCharCode(0x2039) + ", " +
+String.fromCharCode(0x203a) +
+" per te zgjedhur muajin\n" +
+"- Mbani shtypur butonin e mousit per nje zgjedje me te shpejte.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Zgjedhja e kohes:\n" +
+"- Kliko tek ndonje nga pjeset e ores per ta rritur ate\n" +
+"- ose kliko me Shift per ta zvogeluar ate\n" +
+"- ose cliko dhe terhiq per zgjedhje me te shpejte.";
+
+Calendar._TT["PREV_YEAR"] = "Viti i shkuar (prit per menune)";
+Calendar._TT["PREV_MONTH"] = "Muaji i shkuar (prit per menune)";
+Calendar._TT["GO_TODAY"] = "Sot";
+Calendar._TT["NEXT_MONTH"] = "Muaji i ardhshem (prit per menune)";
+Calendar._TT["NEXT_YEAR"] = "Viti i ardhshem (prit per menune)";
+Calendar._TT["SEL_DATE"] = "Zgjidh daten";
+Calendar._TT["DRAG_TO_MOVE"] = "Terhiqe per te levizur";
+Calendar._TT["PART_TODAY"] = " (sot)";
+
+// "%s" eshte dita e pare e javes
+// %s do te zevendesohet me emrin e dite
+Calendar._TT["DAY_FIRST"] = "Trego te %s te paren";
+
+
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Mbyll";
+Calendar._TT["TODAY"] = "Sot";
+Calendar._TT["TIME_PART"] = "Kliko me (Shift-)ose terhiqe per te ndryshuar
+vleren";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "Java";
+Calendar._TT["TIME"] = "Koha:";
+
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-bg.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-bg.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-bg.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,124 @@
+// ** I18N
+
+// Calendar BG language
+// Author: Mihai Bazon, <mihai_bazon at yahoo.com>
+// Translator: Valentin Sheiretsky, <valio at valio.eu.org>
+// Encoding: Windows-1251
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Íåäåëÿ",
+ "Ïîíåäåëíèê",
+ "Âòîðíèê",
+ "Ñðÿäà",
+ "×åòâúðòúê",
+ "Ïåòúê",
+ "Ñúáîòà",
+ "Íåäåëÿ");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Íåä",
+ "Ïîí",
+ "Âòî",
+ "Ñðÿ",
+ "×åò",
+ "Ïåò",
+ "Ñúá",
+ "Íåä");
+
+// full month names
+Calendar._MN = new Array
+("ßíóàðè",
+ "Ôåâðóàðè",
+ "Ìàðò",
+ "Àïðèë",
+ "Ìàé",
+ "Þíè",
+ "Þëè",
+ "Àâãóñò",
+ "Ñåïòåìâðè",
+ "Îêòîìâðè",
+ "Íîåìâðè",
+ "Äåêåìâðè");
+
+// short month names
+Calendar._SMN = new Array
+("ßíó",
+ "Ôåâ",
+ "Ìàð",
+ "Àïð",
+ "Ìàé",
+ "Þíè",
+ "Þëè",
+ "Àâã",
+ "Ñåï",
+ "Îêò",
+ "Íîå",
+ "Äåê");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Èíôîðìàöèÿ çà êàëåíäàðà";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Date selection:\n" +
+"- Use the \xab, \xbb buttons to select year\n" +
+"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
+"- Hold mouse button on any of the above buttons for faster selection.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Time selection:\n" +
+"- Click on any of the time parts to increase it\n" +
+"- or Shift-click to decrease it\n" +
+"- or click and drag for faster selection.";
+
+Calendar._TT["PREV_YEAR"] = "Ïðåäíà ãîäèíà (çàäðúæòå çà ìåíþ)";
+Calendar._TT["PREV_MONTH"] = "Ïðåäåí ìåñåö (çàäðúæòå çà ìåíþ)";
+Calendar._TT["GO_TODAY"] = "Èçáåðåòå äíåñ";
+Calendar._TT["NEXT_MONTH"] = "Ñëåäâàù ìåñåö (çàäðúæòå çà ìåíþ)";
+Calendar._TT["NEXT_YEAR"] = "Ñëåäâàùà ãîäèíà (çàäðúæòå çà ìåíþ)";
+Calendar._TT["SEL_DATE"] = "Èçáåðåòå äàòà";
+Calendar._TT["DRAG_TO_MOVE"] = "Ïðåìåñòâàíå";
+Calendar._TT["PART_TODAY"] = " (äíåñ)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "%s êàòî ïúðâè äåí";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Çàòâîðåòå";
+Calendar._TT["TODAY"] = "Äíåñ";
+Calendar._TT["TIME_PART"] = "(Shift-)Click èëè drag çà äà ïðîìåíèòå ñòîéíîñòòà";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%A - %e %B %Y";
+
+Calendar._TT["WK"] = "Ñåäì";
+Calendar._TT["TIME"] = "×àñ:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-big5-utf8.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-big5-utf8.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-big5-utf8.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,123 @@
+// ** I18N
+
+// Calendar big5-utf8 language
+// Author: Gary Fu, <gary at garyfu.idv.tw>
+// Encoding: utf8
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("æææ¥",
+ "ææä¸",
+ "ææäº",
+ "ææä¸",
+ "ææå",
+ "ææäº",
+ "ææå
",
+ "æææ¥");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("æ¥",
+ "ä¸",
+ "äº",
+ "ä¸",
+ "å",
+ "äº",
+ "å
",
+ "æ¥");
+
+// full month names
+Calendar._MN = new Array
+("䏿",
+ "äºæ",
+ "䏿",
+ "åæ",
+ "äºæ",
+ "å
æ",
+ "䏿",
+ "å
«æ",
+ "乿",
+ "åæ",
+ "å䏿",
+ "åäºæ");
+
+// short month names
+Calendar._SMN = new Array
+("䏿",
+ "äºæ",
+ "䏿",
+ "åæ",
+ "äºæ",
+ "å
æ",
+ "䏿",
+ "å
«æ",
+ "乿",
+ "åæ",
+ "å䏿",
+ "åäºæ");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "éæ¼";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"æ¥æé¸ææ¹æ³:\n" +
+"- ä½¿ç¨ \xab, \xbb æéå¯é¸æå¹´ä»½\n" +
+"- ä½¿ç¨ " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " æéå¯é¸ææä»½\n" +
+"- æä½ä¸é¢çæéå¯ä»¥å å¿«é¸å";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"æéé¸ææ¹æ³:\n" +
+"- 黿任ä½çæéé¨ä»½å¯å¢å å
¶å¼\n" +
+"- åææShiftéµå黿坿¸å°å
¶å¼\n" +
+"- é»æä¸¦ææ³å¯å å¿«æ¹è®çå¼";
+
+Calendar._TT["PREV_YEAR"] = "ä¸ä¸å¹´ (æä½é¸å®)";
+Calendar._TT["PREV_MONTH"] = "ä¸ä¸å¹´ (æä½é¸å®)";
+Calendar._TT["GO_TODAY"] = "å°ä»æ¥";
+Calendar._TT["NEXT_MONTH"] = "ä¸ä¸æ (æä½é¸å®)";
+Calendar._TT["NEXT_YEAR"] = "ä¸ä¸æ (æä½é¸å®)";
+Calendar._TT["SEL_DATE"] = "é¸ææ¥æ";
+Calendar._TT["DRAG_TO_MOVE"] = "ææ³";
+Calendar._TT["PART_TODAY"] = " (仿¥)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "å° %s 顯示å¨å";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "éé";
+Calendar._TT["TODAY"] = "仿¥";
+Calendar._TT["TIME_PART"] = "黿orææ³å¯æ¹è®æé(åææShiftçºæ¸)";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "é±";
+Calendar._TT["TIME"] = "Time:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-br.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-br.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-br.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,108 @@
+// ** I18N
+
+// Calendar pt-BR language
+// Author: Fernando Dourado, <fernando.dourado at ig.com.br>
+// Encoding: any
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Domingo",
+ "Segunda",
+ "Terça",
+ "Quarta",
+ "Quinta",
+ "Sexta",
+ "Sabádo",
+ "Domingo");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+// [No changes using default values]
+
+// full month names
+Calendar._MN = new Array
+("Janeiro",
+ "Fevereiro",
+ "Março",
+ "Abril",
+ "Maio",
+ "Junho",
+ "Julho",
+ "Agosto",
+ "Setembro",
+ "Outubro",
+ "Novembro",
+ "Dezembro");
+
+// short month names
+// [No changes using default values]
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Sobre o calendário";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Translate to portuguese Brazil (pt-BR) by Fernando Dourado (fernando.dourado at ig.com.br)\n" +
+"Tradução para o português Brasil (pt-BR) por Fernando Dourado (fernando.dourado at ig.com.br)" +
+"\n\n" +
+"Selecionar data:\n" +
+"- Use as teclas \xab, \xbb para selecionar o ano\n" +
+"- Use as teclas " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para selecionar o mês\n" +
+"- Clique e segure com o mouse em qualquer botão para selecionar rapidamente.";
+
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Selecionar hora:\n" +
+"- Clique em qualquer uma das partes da hora para aumentar\n" +
+"- ou Shift-clique para diminuir\n" +
+"- ou clique e arraste para selecionar rapidamente.";
+
+Calendar._TT["PREV_YEAR"] = "Ano anterior (clique e segure para menu)";
+Calendar._TT["PREV_MONTH"] = "Mês anterior (clique e segure para menu)";
+Calendar._TT["GO_TODAY"] = "Ir para a data atual";
+Calendar._TT["NEXT_MONTH"] = "Próximo mês (clique e segure para menu)";
+Calendar._TT["NEXT_YEAR"] = "Próximo ano (clique e segure para menu)";
+Calendar._TT["SEL_DATE"] = "Selecione uma data";
+Calendar._TT["DRAG_TO_MOVE"] = "Clique e segure para mover";
+Calendar._TT["PART_TODAY"] = " (hoje)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "Exibir %s primeiro";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Fechar";
+Calendar._TT["TODAY"] = "Hoje";
+Calendar._TT["TIME_PART"] = "(Shift-)Clique ou arraste para mudar o valor";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%d de %B de %Y";
+
+Calendar._TT["WK"] = "sem";
+Calendar._TT["TIME"] = "Hora:";
+
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ca.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ca.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ca.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,123 @@
+// ** I18N
+
+// Calendar CA language
+// Author: Mihai Bazon, <mihai_bazon at yahoo.com>
+// Encoding: any
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Diumenge",
+ "Dilluns",
+ "Dimarts",
+ "Dimecres",
+ "Dijous",
+ "Divendres",
+ "Dissabte",
+ "Diumenge");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Diu",
+ "Dil",
+ "Dmt",
+ "Dmc",
+ "Dij",
+ "Div",
+ "Dis",
+ "Diu");
+
+// full month names
+Calendar._MN = new Array
+("Gener",
+ "Febrer",
+ "Març",
+ "Abril",
+ "Maig",
+ "Juny",
+ "Juliol",
+ "Agost",
+ "Setembre",
+ "Octubre",
+ "Novembre",
+ "Desembre");
+
+// short month names
+Calendar._SMN = new Array
+("Gen",
+ "Feb",
+ "Mar",
+ "Abr",
+ "Mai",
+ "Jun",
+ "Jul",
+ "Ago",
+ "Set",
+ "Oct",
+ "Nov",
+ "Des");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Sobre el calendari";
+
+Calendar._TT["ABOUT"] =
+"DHTML Selector de Data/Hora\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Sel.lecció de Dates:\n" +
+"- Fes servir els botons \xab, \xbb per sel.leccionar l'any\n" +
+"- Fes servir els botons " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " per se.lecciconar el mes\n" +
+"- Manté el ratolí apretat en qualsevol dels anteriors per sel.lecció ràpida.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Time selection:\n" +
+"- claca en qualsevol de les parts de la hora per augmentar-les\n" +
+"- o Shift-click per decrementar-la\n" +
+"- or click and arrastra per sel.lecció ràpida.";
+
+Calendar._TT["PREV_YEAR"] = "Any anterior (Mantenir per menu)";
+Calendar._TT["PREV_MONTH"] = "Mes anterior (Mantenir per menu)";
+Calendar._TT["GO_TODAY"] = "Anar a avui";
+Calendar._TT["NEXT_MONTH"] = "Mes següent (Mantenir per menu)";
+Calendar._TT["NEXT_YEAR"] = "Any següent (Mantenir per menu)";
+Calendar._TT["SEL_DATE"] = "Sel.leccionar data";
+Calendar._TT["DRAG_TO_MOVE"] = "Arrastrar per moure";
+Calendar._TT["PART_TODAY"] = " (avui)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "Mostra %s primer";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Tanca";
+Calendar._TT["TODAY"] = "Avui";
+Calendar._TT["TIME_PART"] = "(Shift-)Click a arrastra per canviar el valor";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "st";
+Calendar._TT["TIME"] = "Hora:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-cs-utf8.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-cs-utf8.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-cs-utf8.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,65 @@
+/*
+ calendar-cs-win.js
+ language: Czech
+ encoding: windows-1250
+ author: Lubos Jerabek (xnet at seznam.cz)
+ Jan Uhlir (espinosa at centrum.cz)
+*/
+
+// ** I18N
+Calendar._DN = new Array('NedÄle','PondÄlÃ','Ãterý','StÅeda','Ätvrtek','Pátek','Sobota','NedÄle');
+Calendar._SDN = new Array('Ne','Po','Ãt','St','Ät','Pá','So','Ne');
+Calendar._MN = new Array('Leden','Ãnor','BÅezen','Duben','KvÄten','Äerven','Äervenec','Srpen','ZáÅÃ','ÅÃjen','Listopad','Prosinec');
+Calendar._SMN = new Array('Led','Ãno','BÅe','Dub','KvÄ','Ärv','Ävc','Srp','ZáÅ','ÅÃj','Lis','Pro');
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "O komponentÄ kalendáÅ";
+Calendar._TT["TOGGLE"] = "ZmÄna prvnÃho dne v týdnu";
+Calendar._TT["PREV_YEAR"] = "PÅedchozà rok (pÅidrž pro menu)";
+Calendar._TT["PREV_MONTH"] = "PÅedchozà mÄsÃc (pÅidrž pro menu)";
+Calendar._TT["GO_TODAY"] = "Dnešnà datum";
+Calendar._TT["NEXT_MONTH"] = "Dalšà mÄsÃc (pÅidrž pro menu)";
+Calendar._TT["NEXT_YEAR"] = "Dalšà rok (pÅidrž pro menu)";
+Calendar._TT["SEL_DATE"] = "Vyber datum";
+Calendar._TT["DRAG_TO_MOVE"] = "ChyÅ¥ a táhni, pro pÅesun";
+Calendar._TT["PART_TODAY"] = " (dnes)";
+Calendar._TT["MON_FIRST"] = "Ukaž jako prvnà PondÄlÃ";
+//Calendar._TT["SUN_FIRST"] = "Ukaž jako prvnà NedÄli";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"VýbÄr datumu:\n" +
+"- Use the \xab, \xbb buttons to select year\n" +
+"- Použijte tlaÄÃtka " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " k výbÄru mÄsÃce\n" +
+"- Podržte tlaÄÃtko myÅ¡i na jakémkoliv z tÄch tlaÄÃtek pro rychlejšà výbÄr.";
+
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"VýbÄr Äasu:\n" +
+"- KliknÄte na jakoukoliv z Äástà výbÄru Äasu pro zvýšenÃ.\n" +
+"- nebo Shift-click pro snÞenÃ\n" +
+"- nebo kliknÄte a táhnÄte pro rychlejšà výbÄr.";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "Zobraz %s prvnÃ";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "ZavÅÃt";
+Calendar._TT["TODAY"] = "Dnes";
+Calendar._TT["TIME_PART"] = "(Shift-)Klikni nebo táhni pro zmÄnu hodnoty";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "d.m.yy";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "wk";
+Calendar._TT["TIME"] = "Äas:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-cs-win.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-cs-win.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-cs-win.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,65 @@
+/*
+ calendar-cs-win.js
+ language: Czech
+ encoding: windows-1250
+ author: Lubos Jerabek (xnet at seznam.cz)
+ Jan Uhlir (espinosa at centrum.cz)
+*/
+
+// ** I18N
+Calendar._DN = new Array('Nedìle','Pondìlí','Úterý','Støeda','Ètvrtek','Pátek','Sobota','Nedìle');
+Calendar._SDN = new Array('Ne','Po','Út','St','Èt','Pá','So','Ne');
+Calendar._MN = new Array('Leden','Únor','Bøezen','Duben','Kvìten','Èerven','Èervenec','Srpen','Záøí','Øíjen','Listopad','Prosinec');
+Calendar._SMN = new Array('Led','Úno','Bøe','Dub','Kvì','Èrv','Èvc','Srp','Záø','Øíj','Lis','Pro');
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "O komponentì kalendáø";
+Calendar._TT["TOGGLE"] = "Zmìna prvního dne v týdnu";
+Calendar._TT["PREV_YEAR"] = "Pøedchozí rok (pøidr pro menu)";
+Calendar._TT["PREV_MONTH"] = "Pøedchozí mìsíc (pøidr pro menu)";
+Calendar._TT["GO_TODAY"] = "Dnení datum";
+Calendar._TT["NEXT_MONTH"] = "Dalí mìsíc (pøidr pro menu)";
+Calendar._TT["NEXT_YEAR"] = "Dalí rok (pøidr pro menu)";
+Calendar._TT["SEL_DATE"] = "Vyber datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Chy a táhni, pro pøesun";
+Calendar._TT["PART_TODAY"] = " (dnes)";
+Calendar._TT["MON_FIRST"] = "Uka jako první Pondìlí";
+//Calendar._TT["SUN_FIRST"] = "Uka jako první Nedìli";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Výbìr datumu:\n" +
+"- Use the \xab, \xbb buttons to select year\n" +
+"- Pouijte tlaèítka " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " k výbìru mìsíce\n" +
+"- Podrte tlaèítko myi na jakémkoliv z tìch tlaèítek pro rychlejí výbìr.";
+
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Výbìr èasu:\n" +
+"- Kliknìte na jakoukoliv z èástí výbìru èasu pro zvýení.\n" +
+"- nebo Shift-click pro sníení\n" +
+"- nebo kliknìte a táhnìte pro rychlejí výbìr.";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "Zobraz %s první";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Zavøít";
+Calendar._TT["TODAY"] = "Dnes";
+Calendar._TT["TIME_PART"] = "(Shift-)Klikni nebo táhni pro zmìnu hodnoty";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "d.m.yy";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "wk";
+Calendar._TT["TIME"] = "Èas:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-da.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-da.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-da.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,127 @@
+// ** I18N
+
+// Calendar DA language
+// Author: Michael Thingmand Henriksen, <michael (a) thingmand dot dk>
+// Encoding: any
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Søndag",
+"Mandag",
+"Tirsdag",
+"Onsdag",
+"Torsdag",
+"Fredag",
+"Lørdag",
+"Søndag");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Søn",
+"Man",
+"Tir",
+"Ons",
+"Tor",
+"Fre",
+"Lør",
+"Søn");
+
+// First day of the week. "0" means display Sunday first, "1" means display
+// Monday first, etc.
+Calendar._FD = 1;
+
+// full month names
+Calendar._MN = new Array
+("Januar",
+"Februar",
+"Marts",
+"April",
+"Maj",
+"Juni",
+"Juli",
+"August",
+"September",
+"Oktober",
+"November",
+"December");
+
+// short month names
+Calendar._SMN = new Array
+("Jan",
+"Feb",
+"Mar",
+"Apr",
+"Maj",
+"Jun",
+"Jul",
+"Aug",
+"Sep",
+"Okt",
+"Nov",
+"Dec");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Om Kalenderen";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"For den seneste version besøg: http://www.dynarch.com/projects/calendar/\n"; +
+"Distribueret under GNU LGPL. Se http://gnu.org/licenses/lgpl.html for detajler." +
+"\n\n" +
+"Valg af dato:\n" +
+"- Brug \xab, \xbb knapperne for at vælge år\n" +
+"- Brug " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " knapperne for at vælge måned\n" +
+"- Hold knappen på musen nede på knapperne ovenfor for hurtigere valg.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Valg af tid:\n" +
+"- Klik på en vilkårlig del for større værdi\n" +
+"- eller Shift-klik for for mindre værdi\n" +
+"- eller klik og træk for hurtigere valg.";
+
+Calendar._TT["PREV_YEAR"] = "Et år tilbage (hold for menu)";
+Calendar._TT["PREV_MONTH"] = "En måned tilbage (hold for menu)";
+Calendar._TT["GO_TODAY"] = "Gå til i dag";
+Calendar._TT["NEXT_MONTH"] = "En måned frem (hold for menu)";
+Calendar._TT["NEXT_YEAR"] = "Et år frem (hold for menu)";
+Calendar._TT["SEL_DATE"] = "Vælg dag";
+Calendar._TT["DRAG_TO_MOVE"] = "Træk vinduet";
+Calendar._TT["PART_TODAY"] = " (i dag)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "Vis %s først";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Luk";
+Calendar._TT["TODAY"] = "I dag";
+Calendar._TT["TIME_PART"] = "(Shift-)klik eller træk for at ændre værdi";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "Uge";
+Calendar._TT["TIME"] = "Tid:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-de.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-de.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-de.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,124 @@
+// ** I18N
+
+// Calendar DE language
+// Author: Jack (tR), <jack at jtr.de>
+// Encoding: any
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Sonntag",
+ "Montag",
+ "Dienstag",
+ "Mittwoch",
+ "Donnerstag",
+ "Freitag",
+ "Samstag",
+ "Sonntag");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("So",
+ "Mo",
+ "Di",
+ "Mi",
+ "Do",
+ "Fr",
+ "Sa",
+ "So");
+
+// full month names
+Calendar._MN = new Array
+("Januar",
+ "Februar",
+ "M\u00e4rz",
+ "April",
+ "Mai",
+ "Juni",
+ "Juli",
+ "August",
+ "September",
+ "Oktober",
+ "November",
+ "Dezember");
+
+// short month names
+Calendar._SMN = new Array
+("Jan",
+ "Feb",
+ "M\u00e4r",
+ "Apr",
+ "May",
+ "Jun",
+ "Jul",
+ "Aug",
+ "Sep",
+ "Okt",
+ "Nov",
+ "Dez");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "\u00DCber dieses Kalendarmodul";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this ;-)
+"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Datum ausw\u00e4hlen:\n" +
+"- Benutzen Sie die \xab, \xbb Buttons um das Jahr zu w\u00e4hlen\n" +
+"- Benutzen Sie die " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " Buttons um den Monat zu w\u00e4hlen\n" +
+"- F\u00fcr eine Schnellauswahl halten Sie die Maustaste \u00fcber diesen Buttons fest.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Zeit ausw\u00e4hlen:\n" +
+"- Klicken Sie auf die Teile der Uhrzeit, um diese zu erh\u00F6hen\n" +
+"- oder klicken Sie mit festgehaltener Shift-Taste um diese zu verringern\n" +
+"- oder klicken und festhalten f\u00fcr Schnellauswahl.";
+
+Calendar._TT["TOGGLE"] = "Ersten Tag der Woche w\u00e4hlen";
+Calendar._TT["PREV_YEAR"] = "Voriges Jahr (Festhalten f\u00fcr Schnellauswahl)";
+Calendar._TT["PREV_MONTH"] = "Voriger Monat (Festhalten f\u00fcr Schnellauswahl)";
+Calendar._TT["GO_TODAY"] = "Heute ausw\u00e4hlen";
+Calendar._TT["NEXT_MONTH"] = "N\u00e4chst. Monat (Festhalten f\u00fcr Schnellauswahl)";
+Calendar._TT["NEXT_YEAR"] = "N\u00e4chst. Jahr (Festhalten f\u00fcr Schnellauswahl)";
+Calendar._TT["SEL_DATE"] = "Datum ausw\u00e4hlen";
+Calendar._TT["DRAG_TO_MOVE"] = "Zum Bewegen festhalten";
+Calendar._TT["PART_TODAY"] = " (Heute)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "Woche beginnt mit %s ";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Schlie\u00dfen";
+Calendar._TT["TODAY"] = "Heute";
+Calendar._TT["TIME_PART"] = "(Shift-)Klick oder Festhalten und Ziehen um den Wert zu \u00e4ndern";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "wk";
+Calendar._TT["TIME"] = "Zeit:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-du.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-du.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-du.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,45 @@
+// ** I18N
+Calendar._DN = new Array
+("Zondag",
+ "Maandag",
+ "Dinsdag",
+ "Woensdag",
+ "Donderdag",
+ "Vrijdag",
+ "Zaterdag",
+ "Zondag");
+Calendar._MN = new Array
+("Januari",
+ "Februari",
+ "Maart",
+ "April",
+ "Mei",
+ "Juni",
+ "Juli",
+ "Augustus",
+ "September",
+ "Oktober",
+ "November",
+ "December");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Toggle startdag van de week";
+Calendar._TT["PREV_YEAR"] = "Vorig jaar (indrukken voor menu)";
+Calendar._TT["PREV_MONTH"] = "Vorige month (indrukken voor menu)";
+Calendar._TT["GO_TODAY"] = "Naar Vandaag";
+Calendar._TT["NEXT_MONTH"] = "Volgende Maand (indrukken voor menu)";
+Calendar._TT["NEXT_YEAR"] = "Volgend jaar (indrukken voor menu)";
+Calendar._TT["SEL_DATE"] = "Selecteer datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Sleep om te verplaatsen";
+Calendar._TT["PART_TODAY"] = " (vandaag)";
+Calendar._TT["MON_FIRST"] = "Toon Maandag eerst";
+Calendar._TT["SUN_FIRST"] = "Toon Zondag eerst";
+Calendar._TT["CLOSE"] = "Sluiten";
+Calendar._TT["TODAY"] = "Vandaag";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd";
+Calendar._TT["TT_DATE_FORMAT"] = "D, M d";
+
+Calendar._TT["WK"] = "wk";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-el.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-el.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-el.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,89 @@
+// ** I18N
+Calendar._DN = new Array
+("ÎÏ
Ïιακή",
+ "ÎεÏ
ÏÎÏα",
+ "ΤÏίÏη",
+ "ΤεÏάÏÏη",
+ "Î ÎμÏÏη",
+ "ΠαÏαÏκεÏ
ή",
+ "ΣάββαÏο",
+ "ÎÏ
Ïιακή");
+
+Calendar._SDN = new Array
+("ÎÏ
",
+ "Îε",
+ "TÏ",
+ "Τε",
+ "Πε",
+ "Πα",
+ "Σα",
+ "ÎÏ
");
+
+Calendar._MN = new Array
+("ÎανοÏ
άÏιοÏ",
+ "ΦεβÏοÏ
άÏιοÏ",
+ "ÎάÏÏιοÏ",
+ "ÎÏÏίλιοÏ",
+ "ÎάÏοÏ",
+ "ÎοÏνιοÏ",
+ "ÎοÏλιοÏ",
+ "ÎÏγοÏ
ÏÏοÏ",
+ "ΣεÏÏÎμβÏιοÏ",
+ "ÎκÏÏβÏιοÏ",
+ "ÎοÎμβÏιοÏ",
+ "ÎεκÎμβÏιοÏ");
+
+Calendar._SMN = new Array
+("Îαν",
+ "Φεβ",
+ "ÎαÏ",
+ "ÎÏÏ",
+ "Îαι",
+ "ÎοÏ
ν",
+ "ÎοÏ
λ",
+ "ÎÏ
γ",
+ "ΣεÏ",
+ "ÎκÏ",
+ "Îοε",
+ "Îεκ");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Îια Ïο ημεÏολÏγιο";
+
+Calendar._TT["ABOUT"] =
+"ÎÏιλογÎÎ±Ï Î·Î¼ÎµÏομηνίαÏ/ÏÏÎ±Ï Ïε DHTML\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"Îια ÏελεÏ
Ïαία ÎκδοÏη: http://www.dynarch.com/projects/calendar/\n" +
+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"ÎÏιλογή ημεÏομηνίαÏ:\n" +
+"- ΧÏηÏιμοÏοιείÏÏε Ïα κοÏ
μÏιά \xab, \xbb για εÏιλογή ÎÏοÏ
Ï\n" +
+"- ΧÏηÏιμοÏοιείÏÏε Ïα κοÏ
μÏιά " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " για εÏιλογή μήνα\n" +
+"- ÎÏαÏήÏÏε κοÏ
μÏί ÏονÏÎ¹ÎºÎ¿Ï ÏαÏημÎνο ÏÏα ÏαÏαÏÎ¬Î½Ï ÎºÎ¿Ï
μÏιά για Ïιο γÏήγοÏη εÏιλογή.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"ÎÏιλογή ÏÏαÏ:\n" +
+"- ÎάνÏε κλικ Ïε Îνα αÏÏ Ïα μÎÏη ÏÎ·Ï ÏÏÎ±Ï Î³Î¹Î± αÏξηÏη\n" +
+"- ή Shift-κλικ για μείÏÏη\n" +
+"- ή κλικ και μεÏακίνηÏη για Ïιο γÏήγοÏη εÏιλογή.";
+Calendar._TT["TOGGLE"] = "ÎÏάÏα ÏÏÏÏÎ·Ï Î·Î¼ÎÏÎ±Ï ÏÎ·Ï ÎµÎ²Î´Î¿Î¼Î¬Î´Î±Ï";
+Calendar._TT["PREV_YEAR"] = "Î Ïοηγ. ÎÏÎ¿Ï (κÏαÏήÏÏε για Ïο μενοÏ)";
+Calendar._TT["PREV_MONTH"] = "Î Ïοηγ. Î¼Î®Î½Î±Ï (κÏαÏήÏÏε για Ïο μενοÏ)";
+Calendar._TT["GO_TODAY"] = "ΣήμεÏα";
+Calendar._TT["NEXT_MONTH"] = "ÎÏÏÎ¼ÎµÎ½Î¿Ï Î¼Î®Î½Î±Ï (κÏαÏήÏÏε για Ïο μενοÏ)";
+Calendar._TT["NEXT_YEAR"] = "ÎÏÏμενο ÎÏÎ¿Ï (κÏαÏήÏÏε για Ïο μενοÏ)";
+Calendar._TT["SEL_DATE"] = "ÎÏιλÎξÏε ημεÏομηνία";
+Calendar._TT["DRAG_TO_MOVE"] = "ΣÏÏÏε για να μεÏακινήÏεÏε";
+Calendar._TT["PART_TODAY"] = " (ÏήμεÏα)";
+Calendar._TT["MON_FIRST"] = "ÎμÏάνιÏη ÎεÏ
ÏÎÏÎ±Ï ÏÏÏÏα";
+Calendar._TT["SUN_FIRST"] = "ÎμÏάνιÏη ÎÏ
ÏÎ¹Î±ÎºÎ®Ï ÏÏÏÏα";
+Calendar._TT["CLOSE"] = "ÎλείÏιμο";
+Calendar._TT["TODAY"] = "ΣήμεÏα";
+Calendar._TT["TIME_PART"] = "(Shift-)κλικ ή μεÏακίνηÏη για αλλαγή";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
+Calendar._TT["TT_DATE_FORMAT"] = "D, d M";
+
+Calendar._TT["WK"] = "εβδ";
+
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-en.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-en.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-en.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,127 @@
+// ** I18N
+
+// Calendar EN language
+// Author: Mihai Bazon, <mihai_bazon at yahoo.com>
+// Encoding: any
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday",
+ "Sunday");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Sun",
+ "Mon",
+ "Tue",
+ "Wed",
+ "Thu",
+ "Fri",
+ "Sat",
+ "Sun");
+
+// First day of the week. "0" means display Sunday first, "1" means display
+// Monday first, etc.
+Calendar._FD = 0;
+
+// full month names
+Calendar._MN = new Array
+("January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December");
+
+// short month names
+Calendar._SMN = new Array
+("Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "May",
+ "Jun",
+ "Jul",
+ "Aug",
+ "Sep",
+ "Oct",
+ "Nov",
+ "Dec");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "About the calendar";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Date selection:\n" +
+"- Use the \xab, \xbb buttons to select year\n" +
+"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
+"- Hold mouse button on any of the above buttons for faster selection.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Time selection:\n" +
+"- Click on any of the time parts to increase it\n" +
+"- or Shift-click to decrease it\n" +
+"- or click and drag for faster selection.";
+
+Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)";
+Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)";
+Calendar._TT["GO_TODAY"] = "Go Today";
+Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)";
+Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)";
+Calendar._TT["SEL_DATE"] = "Select date";
+Calendar._TT["DRAG_TO_MOVE"] = "Drag to move";
+Calendar._TT["PART_TODAY"] = " (today)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "Display %s first";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Close";
+Calendar._TT["TODAY"] = "Today";
+Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "wk";
+Calendar._TT["TIME"] = "Time:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-es.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-es.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-es.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,129 @@
+// ** I18N
+
+// Calendar ES (spanish) language
+// Author: Mihai Bazon, <mihai_bazon at yahoo.com>
+// Updater: Servilio Afre Puentes <servilios at yahoo.com>
+// Updated: 2004-06-03
+// Encoding: utf-8
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Domingo",
+ "Lunes",
+ "Martes",
+ "Miércoles",
+ "Jueves",
+ "Viernes",
+ "Sábado",
+ "Domingo");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Dom",
+ "Lun",
+ "Mar",
+ "Mié",
+ "Jue",
+ "Vie",
+ "Sáb",
+ "Dom");
+
+// First day of the week. "0" means display Sunday first, "1" means display
+// Monday first, etc.
+Calendar._FD = 1;
+
+// full month names
+Calendar._MN = new Array
+("Enero",
+ "Febrero",
+ "Marzo",
+ "Abril",
+ "Mayo",
+ "Junio",
+ "Julio",
+ "Agosto",
+ "Septiembre",
+ "Octubre",
+ "Noviembre",
+ "Diciembre");
+
+// short month names
+Calendar._SMN = new Array
+("Ene",
+ "Feb",
+ "Mar",
+ "Abr",
+ "May",
+ "Jun",
+ "Jul",
+ "Ago",
+ "Sep",
+ "Oct",
+ "Nov",
+ "Dic");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Acerca del calendario";
+
+Calendar._TT["ABOUT"] =
+"Selector DHTML de Fecha/Hora\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"Para conseguir la última versión visite: http://www.dynarch.com/projects/calendar/\n" +
+"Distribuido bajo licencia GNU LGPL. Visite http://gnu.org/licenses/lgpl.html para más detalles." +
+"\n\n" +
+"Selección de fecha:\n" +
+"- Use los botones \xab, \xbb para seleccionar el año\n" +
+"- Use los botones " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para seleccionar el mes\n" +
+"- Mantenga pulsado el ratón en cualquiera de estos botones para una selección rápida.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Selección de hora:\n" +
+"- Pulse en cualquiera de las partes de la hora para incrementarla\n" +
+"- o pulse las mayúsculas mientras hace clic para decrementarla\n" +
+"- o haga clic y arrastre el ratón para una selección más rápida.";
+
+Calendar._TT["PREV_YEAR"] = "Año anterior (mantener para menú)";
+Calendar._TT["PREV_MONTH"] = "Mes anterior (mantener para menú)";
+Calendar._TT["GO_TODAY"] = "Ir a hoy";
+Calendar._TT["NEXT_MONTH"] = "Mes siguiente (mantener para menú)";
+Calendar._TT["NEXT_YEAR"] = "Año siguiente (mantener para menú)";
+Calendar._TT["SEL_DATE"] = "Seleccionar fecha";
+Calendar._TT["DRAG_TO_MOVE"] = "Arrastrar para mover";
+Calendar._TT["PART_TODAY"] = " (hoy)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "Hacer %s primer día de la semana";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Cerrar";
+Calendar._TT["TODAY"] = "Hoy";
+Calendar._TT["TIME_PART"] = "(Mayúscula-)Clic o arrastre para cambiar valor";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%A, %e de %B de %Y";
+
+Calendar._TT["WK"] = "sem";
+Calendar._TT["TIME"] = "Hora:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-fi.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-fi.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-fi.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,98 @@
+// ** I18N
+
+// Calendar FI language (Finnish, Suomi)
+// Author: Jarno Käyhkö, <gambler at phnet.fi>
+// Encoding: UTF-8
+// Distributed under the same terms as the calendar itself.
+
+// full day names
+Calendar._DN = new Array
+("Sunnuntai",
+ "Maanantai",
+ "Tiistai",
+ "Keskiviikko",
+ "Torstai",
+ "Perjantai",
+ "Lauantai",
+ "Sunnuntai");
+
+// short day names
+Calendar._SDN = new Array
+("Su",
+ "Ma",
+ "Ti",
+ "Ke",
+ "To",
+ "Pe",
+ "La",
+ "Su");
+
+// full month names
+Calendar._MN = new Array
+("Tammikuu",
+ "Helmikuu",
+ "Maaliskuu",
+ "Huhtikuu",
+ "Toukokuu",
+ "Kesäkuu",
+ "Heinäkuu",
+ "Elokuu",
+ "Syyskuu",
+ "Lokakuu",
+ "Marraskuu",
+ "Joulukuu");
+
+// short month names
+Calendar._SMN = new Array
+("Tam",
+ "Hel",
+ "Maa",
+ "Huh",
+ "Tou",
+ "Kes",
+ "Hei",
+ "Elo",
+ "Syy",
+ "Lok",
+ "Mar",
+ "Jou");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Tietoja kalenterista";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"Uusin versio osoitteessa: http://www.dynarch.com/projects/calendar/\n" +
+"Julkaistu GNU LGPL lisenssin alaisuudessa. Lisätietoja osoitteessa http://gnu.org/licenses/lgpl.html" +
+"\n\n" +
+"Päivämäärä valinta:\n" +
+"- Käytä \xab, \xbb painikkeita valitaksesi vuosi\n" +
+"- Käytä " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " painikkeita valitaksesi kuukausi\n" +
+"- Pitämällä hiiren painiketta minkä tahansa yllä olevan painikkeen kohdalla, saat näkyviin valikon nopeampaan siirtymiseen.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Ajan valinta:\n" +
+"- Klikkaa kellonajan numeroita lisätäksesi aikaa\n" +
+"- tai pitämällä Shift-näppäintä pohjassa saat aikaa taaksepäin\n" +
+"- tai klikkaa ja pidä hiiren painike pohjassa sekä liikuta hiirtä muuttaaksesi aikaa nopeasti eteen- ja taaksepäin.";
+
+Calendar._TT["PREV_YEAR"] = "Edell. vuosi (paina hetki, näet valikon)";
+Calendar._TT["PREV_MONTH"] = "Edell. kuukausi (paina hetki, näet valikon)";
+Calendar._TT["GO_TODAY"] = "Siirry tähän päivään";
+Calendar._TT["NEXT_MONTH"] = "Seur. kuukausi (paina hetki, näet valikon)";
+Calendar._TT["NEXT_YEAR"] = "Seur. vuosi (paina hetki, näet valikon)";
+Calendar._TT["SEL_DATE"] = "Valitse päivämäärä";
+Calendar._TT["DRAG_TO_MOVE"] = "Siirrä kalenterin paikkaa";
+Calendar._TT["PART_TODAY"] = " (tänään)";
+Calendar._TT["MON_FIRST"] = "Näytä maanantai ensimmäisenä";
+Calendar._TT["SUN_FIRST"] = "Näytä sunnuntai ensimmäisenä";
+Calendar._TT["CLOSE"] = "Sulje";
+Calendar._TT["TODAY"] = "Tänään";
+Calendar._TT["TIME_PART"] = "(Shift-) Klikkaa tai liikuta muuttaaksesi aikaa";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%d.%m.%Y";
+
+Calendar._TT["WK"] = "Vko";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-fr.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-fr.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-fr.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,125 @@
+// ** I18N
+
+// Calendar EN language
+// Author: Mihai Bazon, <mihai_bazon at yahoo.com>
+// Encoding: any
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// Translator: David Duret, <pilgrim at mala-template.net> from previous french version
+
+// full day names
+Calendar._DN = new Array
+("Dimanche",
+ "Lundi",
+ "Mardi",
+ "Mercredi",
+ "Jeudi",
+ "Vendredi",
+ "Samedi",
+ "Dimanche");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Dim",
+ "Lun",
+ "Mar",
+ "Mar",
+ "Jeu",
+ "Ven",
+ "Sam",
+ "Dim");
+
+// full month names
+Calendar._MN = new Array
+("Janvier",
+ "Février",
+ "Mars",
+ "Avril",
+ "Mai",
+ "Juin",
+ "Juillet",
+ "Août",
+ "Septembre",
+ "Octobre",
+ "Novembre",
+ "Décembre");
+
+// short month names
+Calendar._SMN = new Array
+("Jan",
+ "Fev",
+ "Mar",
+ "Avr",
+ "Mai",
+ "Juin",
+ "Juil",
+ "Aout",
+ "Sep",
+ "Oct",
+ "Nov",
+ "Dec");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "A propos du calendrier";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Heure Selecteur\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"Pour la derniere version visitez : http://www.dynarch.com/projects/calendar/\n" +
+"Distribué par GNU LGPL. Voir http://gnu.org/licenses/lgpl.html pour les details." +
+"\n\n" +
+"Selection de la date :\n" +
+"- Utiliser les bouttons \xab, \xbb pour selectionner l\'annee\n" +
+"- Utiliser les bouttons " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pour selectionner les mois\n" +
+"- Garder la souris sur n'importe quels boutons pour une selection plus rapide";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Selection de l\'heure :\n" +
+"- Cliquer sur heures ou minutes pour incrementer\n" +
+"- ou Maj-clic pour decrementer\n" +
+"- ou clic et glisser-deplacer pour une selection plus rapide";
+
+Calendar._TT["PREV_YEAR"] = "Année préc. (maintenir pour menu)";
+Calendar._TT["PREV_MONTH"] = "Mois préc. (maintenir pour menu)";
+Calendar._TT["GO_TODAY"] = "Atteindre la date du jour";
+Calendar._TT["NEXT_MONTH"] = "Mois suiv. (maintenir pour menu)";
+Calendar._TT["NEXT_YEAR"] = "Année suiv. (maintenir pour menu)";
+Calendar._TT["SEL_DATE"] = "Sélectionner une date";
+Calendar._TT["DRAG_TO_MOVE"] = "Déplacer";
+Calendar._TT["PART_TODAY"] = " (Aujourd'hui)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "Afficher %s en premier";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Fermer";
+Calendar._TT["TODAY"] = "Aujourd'hui";
+Calendar._TT["TIME_PART"] = "(Maj-)Clic ou glisser pour modifier la valeur";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "Sem.";
+Calendar._TT["TIME"] = "Heure :";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-he-utf8.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-he-utf8.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-he-utf8.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,123 @@
+// ** I18N
+
+// Calendar EN language
+// Author: Idan Sofer, <idan at idanso.dyndns.org>
+// Encoding: UTF-8
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("ר×ש××",
+ "×©× ×",
+ "ש××ש×",
+ "ר×××¢×",
+ "×××ש×",
+ "ש×ש×",
+ "ש×ת",
+ "ר×ש××");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("×",
+ "×",
+ "×",
+ "×",
+ "×",
+ "×",
+ "ש",
+ "×");
+
+// full month names
+Calendar._MN = new Array
+("×× ××ר",
+ "פ×ר××ר",
+ "×רץ",
+ "×פר××",
+ "×××",
+ "××× ×",
+ "××××",
+ "××××ס×",
+ "ספ×××ר",
+ "×××§×××ר",
+ "× ××××ר",
+ "×צ××ר");
+
+// short month names
+Calendar._SMN = new Array
+("×× ×",
+ "פ×ר",
+ "×רץ",
+ "×פר",
+ "×××",
+ "××× ",
+ "×××",
+ "×××",
+ "ספ×",
+ "×××§",
+ "× ××",
+ "×צ×");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "××××ת ××©× ×ª××";
+
+Calendar._TT["ABOUT"] =
+"×××¨× ×ª×ר××/×©×¢× DHTML\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"××××¨×¡× ×××ר×× × ×××× × ×: http://www.dynarch.com/projects/calendar/\n" +
+"××פץ ת×ת ×××××× × GNU LGPL. ×¢××× × http://gnu.org/licenses/lgpl.html ×פר××× × ×ספ××." +
+"\n\n" +
+×××רת ת×ר××:\n" +
+"- ×שת×ש ××פת×ר×× \xab, \xbb ××××רת ×©× ×\n" +
+"- ×שת×ש ××פת×ר×× " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " ××××רת ×××ש\n" +
+"- ××××§ ××¢××ר ××××¥ ××¢× ××פת×ר×× ×××××ר×× ××¢×× ×××××¨× ××××¨× ××תר.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"×××רת ×××:\n" +
+"- ×××¥ ×¢× ×× ××× ××××§× ×××× ××× ×××ס××£\n" +
+"- ×× shift ×ש×××× ×¢× ××××¦× ××× ×××ס×ר\n" +
+"- ×× ×××¥ ××ר×ר ×פע××× ××××¨× ××תר.";
+
+Calendar._TT["PREV_YEAR"] = "×©× × ×§×××ת - ××××§ ××§××ת תפר××";
+Calendar._TT["PREV_MONTH"] = "×××ש ×§××× - ××××§ ××§××ת תפר××";
+Calendar._TT["GO_TODAY"] = "×¢××ר ×××××";
+Calendar._TT["NEXT_MONTH"] = "×××ש ××× - ××××§ ×תפר××";
+Calendar._TT["NEXT_YEAR"] = "×©× × ×××× - ××××§ ×תפר××";
+Calendar._TT["SEL_DATE"] = "××ר ת×ר××";
+Calendar._TT["DRAG_TO_MOVE"] = "×ר×ר ×××××";
+Calendar._TT["PART_TODAY"] = " )××××(";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "××¦× %s ×§×××";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "6";
+
+Calendar._TT["CLOSE"] = "ס××ר";
+Calendar._TT["TODAY"] = "××××";
+Calendar._TT["TIME_PART"] = "(ש×פ×-)×××¥ ××ר×ר ××× ××©× ×ת ער×";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "wk";
+Calendar._TT["TIME"] = "שע×::";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-hr-utf8.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-hr-utf8.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-hr-utf8.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,49 @@
+/* Croatian language file for the DHTML Calendar version 0.9.2
+* Author Krunoslav Zubrinic <krunoslav.zubrinic at vip.hr>, June 2003.
+* Feel free to use this script under the terms of the GNU Lesser General
+* Public License, as long as you do not remove or alter this notice.
+*/
+Calendar._DN = new Array
+("Nedjelja",
+ "Ponedjeljak",
+ "Utorak",
+ "Srijeda",
+ "Äetvrtak",
+ "Petak",
+ "Subota",
+ "Nedjelja");
+Calendar._MN = new Array
+("SijeÄanj",
+ "VeljaÄa",
+ "Ožujak",
+ "Travanj",
+ "Svibanj",
+ "Lipanj",
+ "Srpanj",
+ "Kolovoz",
+ "Rujan",
+ "Listopad",
+ "Studeni",
+ "Prosinac");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Promjeni dan s kojim poÄinje tjedan";
+Calendar._TT["PREV_YEAR"] = "Prethodna godina (dugi pritisak za meni)";
+Calendar._TT["PREV_MONTH"] = "Prethodni mjesec (dugi pritisak za meni)";
+Calendar._TT["GO_TODAY"] = "Idi na tekuÄi dan";
+Calendar._TT["NEXT_MONTH"] = "SlijedeÄi mjesec (dugi pritisak za meni)";
+Calendar._TT["NEXT_YEAR"] = "SlijedeÄa godina (dugi pritisak za meni)";
+Calendar._TT["SEL_DATE"] = "Izaberite datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Pritisni i povuci za promjenu pozicije";
+Calendar._TT["PART_TODAY"] = " (today)";
+Calendar._TT["MON_FIRST"] = "Prikaži ponedjeljak kao prvi dan";
+Calendar._TT["SUN_FIRST"] = "Prikaži nedjelju kao prvi dan";
+Calendar._TT["CLOSE"] = "Zatvori";
+Calendar._TT["TODAY"] = "Danas";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
+Calendar._TT["TT_DATE_FORMAT"] = "DD, dd.mm.y";
+
+Calendar._TT["WK"] = "Tje";
\ No newline at end of file
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-hu.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-hu.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-hu.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,124 @@
+// ** I18N
+
+// Calendar HU language
+// Author: ???
+// Modifier: KARASZI Istvan, <jscalendar at spam.raszi.hu>
+// Encoding: any
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Vasárnap",
+ "Hétfõ",
+ "Kedd",
+ "Szerda",
+ "Csütörtök",
+ "Péntek",
+ "Szombat",
+ "Vasárnap");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("v",
+ "h",
+ "k",
+ "sze",
+ "cs",
+ "p",
+ "szo",
+ "v");
+
+// full month names
+Calendar._MN = new Array
+("január",
+ "február",
+ "március",
+ "április",
+ "május",
+ "június",
+ "július",
+ "augusztus",
+ "szeptember",
+ "október",
+ "november",
+ "december");
+
+// short month names
+Calendar._SMN = new Array
+("jan",
+ "feb",
+ "már",
+ "ápr",
+ "máj",
+ "jún",
+ "júl",
+ "aug",
+ "sze",
+ "okt",
+ "nov",
+ "dec");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "A kalendáriumról";
+
+Calendar._TT["ABOUT"] =
+"DHTML dátum/idõ kiválasztó\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"a legfrissebb verzió megtalálható: http://www.dynarch.com/projects/calendar/\n" +
+"GNU LGPL alatt terjesztve. Lásd a http://gnu.org/licenses/lgpl.html oldalt a részletekhez." +
+"\n\n" +
+"Dátum választás:\n" +
+"- használja a \xab, \xbb gombokat az év kiválasztásához\n" +
+"- használja a " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " gombokat a hónap kiválasztásához\n" +
+"- tartsa lenyomva az egérgombot a gyors választáshoz.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Idõ választás:\n" +
+"- kattintva növelheti az idõt\n" +
+"- shift-tel kattintva csökkentheti\n" +
+"- lenyomva tartva és húzva gyorsabban kiválaszthatja.";
+
+Calendar._TT["PREV_YEAR"] = "Elõzõ év (tartsa nyomva a menühöz)";
+Calendar._TT["PREV_MONTH"] = "Elõzõ hónap (tartsa nyomva a menühöz)";
+Calendar._TT["GO_TODAY"] = "Mai napra ugrás";
+Calendar._TT["NEXT_MONTH"] = "Köv. hónap (tartsa nyomva a menühöz)";
+Calendar._TT["NEXT_YEAR"] = "Köv. év (tartsa nyomva a menühöz)";
+Calendar._TT["SEL_DATE"] = "Válasszon dátumot";
+Calendar._TT["DRAG_TO_MOVE"] = "Húzza a mozgatáshoz";
+Calendar._TT["PART_TODAY"] = " (ma)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "%s legyen a hét elsõ napja";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Bezár";
+Calendar._TT["TODAY"] = "Ma";
+Calendar._TT["TIME_PART"] = "(Shift-)Klikk vagy húzás az érték változtatásához";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%b %e, %a";
+
+Calendar._TT["WK"] = "hét";
+Calendar._TT["TIME"] = "idõ:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-it.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-it.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-it.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,124 @@
+// ** I18N
+
+// Calendar EN language
+// Author: Mihai Bazon, <mihai_bazon at yahoo.com>
+// Translator: Fabio Di Bernardini, <altraqua at email.it>
+// Encoding: any
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Domenica",
+ "Lunedì",
+ "Martedì",
+ "Mercoledì",
+ "Giovedì",
+ "Venerdì",
+ "Sabato",
+ "Domenica");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Dom",
+ "Lun",
+ "Mar",
+ "Mer",
+ "Gio",
+ "Ven",
+ "Sab",
+ "Dom");
+
+// full month names
+Calendar._MN = new Array
+("Gennaio",
+ "Febbraio",
+ "Marzo",
+ "Aprile",
+ "Maggio",
+ "Giugno",
+ "Luglio",
+ "Augosto",
+ "Settembre",
+ "Ottobre",
+ "Novembre",
+ "Dicembre");
+
+// short month names
+Calendar._SMN = new Array
+("Gen",
+ "Feb",
+ "Mar",
+ "Apr",
+ "Mag",
+ "Giu",
+ "Lug",
+ "Ago",
+ "Set",
+ "Ott",
+ "Nov",
+ "Dic");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Informazioni sul calendario";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"Per gli aggiornamenti: http://www.dynarch.com/projects/calendar/\n" +
+"Distribuito sotto licenza GNU LGPL. Vedi http://gnu.org/licenses/lgpl.html per i dettagli." +
+"\n\n" +
+"Selezione data:\n" +
+"- Usa \xab, \xbb per selezionare l'anno\n" +
+"- Usa " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " per i mesi\n" +
+"- Tieni premuto a lungo il mouse per accedere alle funzioni di selezione veloce.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Selezione orario:\n" +
+"- Clicca sul numero per incrementarlo\n" +
+"- o Shift+click per decrementarlo\n" +
+"- o click e sinistra o destra per variarlo.";
+
+Calendar._TT["PREV_YEAR"] = "Anno prec.(clicca a lungo per il menù)";
+Calendar._TT["PREV_MONTH"] = "Mese prec. (clicca a lungo per il menù)";
+Calendar._TT["GO_TODAY"] = "Oggi";
+Calendar._TT["NEXT_MONTH"] = "Pross. mese (clicca a lungo per il menù)";
+Calendar._TT["NEXT_YEAR"] = "Pross. anno (clicca a lungo per il menù)";
+Calendar._TT["SEL_DATE"] = "Seleziona data";
+Calendar._TT["DRAG_TO_MOVE"] = "Trascina per spostarlo";
+Calendar._TT["PART_TODAY"] = " (oggi)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "Mostra prima %s";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Chiudi";
+Calendar._TT["TODAY"] = "Oggi";
+Calendar._TT["TIME_PART"] = "(Shift-)Click o trascina per cambiare il valore";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%a:%b:%e";
+
+Calendar._TT["WK"] = "set";
+Calendar._TT["TIME"] = "Ora:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-jp.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-jp.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-jp.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,45 @@
+// ** I18N
+Calendar._DN = new Array
+("ú",
+ "",
+ "Î",
+ "
",
+ "Ø",
+ "à",
+ "y",
+ "ú");
+Calendar._MN = new Array
+("1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
+ "10",
+ "11",
+ "12");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "TÌÅÌjúðØèÖ¦";
+Calendar._TT["PREV_YEAR"] = "ON";
+Calendar._TT["PREV_MONTH"] = "O";
+Calendar._TT["GO_TODAY"] = "¡ú";
+Calendar._TT["NEXT_MONTH"] = "";
+Calendar._TT["NEXT_YEAR"] = "N";
+Calendar._TT["SEL_DATE"] = "útIð";
+Calendar._TT["DRAG_TO_MOVE"] = "EBhEÌÚ®";
+Calendar._TT["PART_TODAY"] = " (¡ú)";
+Calendar._TT["MON_FIRST"] = "júðæªÉ";
+Calendar._TT["SUN_FIRST"] = "újúðæªÉ";
+Calendar._TT["CLOSE"] = "妎";
+Calendar._TT["TODAY"] = "¡ú";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd";
+Calendar._TT["TT_DATE_FORMAT"] = "%m %dú (%a)";
+
+Calendar._TT["WK"] = "T";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ko-utf8.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ko-utf8.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ko-utf8.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,120 @@
+// ** I18N
+
+// Calendar EN language
+// Author: Mihai Bazon, <mihai_bazon at yahoo.com>
+// Translation: Yourim Yi <yyi at yourim.net>
+// Encoding: EUC-KR
+// lang : ko
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+
+Calendar._DN = new Array
+("ì¼ìì¼",
+ "ììì¼",
+ "íìì¼",
+ "ììì¼",
+ "목ìì¼",
+ "ê¸ìì¼",
+ "í ìì¼",
+ "ì¼ìì¼");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("ì¼",
+ "ì",
+ "í",
+ "ì",
+ "목",
+ "ê¸",
+ "í ",
+ "ì¼");
+
+// full month names
+Calendar._MN = new Array
+("1ì",
+ "2ì",
+ "3ì",
+ "4ì",
+ "5ì",
+ "6ì",
+ "7ì",
+ "8ì",
+ "9ì",
+ "10ì",
+ "11ì",
+ "12ì");
+
+// short month names
+Calendar._SMN = new Array
+("1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
+ "10",
+ "11",
+ "12");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "calendar ì ëí´ì";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"\n"+
+"ìµì ë²ì ì ë°ì¼ìë ¤ë©´ http://www.dynarch.com/projects/calendar/ ì 방문íì¸ì\n" +
+"\n"+
+"GNU LGPL ë¼ì´ì¼ì¤ë¡ ë°°í¬ë©ëë¤. \n"+
+"ë¼ì´ì¼ì¤ì ëí ìì¸í ë´ì©ì http://gnu.org/licenses/lgpl.html ì ì½ì¼ì¸ì." +
+"\n\n" +
+"ë ì§ ì í:\n" +
+"- ì°ë를 ì ííë ¤ë©´ \xab, \xbb ë²í¼ì ì¬ì©í©ëë¤\n" +
+"- ë¬ì ì ííë ¤ë©´ " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " ë²í¼ì ë르ì¸ì\n" +
+"- ê³ì ëë¥´ê³ ìì¼ë©´ ì ê°ë¤ì ë¹ ë¥´ê² ì ííì¤ ì ììµëë¤.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"ìê° ì í:\n" +
+"- ë§ì°ì¤ë¡ ë르면 ìê°ì´ ì¦ê°í©ëë¤\n" +
+"- Shift í¤ì í¨ê» ë르면 ê°ìí©ëë¤\n" +
+"- ë른 ìíìì ë§ì°ì¤ë¥¼ ìì§ì´ë©´ ì¢ ë ë¹ ë¥´ê² ê°ì´ ë³í©ëë¤.\n";
+
+Calendar._TT["PREV_YEAR"] = "ì§ë í´ (ê¸¸ê² ë르면 목ë¡)";
+Calendar._TT["PREV_MONTH"] = "ì§ë ë¬ (ê¸¸ê² ë르면 목ë¡)";
+Calendar._TT["GO_TODAY"] = "ì¤ë ë ì§ë¡";
+Calendar._TT["NEXT_MONTH"] = "ë¤ì ë¬ (ê¸¸ê² ë르면 목ë¡)";
+Calendar._TT["NEXT_YEAR"] = "ë¤ì í´ (ê¸¸ê² ë르면 목ë¡)";
+Calendar._TT["SEL_DATE"] = "ë ì§ë¥¼ ì ííì¸ì";
+Calendar._TT["DRAG_TO_MOVE"] = "ë§ì°ì¤ ëëê·¸ë¡ ì´ë íì¸ì";
+Calendar._TT["PART_TODAY"] = " (ì¤ë)";
+Calendar._TT["MON_FIRST"] = "ììì¼ì í 주ì ìì ìì¼ë¡";
+Calendar._TT["SUN_FIRST"] = "ì¼ìì¼ì í 주ì ìì ìì¼ë¡";
+Calendar._TT["CLOSE"] = "ë«ê¸°";
+Calendar._TT["TODAY"] = "ì¤ë";
+Calendar._TT["TIME_PART"] = "(Shift-)í´ë¦ ëë ëëê·¸ íì¸ì";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]";
+
+Calendar._TT["WK"] = "주";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ko.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ko.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ko.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,120 @@
+// ** I18N
+
+// Calendar EN language
+// Author: Mihai Bazon, <mihai_bazon at yahoo.com>
+// Translation: Yourim Yi <yyi at yourim.net>
+// Encoding: EUC-KR
+// lang : ko
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+
+Calendar._DN = new Array
+("ÀÏ¿äÀÏ",
+ "¿ù¿äÀÏ",
+ "È¿äÀÏ",
+ "¼ö¿äÀÏ",
+ "¸ñ¿äÀÏ",
+ "±Ý¿äÀÏ",
+ "Åä¿äÀÏ",
+ "ÀÏ¿äÀÏ");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("ÀÏ",
+ "¿ù",
+ "È",
+ "¼ö",
+ "¸ñ",
+ "±Ý",
+ "Åä",
+ "ÀÏ");
+
+// full month names
+Calendar._MN = new Array
+("1¿ù",
+ "2¿ù",
+ "3¿ù",
+ "4¿ù",
+ "5¿ù",
+ "6¿ù",
+ "7¿ù",
+ "8¿ù",
+ "9¿ù",
+ "10¿ù",
+ "11¿ù",
+ "12¿ù");
+
+// short month names
+Calendar._SMN = new Array
+("1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
+ "10",
+ "11",
+ "12");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "calendar ¿¡ ´ëÇØ¼";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"\n"+
+"ÃֽйöÀüÀ» ¹ÞÀ¸½Ã·Á¸é http://www.dynarch.com/projects/calendar/ ¿¡ ¹æ¹®Çϼ¼¿ä\n" +
+"\n"+
+"GNU LGPL ¶óÀ̼¾½º·Î ¹èÆ÷µË´Ï´Ù. \n"+
+"¶óÀ̼¾½º¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ ³»¿ëÀº http://gnu.org/licenses/lgpl.html À» ÀÐÀ¸¼¼¿ä." +
+"\n\n" +
+"³¯Â¥ ¼±ÅÃ:\n" +
+"- ¿¬µµ¸¦ ¼±ÅÃÇÏ·Á¸é \xab, \xbb ¹öưÀ» »ç¿ëÇÕ´Ï´Ù\n" +
+"- ´ÞÀ» ¼±ÅÃÇÏ·Á¸é " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " ¹öưÀ» ´©¸£¼¼¿ä\n" +
+"- °è¼Ó ´©¸£°í ÀÖÀ¸¸é À§ °ªµéÀ» ºü¸£°Ô ¼±ÅÃÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"½Ã°£ ¼±ÅÃ:\n" +
+"- ¸¶¿ì½º·Î ´©¸£¸é ½Ã°£ÀÌ Áõ°¡ÇÕ´Ï´Ù\n" +
+"- Shift Ű¿Í ÇÔ²² ´©¸£¸é °¨¼ÒÇÕ´Ï´Ù\n" +
+"- ´©¸¥ »óÅ¿¡¼ ¸¶¿ì½º¸¦ ¿òÁ÷À̸é Á» ´õ ºü¸£°Ô °ªÀÌ º¯ÇÕ´Ï´Ù.\n";
+
+Calendar._TT["PREV_YEAR"] = "Áö³ ÇØ (±æ°Ô ´©¸£¸é ¸ñ·Ï)";
+Calendar._TT["PREV_MONTH"] = "Áö³ ´Þ (±æ°Ô ´©¸£¸é ¸ñ·Ï)";
+Calendar._TT["GO_TODAY"] = "¿À´Ã ³¯Â¥·Î";
+Calendar._TT["NEXT_MONTH"] = "´ÙÀ½ ´Þ (±æ°Ô ´©¸£¸é ¸ñ·Ï)";
+Calendar._TT["NEXT_YEAR"] = "´ÙÀ½ ÇØ (±æ°Ô ´©¸£¸é ¸ñ·Ï)";
+Calendar._TT["SEL_DATE"] = "³¯Â¥¸¦ ¼±ÅÃÇϼ¼¿ä";
+Calendar._TT["DRAG_TO_MOVE"] = "¸¶¿ì½º µå·¡±×·Î À̵¿ Çϼ¼¿ä";
+Calendar._TT["PART_TODAY"] = " (¿À´Ã)";
+Calendar._TT["MON_FIRST"] = "¿ù¿äÀÏÀ» ÇÑ ÁÖÀÇ ½ÃÀÛ ¿äÀÏ·Î";
+Calendar._TT["SUN_FIRST"] = "ÀÏ¿äÀÏÀ» ÇÑ ÁÖÀÇ ½ÃÀÛ ¿äÀÏ·Î";
+Calendar._TT["CLOSE"] = "´Ý±â";
+Calendar._TT["TODAY"] = "¿À´Ã";
+Calendar._TT["TIME_PART"] = "(Shift-)Ŭ¸¯ ¶Ç´Â µå·¡±× Çϼ¼¿ä";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]";
+
+Calendar._TT["WK"] = "ÁÖ";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-lt-utf8.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-lt-utf8.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-lt-utf8.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,114 @@
+// ** I18N
+
+// Calendar LT language
+// Author: Martynas Majeris, <martynas at solmetra.lt>
+// Encoding: UTF-8
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Sekmadienis",
+ "Pirmadienis",
+ "Antradienis",
+ "TreÄiadienis",
+ "Ketvirtadienis",
+ "Pentadienis",
+ "Šeštadienis",
+ "Sekmadienis");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Sek",
+ "Pir",
+ "Ant",
+ "Tre",
+ "Ket",
+ "Pen",
+ "Šeš",
+ "Sek");
+
+// full month names
+Calendar._MN = new Array
+("Sausis",
+ "Vasaris",
+ "Kovas",
+ "Balandis",
+ "GegužÄ",
+ "Birželis",
+ "Liepa",
+ "Rugpjūtis",
+ "RugsÄjis",
+ "Spalis",
+ "Lapkritis",
+ "Gruodis");
+
+// short month names
+Calendar._SMN = new Array
+("Sau",
+ "Vas",
+ "Kov",
+ "Bal",
+ "Geg",
+ "Bir",
+ "Lie",
+ "Rgp",
+ "Rgs",
+ "Spa",
+ "Lap",
+ "Gru");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Apie kalendorių";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"NaujausiÄ
versijÄ
rasite: http://www.dynarch.com/projects/calendar/\n" +
+"Platinamas pagal GNU LGPL licencijÄ
. Aplankykite http://gnu.org/licenses/lgpl.html" +
+"\n\n" +
+"Datos pasirinkimas:\n" +
+"- Metų pasirinkimas: \xab, \xbb\n" +
+"- MÄnesio pasirinkimas: " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" +
+"- Nuspauskite ir laikykite pelÄs klaviÅ¡Ä
greitesniam pasirinkimui.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Laiko pasirinkimas:\n" +
+"- Spustelkite ant valandų arba minuÄių - skaiÄius padidÄs vienetu.\n" +
+"- Jei spausite kartu su Shift, skaiÄius sumažÄs.\n" +
+"- Greitam pasirinkimui spustelkite ir pajudinkite pelÄ.";
+
+Calendar._TT["PREV_YEAR"] = "Ankstesni metai (laikykite, jei norite meniu)";
+Calendar._TT["PREV_MONTH"] = "Ankstesnis mÄnuo (laikykite, jei norite meniu)";
+Calendar._TT["GO_TODAY"] = "Pasirinkti Å¡iandienÄ
";
+Calendar._TT["NEXT_MONTH"] = "Kitas mÄnuo (laikykite, jei norite meniu)";
+Calendar._TT["NEXT_YEAR"] = "Kiti metai (laikykite, jei norite meniu)";
+Calendar._TT["SEL_DATE"] = "Pasirinkite datÄ
";
+Calendar._TT["DRAG_TO_MOVE"] = "Tempkite";
+Calendar._TT["PART_TODAY"] = " (šiandien)";
+Calendar._TT["MON_FIRST"] = "Pirma savaitÄs diena - pirmadienis";
+Calendar._TT["SUN_FIRST"] = "Pirma savaitÄs diena - sekmadienis";
+Calendar._TT["CLOSE"] = "Uždaryti";
+Calendar._TT["TODAY"] = "Å iandien";
+Calendar._TT["TIME_PART"] = "Spustelkite arba tempkite jei norite pakeisti";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%A, %Y-%m-%d";
+
+Calendar._TT["WK"] = "sav";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-lt.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-lt.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-lt.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,114 @@
+// ** I18N
+
+// Calendar LT language
+// Author: Martynas Majeris, <martynas at solmetra.lt>
+// Encoding: Windows-1257
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Sekmadienis",
+ "Pirmadienis",
+ "Antradienis",
+ "Treèiadienis",
+ "Ketvirtadienis",
+ "Pentadienis",
+ "Ðeðtadienis",
+ "Sekmadienis");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Sek",
+ "Pir",
+ "Ant",
+ "Tre",
+ "Ket",
+ "Pen",
+ "Ðeð",
+ "Sek");
+
+// full month names
+Calendar._MN = new Array
+("Sausis",
+ "Vasaris",
+ "Kovas",
+ "Balandis",
+ "Geguþë",
+ "Birþelis",
+ "Liepa",
+ "Rugpjûtis",
+ "Rugsëjis",
+ "Spalis",
+ "Lapkritis",
+ "Gruodis");
+
+// short month names
+Calendar._SMN = new Array
+("Sau",
+ "Vas",
+ "Kov",
+ "Bal",
+ "Geg",
+ "Bir",
+ "Lie",
+ "Rgp",
+ "Rgs",
+ "Spa",
+ "Lap",
+ "Gru");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Apie kalendoriø";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"Naujausià versijà rasite: http://www.dynarch.com/projects/calendar/\n" +
+"Platinamas pagal GNU LGPL licencijà. Aplankykite http://gnu.org/licenses/lgpl.html" +
+"\n\n" +
+"Datos pasirinkimas:\n" +
+"- Metø pasirinkimas: \xab, \xbb\n" +
+"- Mënesio pasirinkimas: " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" +
+"- Nuspauskite ir laikykite pelës klaviðà greitesniam pasirinkimui.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Laiko pasirinkimas:\n" +
+"- Spustelkite ant valandø arba minuèiø - skaièus padidës vienetu.\n" +
+"- Jei spausite kartu su Shift, skaièius sumaþës.\n" +
+"- Greitam pasirinkimui spustelkite ir pajudinkite pelæ.";
+
+Calendar._TT["PREV_YEAR"] = "Ankstesni metai (laikykite, jei norite meniu)";
+Calendar._TT["PREV_MONTH"] = "Ankstesnis mënuo (laikykite, jei norite meniu)";
+Calendar._TT["GO_TODAY"] = "Pasirinkti ðiandienà";
+Calendar._TT["NEXT_MONTH"] = "Kitas mënuo (laikykite, jei norite meniu)";
+Calendar._TT["NEXT_YEAR"] = "Kiti metai (laikykite, jei norite meniu)";
+Calendar._TT["SEL_DATE"] = "Pasirinkite datà";
+Calendar._TT["DRAG_TO_MOVE"] = "Tempkite";
+Calendar._TT["PART_TODAY"] = " (ðiandien)";
+Calendar._TT["MON_FIRST"] = "Pirma savaitës diena - pirmadienis";
+Calendar._TT["SUN_FIRST"] = "Pirma savaitës diena - sekmadienis";
+Calendar._TT["CLOSE"] = "Uþdaryti";
+Calendar._TT["TODAY"] = "Ðiandien";
+Calendar._TT["TIME_PART"] = "Spustelkite arba tempkite jei norite pakeisti";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%A, %Y-%m-%d";
+
+Calendar._TT["WK"] = "sav";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-lv.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-lv.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-lv.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,123 @@
+// ** I18N
+
+// Calendar LV language
+// Author: Juris Valdovskis, <juris at dc.lv>
+// Encoding: cp1257
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Svçtdiena",
+ "Pirmdiena",
+ "Otrdiena",
+ "Treðdiena",
+ "Ceturdiena",
+ "Piektdiena",
+ "Sestdiena",
+ "Svçtdiena");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Sv",
+ "Pr",
+ "Ot",
+ "Tr",
+ "Ce",
+ "Pk",
+ "Se",
+ "Sv");
+
+// full month names
+Calendar._MN = new Array
+("Janvâris",
+ "Februâris",
+ "Marts",
+ "Aprîlis",
+ "Maijs",
+ "Jûnijs",
+ "Jûlijs",
+ "Augusts",
+ "Septembris",
+ "Oktobris",
+ "Novembris",
+ "Decembris");
+
+// short month names
+Calendar._SMN = new Array
+("Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "Mai",
+ "Jûn",
+ "Jûl",
+ "Aug",
+ "Sep",
+ "Okt",
+ "Nov",
+ "Dec");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Par kalendâru";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Datuma izvçle:\n" +
+"- Izmanto \xab, \xbb pogas, lai izvçlçtos gadu\n" +
+"- Izmanto " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "pogas, lai izvçlçtos mçnesi\n" +
+"- Turi nospiestu peles pogu uz jebkuru no augstâk minçtajâm pogâm, lai paâtrinâtu izvçli.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Laika izvçle:\n" +
+"- Uzklikðíini uz jebkuru no laika daïâm, lai palielinâtu to\n" +
+"- vai Shift-klikðíis, lai samazinâtu to\n" +
+"- vai noklikðíini un velc uz attiecîgo virzienu lai mainîtu âtrâk.";
+
+Calendar._TT["PREV_YEAR"] = "Iepr. gads (turi izvçlnei)";
+Calendar._TT["PREV_MONTH"] = "Iepr. mçnesis (turi izvçlnei)";
+Calendar._TT["GO_TODAY"] = "Ðodien";
+Calendar._TT["NEXT_MONTH"] = "Nâkoðais mçnesis (turi izvçlnei)";
+Calendar._TT["NEXT_YEAR"] = "Nâkoðais gads (turi izvçlnei)";
+Calendar._TT["SEL_DATE"] = "Izvçlies datumu";
+Calendar._TT["DRAG_TO_MOVE"] = "Velc, lai pârvietotu";
+Calendar._TT["PART_TODAY"] = " (ðodien)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "Attçlot %s kâ pirmo";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "1,7";
+
+Calendar._TT["CLOSE"] = "Aizvçrt";
+Calendar._TT["TODAY"] = "Ðodien";
+Calendar._TT["TIME_PART"] = "(Shift-)Klikðíis vai pârvieto, lai mainîtu";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b";
+
+Calendar._TT["WK"] = "wk";
+Calendar._TT["TIME"] = "Laiks:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-nl.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-nl.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-nl.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,73 @@
+// ** I18N
+Calendar._DN = new Array
+("Zondag",
+ "Maandag",
+ "Dinsdag",
+ "Woensdag",
+ "Donderdag",
+ "Vrijdag",
+ "Zaterdag",
+ "Zondag");
+
+Calendar._SDN_len = 2;
+
+Calendar._MN = new Array
+("Januari",
+ "Februari",
+ "Maart",
+ "April",
+ "Mei",
+ "Juni",
+ "Juli",
+ "Augustus",
+ "September",
+ "Oktober",
+ "November",
+ "December");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Info";
+
+Calendar._TT["ABOUT"] =
+"DHTML Datum/Tijd Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" +
+"Ga voor de meest recente versie naar: http://www.dynarch.com/projects/calendar/\n" +
+"Verspreid onder de GNU LGPL. Zie http://gnu.org/licenses/lgpl.html voor details." +
+"\n\n" +
+"Datum selectie:\n" +
+"- Gebruik de \xab \xbb knoppen om een jaar te selecteren\n" +
+"- Gebruik de " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " knoppen om een maand te selecteren\n" +
+"- Houd de muis ingedrukt op de genoemde knoppen voor een snellere selectie.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Tijd selectie:\n" +
+"- Klik op een willekeurig onderdeel van het tijd gedeelte om het te verhogen\n" +
+"- of Shift-klik om het te verlagen\n" +
+"- of klik en sleep voor een snellere selectie.";
+
+//Calendar._TT["TOGGLE"] = "Selecteer de eerste week-dag";
+Calendar._TT["PREV_YEAR"] = "Vorig jaar (ingedrukt voor menu)";
+Calendar._TT["PREV_MONTH"] = "Vorige maand (ingedrukt voor menu)";
+Calendar._TT["GO_TODAY"] = "Ga naar Vandaag";
+Calendar._TT["NEXT_MONTH"] = "Volgende maand (ingedrukt voor menu)";
+Calendar._TT["NEXT_YEAR"] = "Volgend jaar (ingedrukt voor menu)";
+Calendar._TT["SEL_DATE"] = "Selecteer datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Klik en sleep om te verplaatsen";
+Calendar._TT["PART_TODAY"] = " (vandaag)";
+//Calendar._TT["MON_FIRST"] = "Toon Maandag eerst";
+//Calendar._TT["SUN_FIRST"] = "Toon Zondag eerst";
+
+Calendar._TT["DAY_FIRST"] = "Toon %s eerst";
+
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Sluiten";
+Calendar._TT["TODAY"] = "(vandaag)";
+Calendar._TT["TIME_PART"] = "(Shift-)Klik of sleep om de waarde te veranderen";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b %Y";
+
+Calendar._TT["WK"] = "wk";
+Calendar._TT["TIME"] = "Tijd:";
\ No newline at end of file
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-no.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-no.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-no.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,114 @@
+// ** I18N
+
+// Calendar NO language
+// Author: Daniel Holmen, <daniel.holmen at ciber.no>
+// Encoding: UTF-8
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Søndag",
+ "Mandag",
+ "Tirsdag",
+ "Onsdag",
+ "Torsdag",
+ "Fredag",
+ "Lørdag",
+ "Søndag");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Søn",
+ "Man",
+ "Tir",
+ "Ons",
+ "Tor",
+ "Fre",
+ "Lør",
+ "Søn");
+
+// full month names
+Calendar._MN = new Array
+("Januar",
+ "Februar",
+ "Mars",
+ "April",
+ "Mai",
+ "Juni",
+ "Juli",
+ "August",
+ "September",
+ "Oktober",
+ "November",
+ "Desember");
+
+// short month names
+Calendar._SMN = new Array
+("Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "Mai",
+ "Jun",
+ "Jul",
+ "Aug",
+ "Sep",
+ "Okt",
+ "Nov",
+ "Des");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Om kalenderen";
+
+Calendar._TT["ABOUT"] =
+"DHTML Dato-/Tidsvelger\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"For nyeste versjon, gå til: http://www.dynarch.com/projects/calendar/\n" +
+"Distribuert under GNU LGPL. Se http://gnu.org/licenses/lgpl.html for detaljer." +
+"\n\n" +
+"Datovalg:\n" +
+"- Bruk knappene \xab og \xbb for å velge år\n" +
+"- Bruk knappene " + String.fromCharCode(0x2039) + " og " + String.fromCharCode(0x203a) + " for å velge måned\n" +
+"- Hold inne musknappen eller knappene over for raskere valg.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Tidsvalg:\n" +
+"- Klikk på en av tidsdelene for å øke den\n" +
+"- eller Shift-klikk for å senke verdien\n" +
+"- eller klikk-og-dra for raskere valg..";
+
+Calendar._TT["PREV_YEAR"] = "Forrige. år (hold for meny)";
+Calendar._TT["PREV_MONTH"] = "Forrige. måned (hold for meny)";
+Calendar._TT["GO_TODAY"] = "GÃ¥ til idag";
+Calendar._TT["NEXT_MONTH"] = "Neste måned (hold for meny)";
+Calendar._TT["NEXT_YEAR"] = "Neste år (hold for meny)";
+Calendar._TT["SEL_DATE"] = "Velg dato";
+Calendar._TT["DRAG_TO_MOVE"] = "Dra for å flytte";
+Calendar._TT["PART_TODAY"] = " (idag)";
+Calendar._TT["MON_FIRST"] = "Vis mandag først";
+Calendar._TT["SUN_FIRST"] = "Vis søndag først";
+Calendar._TT["CLOSE"] = "Lukk";
+Calendar._TT["TODAY"] = "Idag";
+Calendar._TT["TIME_PART"] = "(Shift-)Klikk eller dra for å endre verdi";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "uke";
\ No newline at end of file
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-pl-utf8.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-pl-utf8.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-pl-utf8.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,93 @@
+// ** I18N
+
+// Calendar PL language
+// Author: Dariusz Pietrzak, <eyck at ghost.anime.pl>
+// Author: Janusz Piwowarski, <jpiw at go2.pl>
+// Encoding: utf-8
+// Distributed under the same terms as the calendar itself.
+
+Calendar._DN = new Array
+("Niedziela",
+ "PoniedziaÅek",
+ "Wtorek",
+ "Åroda",
+ "Czwartek",
+ "PiÄ
tek",
+ "Sobota",
+ "Niedziela");
+Calendar._SDN = new Array
+("Nie",
+ "Pn",
+ "Wt",
+ "År",
+ "Cz",
+ "Pt",
+ "So",
+ "Nie");
+Calendar._MN = new Array
+("StyczeÅ",
+ "Luty",
+ "Marzec",
+ "KwiecieÅ",
+ "Maj",
+ "Czerwiec",
+ "Lipiec",
+ "SierpieÅ",
+ "WrzesieÅ",
+ "Październik",
+ "Listopad",
+ "GrudzieÅ");
+Calendar._SMN = new Array
+("Sty",
+ "Lut",
+ "Mar",
+ "Kwi",
+ "Maj",
+ "Cze",
+ "Lip",
+ "Sie",
+ "Wrz",
+ "Paź",
+ "Lis",
+ "Gru");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "O kalendarzu";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"Aby pobraÄ najnowszÄ
wersjÄ, odwiedź: http://www.dynarch.com/projects/calendar/\n" +
+"DostÄpny na licencji GNU LGPL. Zobacz szczegóÅy na http://gnu.org/licenses/lgpl.html." +
+"\n\n" +
+"Wybór daty:\n" +
+"- Użyj przycisków \xab, \xbb by wybraÄ rok\n" +
+"- Użyj przycisków " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " by wybraÄ miesiÄ
c\n" +
+"- Przytrzymaj klawisz myszy nad jednym z powyższych przycisków dla szybszego wyboru.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Wybór czasu:\n" +
+"- Kliknij na jednym z pól czasu by zwiÄkszyÄ jego wartoÅÄ\n" +
+"- lub kliknij trzymajÄ
c Shift by zmiejszyÄ jego wartoÅÄ\n" +
+"- lub kliknij i przeciÄ
gnij dla szybszego wyboru.";
+
+//Calendar._TT["TOGGLE"] = "ZmieÅ pierwszy dzieÅ tygodnia";
+Calendar._TT["PREV_YEAR"] = "Poprzedni rok (przytrzymaj dla menu)";
+Calendar._TT["PREV_MONTH"] = "Poprzedni miesiÄ
c (przytrzymaj dla menu)";
+Calendar._TT["GO_TODAY"] = "Idź do dzisiaj";
+Calendar._TT["NEXT_MONTH"] = "NastÄpny miesiÄ
c (przytrzymaj dla menu)";
+Calendar._TT["NEXT_YEAR"] = "NastÄpny rok (przytrzymaj dla menu)";
+Calendar._TT["SEL_DATE"] = "Wybierz datÄ";
+Calendar._TT["DRAG_TO_MOVE"] = "PrzeciÄ
gnij by przesunÄ
Ä";
+Calendar._TT["PART_TODAY"] = " (dzisiaj)";
+Calendar._TT["MON_FIRST"] = "WyÅwietl poniedziaÅek jako pierwszy";
+Calendar._TT["SUN_FIRST"] = "WyÅwietl niedzielÄ jako pierwszÄ
";
+Calendar._TT["CLOSE"] = "Zamknij";
+Calendar._TT["TODAY"] = "Dzisiaj";
+Calendar._TT["TIME_PART"] = "(Shift-)Kliknij lub przeciÄ
gnij by zmieniÄ wartoÅÄ";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%e %B, %A";
+
+Calendar._TT["WK"] = "ty";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-pl.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-pl.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-pl.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,56 @@
+// ** I18N
+// Calendar PL language
+// Author: Artur Filipiak, <imagen at poczta.fm>
+// January, 2004
+// Encoding: UTF-8
+Calendar._DN = new Array
+("Niedziela", "PoniedziaÅek", "Wtorek", "Åroda", "Czwartek", "PiÄ
tek", "Sobota", "Niedziela");
+
+Calendar._SDN = new Array
+("N", "Pn", "Wt", "År", "Cz", "Pt", "So", "N");
+
+Calendar._MN = new Array
+("StyczeÅ", "Luty", "Marzec", "KwiecieÅ", "Maj", "Czerwiec", "Lipiec", "SierpieÅ", "WrzesieÅ", "Październik", "Listopad", "GrudzieÅ");
+
+Calendar._SMN = new Array
+("Sty", "Lut", "Mar", "Kwi", "Maj", "Cze", "Lip", "Sie", "Wrz", "Paź", "Lis", "Gru");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "O kalendarzu";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Wybór daty:\n" +
+"- aby wybraÄ rok użyj przycisków \xab, \xbb\n" +
+"- aby wybraÄ miesiÄ
c użyj przycisków " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" +
+"- aby przyspieszyÄ wybór przytrzymaj wciÅniÄty przycisk myszy nad ww. przyciskami.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Wybór czasu:\n" +
+"- aby zwiÄkszyÄ wartoÅÄ kliknij na dowolnym elemencie selekcji czasu\n" +
+"- aby zmniejszyÄ wartoÅÄ użyj dodatkowo klawisza Shift\n" +
+"- możesz również poruszaÄ myszkÄ w lewo i prawo wraz z wciÅniÄtym lewym klawiszem.";
+
+Calendar._TT["PREV_YEAR"] = "Poprz. rok (przytrzymaj dla menu)";
+Calendar._TT["PREV_MONTH"] = "Poprz. miesiÄ
c (przytrzymaj dla menu)";
+Calendar._TT["GO_TODAY"] = "Pokaż dziÅ";
+Calendar._TT["NEXT_MONTH"] = "Nast. miesiÄ
c (przytrzymaj dla menu)";
+Calendar._TT["NEXT_YEAR"] = "Nast. rok (przytrzymaj dla menu)";
+Calendar._TT["SEL_DATE"] = "Wybierz datÄ";
+Calendar._TT["DRAG_TO_MOVE"] = "PrzesuÅ okienko";
+Calendar._TT["PART_TODAY"] = " (dziÅ)";
+Calendar._TT["MON_FIRST"] = "Pokaż PoniedziaÅek jako pierwszy";
+Calendar._TT["SUN_FIRST"] = "Pokaż NiedzielÄ jako pierwszÄ
";
+Calendar._TT["CLOSE"] = "Zamknij";
+Calendar._TT["TODAY"] = "DziÅ";
+Calendar._TT["TIME_PART"] = "(Shift-)klik | drag, aby zmieniÄ wartoÅÄ";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y.%m.%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "wk";
\ No newline at end of file
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-pt.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-pt.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-pt.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,123 @@
+// ** I18N
+
+// Calendar pt_BR language
+// Author: Adalberto Machado, <betosm at terra.com.br>
+// Encoding: any
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Domingo",
+ "Segunda",
+ "Terca",
+ "Quarta",
+ "Quinta",
+ "Sexta",
+ "Sabado",
+ "Domingo");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Dom",
+ "Seg",
+ "Ter",
+ "Qua",
+ "Qui",
+ "Sex",
+ "Sab",
+ "Dom");
+
+// full month names
+Calendar._MN = new Array
+("Janeiro",
+ "Fevereiro",
+ "Marco",
+ "Abril",
+ "Maio",
+ "Junho",
+ "Julho",
+ "Agosto",
+ "Setembro",
+ "Outubro",
+ "Novembro",
+ "Dezembro");
+
+// short month names
+Calendar._SMN = new Array
+("Jan",
+ "Fev",
+ "Mar",
+ "Abr",
+ "Mai",
+ "Jun",
+ "Jul",
+ "Ago",
+ "Set",
+ "Out",
+ "Nov",
+ "Dez");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Sobre o calendario";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"Ultima versao visite: http://www.dynarch.com/projects/calendar/\n" +
+"Distribuido sobre GNU LGPL. Veja http://gnu.org/licenses/lgpl.html para detalhes." +
+"\n\n" +
+"Selecao de data:\n" +
+"- Use os botoes \xab, \xbb para selecionar o ano\n" +
+"- Use os botoes " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para selecionar o mes\n" +
+"- Segure o botao do mouse em qualquer um desses botoes para selecao rapida.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Selecao de hora:\n" +
+"- Clique em qualquer parte da hora para incrementar\n" +
+"- ou Shift-click para decrementar\n" +
+"- ou clique e segure para selecao rapida.";
+
+Calendar._TT["PREV_YEAR"] = "Ant. ano (segure para menu)";
+Calendar._TT["PREV_MONTH"] = "Ant. mes (segure para menu)";
+Calendar._TT["GO_TODAY"] = "Hoje";
+Calendar._TT["NEXT_MONTH"] = "Prox. mes (segure para menu)";
+Calendar._TT["NEXT_YEAR"] = "Prox. ano (segure para menu)";
+Calendar._TT["SEL_DATE"] = "Selecione a data";
+Calendar._TT["DRAG_TO_MOVE"] = "Arraste para mover";
+Calendar._TT["PART_TODAY"] = " (hoje)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "Mostre %s primeiro";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Fechar";
+Calendar._TT["TODAY"] = "Hoje";
+Calendar._TT["TIME_PART"] = "(Shift-)Click ou arraste para mudar valor";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b";
+
+Calendar._TT["WK"] = "sm";
+Calendar._TT["TIME"] = "Hora:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ro.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ro.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ro.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,66 @@
+// ** I18N
+Calendar._DN = new Array
+("DuminicÄ",
+ "Luni",
+ "Marţi",
+ "Miercuri",
+ "Joi",
+ "Vineri",
+ "SâmbÄtÄ",
+ "DuminicÄ");
+Calendar._SDN_len = 2;
+Calendar._MN = new Array
+("Ianuarie",
+ "Februarie",
+ "Martie",
+ "Aprilie",
+ "Mai",
+ "Iunie",
+ "Iulie",
+ "August",
+ "Septembrie",
+ "Octombrie",
+ "Noiembrie",
+ "Decembrie");
+
+// tooltips
+Calendar._TT = {};
+
+Calendar._TT["INFO"] = "Despre calendar";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"Pentru ultima versiune vizitaţi: http://www.dynarch.com/projects/calendar/\n" +
+"Distribuit sub GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Selecţia datei:\n" +
+"- Folosiţi butoanele \xab, \xbb pentru a selecta anul\n" +
+"- Folosiţi butoanele " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pentru a selecta luna\n" +
+"- TineÅ£i butonul mouse-ului apÄsat pentru selecÅ£ie mai rapidÄ.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Selecţia orei:\n" +
+"- Click pe ora sau minut pentru a mÄri valoarea cu 1\n" +
+"- Sau Shift-Click pentru a micÅora valoarea cu 1\n" +
+"- Sau Click Åi drag pentru a selecta mai repede.";
+
+Calendar._TT["PREV_YEAR"] = "Anul precedent (lung pt menu)";
+Calendar._TT["PREV_MONTH"] = "Luna precedentÄ (lung pt menu)";
+Calendar._TT["GO_TODAY"] = "Data de azi";
+Calendar._TT["NEXT_MONTH"] = "Luna urmÄtoare (lung pt menu)";
+Calendar._TT["NEXT_YEAR"] = "Anul urmÄtor (lung pt menu)";
+Calendar._TT["SEL_DATE"] = "SelecteazÄ data";
+Calendar._TT["DRAG_TO_MOVE"] = "Trage pentru a miÅca";
+Calendar._TT["PART_TODAY"] = " (astÄzi)";
+Calendar._TT["DAY_FIRST"] = "AfiÅeazÄ %s prima zi";
+Calendar._TT["WEEKEND"] = "0,6";
+Calendar._TT["CLOSE"] = "Ãnchide";
+Calendar._TT["TODAY"] = "AstÄzi";
+Calendar._TT["TIME_PART"] = "(Shift-)Click sau drag pentru a selecta";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%A, %d %B";
+
+Calendar._TT["WK"] = "spt";
+Calendar._TT["TIME"] = "Ora:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ru.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ru.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ru.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,123 @@
+// ** I18N
+
+// Calendar RU language
+// Translation: Sly Golovanov, http://golovanov.net, <sly at golovanov.net>
+// Encoding: any
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("воÑкÑеÑенÑе",
+ "понеделÑник",
+ "вÑоÑник",
+ "ÑÑеда",
+ "ÑеÑвеÑг",
+ "пÑÑниÑа",
+ "ÑÑббоÑа",
+ "воÑкÑеÑенÑе");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("вÑк",
+ "пон",
+ "вÑÑ",
+ "ÑÑд",
+ "ÑеÑ",
+ "пÑÑ",
+ "ÑÑб",
+ "вÑк");
+
+// full month names
+Calendar._MN = new Array
+("ÑнваÑÑ",
+ "ÑевÑалÑ",
+ "маÑÑ",
+ "апÑелÑ",
+ "май",
+ "иÑнÑ",
+ "иÑлÑ",
+ "авгÑÑÑ",
+ "ÑенÑÑбÑÑ",
+ "окÑÑбÑÑ",
+ "ноÑбÑÑ",
+ "декабÑÑ");
+
+// short month names
+Calendar._SMN = new Array
+("Ñнв",
+ "Ñев",
+ "маÑ",
+ "апÑ",
+ "май",
+ "иÑн",
+ "иÑл",
+ "авг",
+ "Ñен",
+ "окÑ",
+ "ноÑ",
+ "дек");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "РкалендаÑе...";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Ðак вÑбÑаÑÑ Ð´Ð°ÑÑ:\n" +
+"- ÐÑи помоÑи кнопок \xab, \xbb можно вÑбÑаÑÑ Ð³Ð¾Ð´\n" +
+"- ÐÑи помоÑи кнопок " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " можно вÑбÑаÑÑ Ð¼ÐµÑÑÑ\n" +
+"- ÐодеÑжиÑе ÑÑи кнопки нажаÑÑми, ÑÑÐ¾Ð±Ñ Ð¿Ð¾ÑвилоÑÑ Ð¼ÐµÐ½Ñ Ð±ÑÑÑÑого вÑбоÑа.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Ðак вÑбÑаÑÑ Ð²ÑемÑ:\n" +
+"- ÐÑи клике на ÑаÑаÑ
или минÑÑаÑ
они ÑвелиÑиваÑÑÑÑ\n" +
+"- пÑи клике Ñ Ð½Ð°Ð¶Ð°Ñой клавиÑей Shift они ÑменÑÑаÑÑÑÑ\n" +
+"- еÑли нажаÑÑ Ð¸ двигаÑÑ Ð¼ÑÑкой влево/впÑаво, они бÑдÑÑ Ð¼ÐµÐ½ÑÑÑÑÑ Ð±ÑÑÑÑее.";
+
+Calendar._TT["PREV_YEAR"] = "Ðа год назад (ÑдеÑживаÑÑ Ð´Ð»Ñ Ð¼ÐµÐ½Ñ)";
+Calendar._TT["PREV_MONTH"] = "Ðа меÑÑÑ Ð½Ð°Ð·Ð°Ð´ (ÑдеÑживаÑÑ Ð´Ð»Ñ Ð¼ÐµÐ½Ñ)";
+Calendar._TT["GO_TODAY"] = "СегоднÑ";
+Calendar._TT["NEXT_MONTH"] = "Ðа меÑÑÑ Ð²Ð¿ÐµÑед (ÑдеÑживаÑÑ Ð´Ð»Ñ Ð¼ÐµÐ½Ñ)";
+Calendar._TT["NEXT_YEAR"] = "Ðа год впеÑед (ÑдеÑживаÑÑ Ð´Ð»Ñ Ð¼ÐµÐ½Ñ)";
+Calendar._TT["SEL_DATE"] = "ÐÑбеÑиÑе даÑÑ";
+Calendar._TT["DRAG_TO_MOVE"] = "ÐеÑеÑаÑкивайÑе мÑÑкой";
+Calendar._TT["PART_TODAY"] = " (ÑегоднÑ)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "ÐеÑвÑй Ð´ÐµÐ½Ñ Ð½ÐµÐ´ÐµÐ»Ð¸ бÑÐ´ÐµÑ %s";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "ÐакÑÑÑÑ";
+Calendar._TT["TODAY"] = "СегоднÑ";
+Calendar._TT["TIME_PART"] = "(Shift-)клик или нажаÑÑ Ð¸ двигаÑÑ";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%e %b, %a";
+
+Calendar._TT["WK"] = "нед";
+Calendar._TT["TIME"] = "ÐÑемÑ:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ru_win_.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ru_win_.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-ru_win_.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,123 @@
+// ** I18N
+
+// Calendar RU language
+// Translation: Sly Golovanov, http://golovanov.net, <sly at golovanov.net>
+// Encoding: any
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("âîñêðåñåíüå",
+ "ïîíåäåëüíèê",
+ "âòîðíèê",
+ "ñðåäà",
+ "÷åòâåðã",
+ "ïÿòíèöà",
+ "ñóááîòà",
+ "âîñêðåñåíüå");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("âñê",
+ "ïîí",
+ "âòð",
+ "ñðä",
+ "÷åò",
+ "ïÿò",
+ "ñóá",
+ "âñê");
+
+// full month names
+Calendar._MN = new Array
+("ÿíâàðü",
+ "ôåâðàëü",
+ "ìàðò",
+ "àïðåëü",
+ "ìàé",
+ "èþíü",
+ "èþëü",
+ "àâãóñò",
+ "ñåíòÿáðü",
+ "îêòÿáðü",
+ "íîÿáðü",
+ "äåêàáðü");
+
+// short month names
+Calendar._SMN = new Array
+("ÿíâ",
+ "ôåâ",
+ "ìàð",
+ "àïð",
+ "ìàé",
+ "èþí",
+ "èþë",
+ "àâã",
+ "ñåí",
+ "îêò",
+ "íîÿ",
+ "äåê");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Î êàëåíäàðå...";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Êàê âûáðàòü äàòó:\n" +
+"- Ïðè ïîìîùè êíîïîê \xab, \xbb ìîæíî âûáðàòü ãîä\n" +
+"- Ïðè ïîìîùè êíîïîê " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " ìîæíî âûáðàòü ìåñÿö\n" +
+"- Ïîäåðæèòå ýòè êíîïêè íàæàòûìè, ÷òîáû ïîÿâèëîñü ìåíþ áûñòðîãî âûáîðà.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Êàê âûáðàòü âðåìÿ:\n" +
+"- Ïðè êëèêå íà ÷àñàõ èëè ìèíóòàõ îíè óâåëè÷èâàþòñÿ\n" +
+"- ïðè êëèêå ñ íàæàòîé êëàâèøåé Shift îíè óìåíüøàþòñÿ\n" +
+"- åñëè íàæàòü è äâèãàòü ìûøêîé âëåâî/âïðàâî, îíè áóäóò ìåíÿòüñÿ áûñòðåå.";
+
+Calendar._TT["PREV_YEAR"] = "Íà ãîä íàçàä (óäåðæèâàòü äëÿ ìåíþ)";
+Calendar._TT["PREV_MONTH"] = "Íà ìåñÿö íàçàä (óäåðæèâàòü äëÿ ìåíþ)";
+Calendar._TT["GO_TODAY"] = "Ñåãîäíÿ";
+Calendar._TT["NEXT_MONTH"] = "Íà ìåñÿö âïåðåä (óäåðæèâàòü äëÿ ìåíþ)";
+Calendar._TT["NEXT_YEAR"] = "Íà ãîä âïåðåä (óäåðæèâàòü äëÿ ìåíþ)";
+Calendar._TT["SEL_DATE"] = "Âûáåðèòå äàòó";
+Calendar._TT["DRAG_TO_MOVE"] = "Ïåðåòàñêèâàéòå ìûøêîé";
+Calendar._TT["PART_TODAY"] = " (ñåãîäíÿ)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "Ïåðâûé äåíü íåäåëè áóäåò %s";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Çàêðûòü";
+Calendar._TT["TODAY"] = "Ñåãîäíÿ";
+Calendar._TT["TIME_PART"] = "(Shift-)êëèê èëè íàæàòü è äâèãàòü";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%e %b, %a";
+
+Calendar._TT["WK"] = "íåä";
+Calendar._TT["TIME"] = "Âðåìÿ:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-schinese.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-schinese.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-schinese.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,119 @@
+// ** I18N
+
+// Calendar ZH language
+// Author: muziq, <muziq at sina.com>
+// Encoding: GB2312 or GBK
+// Distributed under the same terms as the calendar itself.
+
+// full day names
+Calendar._DN = new Array
+("ÐÇÆÚÈÕ",
+ "ÐÇÆÚÒ»",
+ "ÐÇÆÚ¶þ",
+ "ÐÇÆÚÈý",
+ "ÐÇÆÚËÄ",
+ "ÐÇÆÚÎå",
+ "ÐÇÆÚÁù",
+ "ÐÇÆÚÈÕ");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("ÈÕ",
+ "Ò»",
+ "¶þ",
+ "Èý",
+ "ËÄ",
+ "Îå",
+ "Áù",
+ "ÈÕ");
+
+// full month names
+Calendar._MN = new Array
+("Ò»ÔÂ",
+ "¶þÔÂ",
+ "ÈýÔÂ",
+ "ËÄÔÂ",
+ "ÎåÔÂ",
+ "ÁùÔÂ",
+ "ÆßÔÂ",
+ "°ËÔÂ",
+ "¾ÅÔÂ",
+ "Ê®ÔÂ",
+ "ʮһÔÂ",
+ "Ê®¶þÔÂ");
+
+// short month names
+Calendar._SMN = new Array
+("Ò»ÔÂ",
+ "¶þÔÂ",
+ "ÈýÔÂ",
+ "ËÄÔÂ",
+ "ÎåÔÂ",
+ "ÁùÔÂ",
+ "ÆßÔÂ",
+ "°ËÔÂ",
+ "¾ÅÔÂ",
+ "Ê®ÔÂ",
+ "ʮһÔÂ",
+ "Ê®¶þÔÂ");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "°ïÖú";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Ñ¡ÔñÈÕÆÚ:\n" +
+"- µã»÷ \xab, \xbb °´Å¥Ñ¡ÔñÄê·Ý\n" +
+"- µã»÷ " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " °´Å¥Ñ¡ÔñÔ·Ý\n" +
+"- ³¤°´ÒÔÉϰ´Å¥¿É´Ó²Ëµ¥ÖпìËÙÑ¡ÔñÄê·Ý»òÔ·Ý";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Ñ¡Ôñʱ¼ä:\n" +
+"- µã»÷Сʱ»ò·ÖÖÓ¿Éʹ¸ÄÊýÖµ¼ÓÒ»\n" +
+"- °´×¡Shift¼üµã»÷Сʱ»ò·ÖÖÓ¿Éʹ¸ÄÊýÖµ¼õÒ»\n" +
+"- µã»÷Í϶¯Êó±ê¿É½øÐпìËÙÑ¡Ôñ";
+
+Calendar._TT["PREV_YEAR"] = "ÉÏÒ»Äê (°´×¡³ö²Ëµ¥)";
+Calendar._TT["PREV_MONTH"] = "ÉÏÒ»Ô (°´×¡³ö²Ëµ¥)";
+Calendar._TT["GO_TODAY"] = "תµ½½ñÈÕ";
+Calendar._TT["NEXT_MONTH"] = "ÏÂÒ»Ô (°´×¡³ö²Ëµ¥)";
+Calendar._TT["NEXT_YEAR"] = "ÏÂÒ»Äê (°´×¡³ö²Ëµ¥)";
+Calendar._TT["SEL_DATE"] = "Ñ¡ÔñÈÕÆÚ";
+Calendar._TT["DRAG_TO_MOVE"] = "Í϶¯";
+Calendar._TT["PART_TODAY"] = " (½ñÈÕ)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "×î×ó±ßÏÔʾ%s";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "¹Ø±Õ";
+Calendar._TT["TODAY"] = "½ñÈÕ";
+Calendar._TT["TIME_PART"] = "(Shift-)µã»÷Êó±ê»òÍ϶¯¸Ä±äÖµ";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%A, %b %eÈÕ";
+
+Calendar._TT["WK"] = "ÖÜ";
+Calendar._TT["TIME"] = "ʱ¼ä:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-si.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-si.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-si.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,94 @@
+/* Slovenian language file for the DHTML Calendar version 0.9.2
+* Author David Milost <mercy at volja.net>, January 2004.
+* Feel free to use this script under the terms of the GNU Lesser General
+* Public License, as long as you do not remove or alter this notice.
+*/
+ // full day names
+Calendar._DN = new Array
+("Nedelja",
+ "Ponedeljek",
+ "Torek",
+ "Sreda",
+ "Äetrtek",
+ "Petek",
+ "Sobota",
+ "Nedelja");
+ // short day names
+ Calendar._SDN = new Array
+("Ned",
+ "Pon",
+ "Tor",
+ "Sre",
+ "Äet",
+ "Pet",
+ "Sob",
+ "Ned");
+// short month names
+Calendar._SMN = new Array
+("Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "Maj",
+ "Jun",
+ "Jul",
+ "Avg",
+ "Sep",
+ "Okt",
+ "Nov",
+ "Dec");
+ // full month names
+Calendar._MN = new Array
+("Januar",
+ "Februar",
+ "Marec",
+ "April",
+ "Maj",
+ "Junij",
+ "Julij",
+ "Avgust",
+ "September",
+ "Oktober",
+ "November",
+ "December");
+
+// tooltips
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "O koledarju";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"Za zadnjo verzijo pojdine na naslov: http://www.dynarch.com/projects/calendar/\n" +
+"Distribuirano pod GNU LGPL. Poglejte http://gnu.org/licenses/lgpl.html za podrobnosti." +
+"\n\n" +
+"Izbor datuma:\n" +
+"- Uporabite \xab, \xbb gumbe za izbor leta\n" +
+"- Uporabite " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " gumbe za izbor meseca\n" +
+"- Zadržite klik na kateremkoli od zgornjih gumbov za hiter izbor.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Izbor Äasa:\n" +
+"- Kliknite na katerikoli del Äasa za poveÄ. le-tega\n" +
+"- ali Shift-click za zmanj. le-tega\n" +
+"- ali kliknite in povlecite za hiter izbor.";
+
+Calendar._TT["TOGGLE"] = "Spremeni dan s katerim se priÄne teden";
+Calendar._TT["PREV_YEAR"] = "Predhodnje leto (dolg klik za meni)";
+Calendar._TT["PREV_MONTH"] = "Predhodnji mesec (dolg klik za meni)";
+Calendar._TT["GO_TODAY"] = "Pojdi na tekoÄi dan";
+Calendar._TT["NEXT_MONTH"] = "Naslednji mesec (dolg klik za meni)";
+Calendar._TT["NEXT_YEAR"] = "Naslednje leto (dolg klik za meni)";
+Calendar._TT["SEL_DATE"] = "Izberite datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Pritisni in povleci za spremembo pozicije";
+Calendar._TT["PART_TODAY"] = " (danes)";
+Calendar._TT["MON_FIRST"] = "Prikaži ponedeljek kot prvi dan";
+Calendar._TT["SUN_FIRST"] = "Prikaži nedeljo kot prvi dan";
+Calendar._TT["CLOSE"] = "Zapri";
+Calendar._TT["TODAY"] = "Danes";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "Ted";
\ No newline at end of file
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-sk.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-sk.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-sk.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,99 @@
+// ** I18N
+
+// Calendar SK language
+// Author: Peter Valach (pvalach at gmx.net)
+// Encoding: utf-8
+// Last update: 2003/10/29
+// Distributed under the same terms as the calendar itself.
+
+// full day names
+Calendar._DN = new Array
+("NedeÃľa",
+ "Pondelok",
+ "Utorok",
+ "Streda",
+ "Ĺ tvrtok",
+ "Piatok",
+ "Sobota",
+ "NedeÃľa");
+
+// short day names
+Calendar._SDN = new Array
+("Ned",
+ "Pon",
+ "Uto",
+ "Str",
+ "Ĺ tv",
+ "Pia",
+ "Sob",
+ "Ned");
+
+// full month names
+Calendar._MN = new Array
+("JanuÄËr",
+ "FebruÄËr",
+ "Marec",
+ "AprÄÂl",
+ "MÄËj",
+ "JÄÅn",
+ "JÄÅl",
+ "August",
+ "September",
+ "OktÄÅber",
+ "November",
+ "December");
+
+// short month names
+Calendar._SMN = new Array
+("Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "MÄËj",
+ "JÄÅn",
+ "JÄÅl",
+ "Aug",
+ "Sep",
+ "Okt",
+ "Nov",
+ "Dec");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "O kalendÄËri";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" +
+"PoslednÄÅ verziu nÄËjdete na: http://www.dynarch.com/projects/calendar/\n" +
+"DistribuovanÄ© pod GNU LGPL. ViÃŹ http://gnu.org/licenses/lgpl.html pre detaily." +
+"\n\n" +
+"VÄËber dÄËtumu:\n" +
+"- PouĹľite tlaÃŤidlÄË \xab, \xbb pre vÄËber roku\n" +
+"- PouĹľite tlaÃŤidlÄË " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pre vÄËber mesiaca\n" +
+"- Ak ktorÄ©koÃľvek z tÄËchto tlaÃŤidiel podrĹľÄÂte dlhĹËie, zobrazÄ sa rÄËchly vÄËber.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"VÄËber ÃŤasu:\n" +
+"- Kliknutie na niektorÄÅ poloĹľku ÃŤasu ju zvÄËĹËi\n" +
+"- Shift-klik ju znÄÂĹľi\n" +
+"- Ak podrĹľÄÂte tlaÃŤÄÂtko stlaÃŤenÄ©, posÄÅvanÄÂm menÄÂte hodnotu.";
+
+Calendar._TT["PREV_YEAR"] = "PredoĹËlÄË rok (podrĹľte pre menu)";
+Calendar._TT["PREV_MONTH"] = "PredoĹËlÄË mesiac (podrĹľte pre menu)";
+Calendar._TT["GO_TODAY"] = "PrejsÄ¹Ä na dneĹËok";
+Calendar._TT["NEXT_MONTH"] = "Nasl. mesiac (podrĹľte pre menu)";
+Calendar._TT["NEXT_YEAR"] = "Nasl. rok (podrĹľte pre menu)";
+Calendar._TT["SEL_DATE"] = "ZvoÃľte dÄËtum";
+Calendar._TT["DRAG_TO_MOVE"] = "PodrĹľanÄÂm tlaÃŤÄÂtka zmenÄÂte polohu";
+Calendar._TT["PART_TODAY"] = " (dnes)";
+Calendar._TT["MON_FIRST"] = "ZobraziÄ¹Ä pondelok ako prvÄË";
+Calendar._TT["SUN_FIRST"] = "ZobraziÄ¹Ä nedeÃľu ako prvÄÅ";
+Calendar._TT["CLOSE"] = "ZavrieĹÄ";
+Calendar._TT["TODAY"] = "Dnes";
+Calendar._TT["TIME_PART"] = "(Shift-)klik/ĹÄahanie zmenÄ hodnotu";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "$d. %m. %Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %e. %b";
+
+Calendar._TT["WK"] = "tÄËĹľ";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-sp.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-sp.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-sp.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,110 @@
+// ** I18N
+
+// Calendar SP language
+// Author: Rafael Velasco <rvu_at_idecnet_dot_com>
+// Encoding: any
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Domingo",
+ "Lunes",
+ "Martes",
+ "Miercoles",
+ "Jueves",
+ "Viernes",
+ "Sabado",
+ "Domingo");
+
+Calendar._SDN = new Array
+("Dom",
+ "Lun",
+ "Mar",
+ "Mie",
+ "Jue",
+ "Vie",
+ "Sab",
+ "Dom");
+
+// full month names
+Calendar._MN = new Array
+("Enero",
+ "Febrero",
+ "Marzo",
+ "Abril",
+ "Mayo",
+ "Junio",
+ "Julio",
+ "Agosto",
+ "Septiembre",
+ "Octubre",
+ "Noviembre",
+ "Diciembre");
+
+// short month names
+Calendar._SMN = new Array
+("Ene",
+ "Feb",
+ "Mar",
+ "Abr",
+ "May",
+ "Jun",
+ "Jul",
+ "Ago",
+ "Sep",
+ "Oct",
+ "Nov",
+ "Dic");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Información del Calendario";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"Nuevas versiones en: http://www.dynarch.com/projects/calendar/\n" +
+"Distribuida bajo licencia GNU LGPL. Para detalles vea http://gnu.org/licenses/lgpl.html ." +
+"\n\n" +
+"Selección de Fechas:\n" +
+"- Use \xab, \xbb para seleccionar el año\n" +
+"- Use " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para seleccionar el mes\n" +
+"- Mantenga presionado el botón del ratón en cualquiera de las opciones superiores para un acceso rapido .";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Selección del Reloj:\n" +
+"- Seleccione la hora para cambiar el reloj\n" +
+"- o presione Shift-click para disminuirlo\n" +
+"- o presione click y arrastre del ratón para una selección rapida.";
+
+Calendar._TT["PREV_YEAR"] = "Año anterior (Presione para menu)";
+Calendar._TT["PREV_MONTH"] = "Mes Anterior (Presione para menu)";
+Calendar._TT["GO_TODAY"] = "Ir a Hoy";
+Calendar._TT["NEXT_MONTH"] = "Mes Siguiente (Presione para menu)";
+Calendar._TT["NEXT_YEAR"] = "Año Siguiente (Presione para menu)";
+Calendar._TT["SEL_DATE"] = "Seleccione fecha";
+Calendar._TT["DRAG_TO_MOVE"] = "Arrastre y mueva";
+Calendar._TT["PART_TODAY"] = " (Hoy)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "Mostrar %s primero";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Cerrar";
+Calendar._TT["TODAY"] = "Hoy";
+Calendar._TT["TIME_PART"] = "(Shift-)Click o arrastra para cambar el valor";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%dd-%mm-%yy";
+Calendar._TT["TT_DATE_FORMAT"] = "%A, %e de %B de %Y";
+
+Calendar._TT["WK"] = "Sm";
+Calendar._TT["TIME"] = "Hora:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-sv.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-sv.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-sv.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,93 @@
+// ** I18N
+
+// Calendar SV language (Swedish, svenska)
+// Author: Mihai Bazon, <mihai_bazon at yahoo.com>
+// Translation team: <sv at li.org>
+// Translator: Leonard Norrgård <leonard.norrgard at refactor.fi>
+// Last translator: Leonard Norrgård <leonard.norrgard at refactor.fi>
+// Encoding: iso-latin-1
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("söndag",
+ "måndag",
+ "tisdag",
+ "onsdag",
+ "torsdag",
+ "fredag",
+ "lördag",
+ "söndag");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+Calendar._SDN_len = 2;
+Calendar._SMN_len = 3;
+
+// full month names
+Calendar._MN = new Array
+("januari",
+ "februari",
+ "mars",
+ "april",
+ "maj",
+ "juni",
+ "juli",
+ "augusti",
+ "september",
+ "oktober",
+ "november",
+ "december");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Om kalendern";
+
+Calendar._TT["ABOUT"] =
+"DHTML Datum/tid-väljare\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"För senaste version gå till: http://www.dynarch.com/projects/calendar/\n" +
+"Distribueras under GNU LGPL. Se http://gnu.org/licenses/lgpl.html för detaljer." +
+"\n\n" +
+"Val av datum:\n" +
+"- Använd knapparna \xab, \xbb för att välja år\n" +
+"- Använd knapparna " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " för att välja månad\n" +
+"- Håll musknappen nedtryckt på någon av ovanstående knappar för snabbare val.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Val av tid:\n" +
+"- Klicka på en del av tiden för att öka den delen\n" +
+"- eller skift-klicka för att minska den\n" +
+"- eller klicka och drag för snabbare val.";
+
+Calendar._TT["PREV_YEAR"] = "Föregående år (håll för menu)";
+Calendar._TT["PREV_MONTH"] = "Föregående månad (håll för menu)";
+Calendar._TT["GO_TODAY"] = "Gå till dagens datum";
+Calendar._TT["NEXT_MONTH"] = "Följande månad (håll för menu)";
+Calendar._TT["NEXT_YEAR"] = "Följande år (håll för menu)";
+Calendar._TT["SEL_DATE"] = "Välj datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Drag för att flytta";
+Calendar._TT["PART_TODAY"] = " (idag)";
+Calendar._TT["MON_FIRST"] = "Visa måndag först";
+Calendar._TT["SUN_FIRST"] = "Visa söndag först";
+Calendar._TT["CLOSE"] = "Stäng";
+Calendar._TT["TODAY"] = "Idag";
+Calendar._TT["TIME_PART"] = "(Skift-)klicka eller drag för att ändra tid";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%A %d %b %Y";
+
+Calendar._TT["WK"] = "vecka";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-tchinese.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-tchinese.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-tchinese.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,123 @@
+// ** I18N
+
+// Calendar big5 language
+// Author: Gary Fu, <gary at garyfu.idv.tw>
+// Encoding: big5
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("¬P´Á¤é",
+ "¬P´Á¤@",
+ "¬P´Á¤G",
+ "¬P´Á¤T",
+ "¬P´Á¥|",
+ "¬P´Á¤",
+ "¬P´Á¤»",
+ "¬P´Á¤é");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("¤é",
+ "¤@",
+ "¤G",
+ "¤T",
+ "¥|",
+ "¤",
+ "¤»",
+ "¤é");
+
+// full month names
+Calendar._MN = new Array
+("¤@¤ë",
+ "¤G¤ë",
+ "¤T¤ë",
+ "¥|¤ë",
+ "¤¤ë",
+ "¤»¤ë",
+ "¤C¤ë",
+ "¤K¤ë",
+ "¤E¤ë",
+ "¤Q¤ë",
+ "¤Q¤@¤ë",
+ "¤Q¤G¤ë");
+
+// short month names
+Calendar._SMN = new Array
+("¤@¤ë",
+ "¤G¤ë",
+ "¤T¤ë",
+ "¥|¤ë",
+ "¤¤ë",
+ "¤»¤ë",
+ "¤C¤ë",
+ "¤K¤ë",
+ "¤E¤ë",
+ "¤Q¤ë",
+ "¤Q¤@¤ë",
+ "¤Q¤G¤ë");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Ãö©ó";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"¤é´Á¿ï¾Ü¤èªk:\n" +
+"- ¨Ï¥Î \xab, \xbb «ö¶s¥i¿ï¾Ü¦~¥÷\n" +
+"- ¨Ï¥Î " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " «ö¶s¥i¿ï¾Ü¤ë¥÷\n" +
+"- «ö¦í¤W±ªº«ö¶s¥i¥H¥[§Ö¿ï¨ú";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"®É¶¡¿ï¾Ü¤èªk:\n" +
+"- ÂIÀ»¥ô¦óªº®É¶¡³¡¥÷¥i¼W¥[¨äÈ\n" +
+"- ¦P®É«öShiftÁä¦AÂIÀ»¥i´î¤Ö¨äÈ\n" +
+"- ÂIÀ»¨Ã©ì¦²¥i¥[§Ö§ïÅܪºÈ";
+
+Calendar._TT["PREV_YEAR"] = "¤W¤@¦~ («ö¦í¿ï³æ)";
+Calendar._TT["PREV_MONTH"] = "¤U¤@¦~ («ö¦í¿ï³æ)";
+Calendar._TT["GO_TODAY"] = "¨ì¤µ¤é";
+Calendar._TT["NEXT_MONTH"] = "¤W¤@¤ë («ö¦í¿ï³æ)";
+Calendar._TT["NEXT_YEAR"] = "¤U¤@¤ë («ö¦í¿ï³æ)";
+Calendar._TT["SEL_DATE"] = "¿ï¾Ü¤é´Á";
+Calendar._TT["DRAG_TO_MOVE"] = "©ì¦²";
+Calendar._TT["PART_TODAY"] = " (¤µ¤é)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "±N %s Åã¥Ü¦b«e";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Ãö³¬";
+Calendar._TT["TODAY"] = "¤µ¤é";
+Calendar._TT["TIME_PART"] = "ÂIÀ»or©ì¦²¥i§ïÅܮɶ¡(¦P®É«öShift¬°´î)";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "¶g";
+Calendar._TT["TIME"] = "Time:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-tr.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-tr.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/calendar-tr.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,58 @@
+//////////////////////////////////////////////////////////////////////////////////////////////
+// Turkish Translation by Nuri AKMAN
+// Location: Ankara/TURKEY
+// e-mail : nuriakman at hotmail.com
+// Date : April, 9 2003
+//
+// Note: if Turkish Characters does not shown on you screen
+// please include falowing line your html code:
+//
+// <meta http-equiv="Content-Type" content="text/html; charset=windows-1254">
+//
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+// ** I18N
+Calendar._DN = new Array
+("Pazar",
+ "Pazartesi",
+ "Salý",
+ "Çarþamba",
+ "Perþembe",
+ "Cuma",
+ "Cumartesi",
+ "Pazar");
+Calendar._MN = new Array
+("Ocak",
+ "Þubat",
+ "Mart",
+ "Nisan",
+ "Mayýs",
+ "Haziran",
+ "Temmuz",
+ "Aðustos",
+ "Eylül",
+ "Ekim",
+ "Kasým",
+ "Aralýk");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Haftanýn ilk gününü kaydýr";
+Calendar._TT["PREV_YEAR"] = "Önceki Yýl (Menü için basýlý tutunuz)";
+Calendar._TT["PREV_MONTH"] = "Önceki Ay (Menü için basýlý tutunuz)";
+Calendar._TT["GO_TODAY"] = "Bugün'e git";
+Calendar._TT["NEXT_MONTH"] = "Sonraki Ay (Menü için basýlý tutunuz)";
+Calendar._TT["NEXT_YEAR"] = "Sonraki Yýl (Menü için basýlý tutunuz)";
+Calendar._TT["SEL_DATE"] = "Tarih seçiniz";
+Calendar._TT["DRAG_TO_MOVE"] = "Taþýmak için sürükleyiniz";
+Calendar._TT["PART_TODAY"] = " (bugün)";
+Calendar._TT["MON_FIRST"] = "Takvim Pazartesi gününden baþlasýn";
+Calendar._TT["SUN_FIRST"] = "Takvim Pazar gününden baþlasýn";
+Calendar._TT["CLOSE"] = "Kapat";
+Calendar._TT["TODAY"] = "Bugün";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
+Calendar._TT["TT_DATE_FORMAT"] = "d MM y, DD";
+
+Calendar._TT["WK"] = "Hafta";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/cn_utf8.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/cn_utf8.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/cn_utf8.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,123 @@
+// ** I18N
+
+// Calendar EN language
+// Author: Mihai Bazon, <mishoo at infoiasi.ro>
+// Encoding: any
+// Translator : Niko <nikoused at gmail.com>
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("\u5468\u65e5",//\u5468\u65e5
+ "\u5468\u4e00",//\u5468\u4e00
+ "\u5468\u4e8c",//\u5468\u4e8c
+ "\u5468\u4e09",//\u5468\u4e09
+ "\u5468\u56db",//\u5468\u56db
+ "\u5468\u4e94",//\u5468\u4e94
+ "\u5468\u516d",//\u5468\u516d
+ "\u5468\u65e5");//\u5468\u65e5
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("\u5468\u65e5",
+ "\u5468\u4e00",
+ "\u5468\u4e8c",
+ "\u5468\u4e09",
+ "\u5468\u56db",
+ "\u5468\u4e94",
+ "\u5468\u516d",
+ "\u5468\u65e5");
+
+// full month names
+Calendar._MN = new Array
+("\u4e00\u6708",
+ "\u4e8c\u6708",
+ "\u4e09\u6708",
+ "\u56db\u6708",
+ "\u4e94\u6708",
+ "\u516d\u6708",
+ "\u4e03\u6708",
+ "\u516b\u6708",
+ "\u4e5d\u6708",
+ "\u5341\u6708",
+ "\u5341\u4e00\u6708",
+ "\u5341\u4e8c\u6708");
+
+// short month names
+Calendar._SMN = new Array
+("\u4e00\u6708",
+ "\u4e8c\u6708",
+ "\u4e09\u6708",
+ "\u56db\u6708",
+ "\u4e94\u6708",
+ "\u516d\u6708",
+ "\u4e03\u6708",
+ "\u516b\u6708",
+ "\u4e5d\u6708",
+ "\u5341\u6708",
+ "\u5341\u4e00\u6708",
+ "\u5341\u4e8c\u6708");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "\u5173\u4e8e";
+
+Calendar._TT["ABOUT"] =
+" DHTML \u65e5\u8d77/\u65f6\u95f4\u9009\u62e9\u63a7\u4ef6\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"For latest version visit: \u6700\u65b0\u7248\u672c\u8bf7\u767b\u9646http://www.dynarch.com/projects/calendar/\u5bdf\u770b\n" +
+"\u9075\u5faaGNU LGPL. \u7ec6\u8282\u53c2\u9605 http://gnu.org/licenses/lgpl.html" +
+"\n\n" +
+"\u65e5\u671f\u9009\u62e9:\n" +
+"- \u70b9\u51fb\xab(\xbb)\u6309\u94ae\u9009\u62e9\u4e0a(\u4e0b)\u4e00\u5e74\u5ea6.\n" +
+"- \u70b9\u51fb" + String.fromCharCode(0x2039) + "(" + String.fromCharCode(0x203a) + ")\u6309\u94ae\u9009\u62e9\u4e0a(\u4e0b)\u4e2a\u6708\u4efd.\n" +
+"- \u957f\u65f6\u95f4\u6309\u7740\u6309\u94ae\u5c06\u51fa\u73b0\u66f4\u591a\u9009\u62e9\u9879.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"\u65f6\u95f4\u9009\u62e9:\n" +
+"-\u5728\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\u4e0a\u5355\u51fb\u9f20\u6807\u5de6\u952e\u6765\u589e\u52a0\u5f53\u524d\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\n" +
+"-\u5728\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\u4e0a\u6309\u4f4fShift\u952e\u540e\u5355\u51fb\u9f20\u6807\u5de6\u952e\u6765\u51cf\u5c11\u5f53\u524d\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2).";
+
+Calendar._TT["PREV_YEAR"] = "\u4e0a\u4e00\u5e74";
+Calendar._TT["PREV_MONTH"] = "\u4e0a\u4e2a\u6708";
+Calendar._TT["GO_TODAY"] = "\u5230\u4eca\u5929";
+Calendar._TT["NEXT_MONTH"] = "\u4e0b\u4e2a\u6708";
+Calendar._TT["NEXT_YEAR"] = "\u4e0b\u4e00\u5e74";
+Calendar._TT["SEL_DATE"] = "\u9009\u62e9\u65e5\u671f";
+Calendar._TT["DRAG_TO_MOVE"] = "\u62d6\u52a8";
+Calendar._TT["PART_TODAY"] = " (\u4eca\u5929)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "%s\u4e3a\u8fd9\u5468\u7684\u7b2c\u4e00\u5929";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "\u5173\u95ed";
+Calendar._TT["TODAY"] = "\u4eca\u5929";
+Calendar._TT["TIME_PART"] = "(\u6309\u7740Shift\u952e)\u5355\u51fb\u6216\u62d6\u52a8\u6539\u53d8\u503c";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e\u65e5";
+
+Calendar._TT["WK"] = "\u5468";
+Calendar._TT["TIME"] = "\u65f6\u95f4:";
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/lang/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/release-notes.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/release-notes.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/release-notes.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,435 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">
+<html>
+ <head>
+ <title>jscalendar release notes</title>
+
+ <style type="text/css">
+ h1 { border-bottom: 1px solid #000; }
+ h2 { border-bottom: 1px solid #444; }
+ ul li { margin-top: 0.5em; margin-bottom: 0.5em; }
+ </style>
+ </head>
+
+ <body>
+ <div style="float: right; border: 1px solid #000; background: #fff; padding: 10px; ">
+ <a href="http://www.dynarch.com/projects/calendar/">The Coolest DHTML Calendar</a><br />
+ © <a href="http://www.dynarch.com/">Dynarch.com</a> 2002 and later.
+ </div>
+ <h1>jscalendar release notes</h1>
+
+ <p>This release compiled at Monday, 7 Mar 2005 (19:06).</p>
+
+ <h2>1.0</h2>
+
+ <ul>
+
+ <li>
+ Added support for multiple dates selection. In this mode the
+ calendar will allow the user to select more than one date, and
+ will maintain an array of selected dates that can be
+ investigated from your custom handlers. Sample in <a
+ href="multiple-dates.html">multiple-dates.html</a>.
+ </li>
+
+ <li>
+ Support for âday infoâ. Using this feature you can display
+ custom information for certain dates. Sample in <a
+ href="dayinfo.html">dayinfo.html</a>. Note that if the text
+ is really big the calendar layout might appear somehow broken;
+ this is something that should be easy to fix in the CSS file.
+ </li>
+
+ <li>
+ Clicking on âTodayâ will now close the calendar if the current
+ date is already selected.
+ </li>
+
+ <li>
+ The âfirst day of weekâ setting can now be defined in the
+ language file--after all, it is locale-specific. The new
+ parameter is âCalendar._FDâ. Language files should be
+ updated, but the calendar will not complain nor fail to
+ function if the parameter is not present.
+ </li>
+
+ <li>
+ Some fixes to make the thing work in Safari. It now seems to
+ be properly supported, please let me know if you encounter any
+ problems.
+ </li>
+
+ <li>
+ New skin: Aqua theme, appropriate for MacOSX fan sites :-)
+ This theme is located in âskins/aqua/theme.cssâ (in the
+ future, all themes will go to this directory).
+ </li>
+
+ <li>
+ <b>Bug fixes.</b>
+ <ul>
+ <li>
+ Keyboard operation now functions normally when the
+ calendar is displaying days from adjacent months; it might
+ even work correctly for months containing disabled dates
+ :). This fix was originally developed under contract for
+ <a
+ href="http://www.zapatec.com/website/main/products/prod1/">The
+ Zapatec Calendar</a>. Zapatec kindly allowed us to
+ include the bugfixes back in the open source calendar.
+ </li>
+ <li>
+ Fixed the time selection bug: the previous version would
+ reset the time to current time when a new date was
+ clicked.
+ </li>
+ <li>
+ Parsing hours like "12:XX pm" would wrongfully replace
+ "pm" with "am"--fixed.
+ </li>
+ <li>
+ Fixed critical bugs in parseDate function that would
+ initialize the calendar with 'NaN' values in all cells if
+ the string to be parsed is not a valid date.
+ </li>
+ <li>
+ The golbal variable that we are using was renamed to
+ â_dynarch_popupCalendarâ to minimize the risk of name
+ clashes. It's still difficult to get rid of it.
+ </li>
+ <li>
+ Added z-index property to drop-down menus style.
+ </li>
+ <li>
+ The calendar will update an input field even in flat mode,
+ if an input field was passed. Also, the âshowOthersâ
+ parameter will be effective in both popup and flat mode.
+ </li>
+ <li>
+ Others, probably.
+ </li>
+ </ul>
+ </li>
+
+ <li>
+ Documentation & sample files updated.
+ </li>
+
+ </ul>
+
+ <h2>0.9.6</h2>
+
+ <ul>
+
+ <li>
+ "Smart" (TM :-) positioning algorithm. The new algorithm will
+ try to keep the calendar in the browser view, which is helpful
+ in situations when the input field is near the bottom or the
+ right edge. This code is only tested with IE and Mozilla, but
+ it should work with other browsers too. Many thanks to <a
+ href="http://www.ex3.com">Sunny Chowdhury</a> for sponsoring
+ this feature!
+ </li>
+
+ <li>
+ Support for IE5/Win is back. I also want to thank Janusz
+ Piwowarski for keeping his eye on the CVS ;-) He reviewed my
+ IE5-related changes and sent me a much cleaner patch.
+ </li>
+
+ <li>
+ The calendar will now allow any day of week to be "the first
+ day of week". This was requested long time ago, by someone
+ whose name I forgot (sorry). The reason was that in certain
+ countries weeks start on Saturday. So I thought that instead
+ of having a "mondayFirst" and a "saturdayFirst" parameter,
+ :-), it's better to have a "firstDayOfWeek" parameter; now
+ it's present and its meaning is: "0 for Sunday", "1 for
+ Monday", "2 for Tuesday", etc. The equivalent parameter for
+ Calendar.setup is "firstDay". The end user can also change
+ it very easy: click on the day name in the calendar display.
+ </li>
+
+ <li>
+ The above feature triggered one <b>important change</b>: the
+ notion of "weekend" is now defined in the language file.
+ Added parameters:
+
+ <pre>
+ Calendar._TT["WEEKEND"] = "0,6";
+ Calendar._TT["DAY_FIRST"] = "Display %s first";</pre>
+
+ "WEEKEND" specifies a string with comma-separated numbers from
+ 0 to 7; they define what days are marked as "weekend". 5 and
+ 6 mean, of course, "Sunday" and "Saturday". Day first is the
+ tooltip displayed when a day name is hovered; "%s" will get
+ replaced with the day name. Updated languages are "en" and
+ "ro", which I maintain. Please note that languages wich are
+ not updated <b>will not work</b>. If yours is one of them,
+ please consider fixing it and sending me the fix so that I can
+ include it in the distro.
+ </li>
+
+ <li>
+ The calendar can now display days from the months adjacent to
+ the currently displayed one. This is optional, of course, and
+ the parameter name is "showsOtherMonths" (or "showOthers" in
+ Calendar.setup). All theme files were updated.
+ </li>
+
+ <li>
+ Displays "Time:" near the time selector, only if defined in
+ the language file.
+ </li>
+
+ <li>
+ Some bugs fixed in the date parsing code (which has also been
+ rewritten a little bit cleaner).
+ </li>
+
+ <li>
+ Calendar.setup will now configure the calendar to trigger the
+ input fields' "onchange" event, if specified, when a date is
+ selected.
+ </li>
+
+ <li>
+ New parameter in Calendar.setup: "cache" (<b>defaults to
+ false</b>). If set to true then the popup calendar object
+ will be "cached", meaning, it will be created only once, no
+ matter how many input fields are there in the page. Sometimes
+ this is not desirable, which is why I've added this
+ parameter. Please note that it defaults to "false" (thus the
+ default behavior has changed).
+ </li>
+
+ <li>
+ Added a simple PHP wrapper. It provides code which loads all
+ the required scripts and theme file, and one function which
+ creates and configures an input field for date input. It
+ takes care of creating and assigning unique ID-s for the
+ calendar fields and it also creates the "Calendar.setup" code.
+ Functions to create more specialized fields can be added very
+ easily. This feature was requested by the FreeMED.org project
+ (thanks for donating!).
+ </li>
+
+ </ul>
+
+ <p>Wow, there were quite some changes :-D Enjoy it!</p>
+
+ <h2>0.9.5</h2>
+
+ <p>
+ This release's primary goal is to fix a wrong license statement which
+ can be found in some files from 0.9.4. For instance in README or
+ calendar.js, the statement was that the code is distributed under the
+ GNU GPL; that's because I had plans to change the license, then
+ changed my mind but unfortunately I committed files so. I am sorry
+ for this inconvenience, please use the latest (0.9.5) release which is
+ fully covered by LGPL.
+ </p>
+
+ <p>Other changes:</p>
+
+ <ul>
+
+ <li>
+ <b>Fixed</b> an annoying bug that prevented the calendar to display
+ correctly when it was configured for an input field inside a
+ <b>scrolling area</b>. <b>Many thanks</b> to Ian Barrack (<a
+ href="http://www.simban.com">Simban.com</a>) who pointed it up and
+ donated quite some money for the Calendar project!
+ </li>
+
+ <li>
+ All examples use UTF-8 now; the translations may not be all
+ up-to-date, but I <strong>strongly</strong> suggest everyone to use
+ UTF-8; other encodings are a plain mess. So far I know for sure
+ that Romanian translation will work with UTF-8 and <em>not
+ anymore</em> with ISO-8859-2. Other translations are probably
+ usable under UTF-8, but if your preferred language isn't... ;-)
+ please make it and send it to me for inclusion.
+ </li>
+
+ <li>
+ Fixed small bug in the documentation (one footnote didn't appear
+ where it should have).
+ </li>
+
+ <li>
+ Updated translations: DE, ES, HU, IT, RO. Thanks to everyone who
+ sent translations!
+ </li>
+
+ </ul>
+
+ <h2>0.9.4</h2>
+
+ <h3>New stuff</h3>
+
+ <ul>
+
+ <li>Supports time selection. Yes. ;-) This work has been largely
+ sponsored by <strong>Himanshukumar Shah</strong> (thank you!). See
+ the docs and example files for details on how to setup.</li>
+
+ <li>Easy to link 2 or more fields by using the new
+ <code>onUpdate</code> parameter of <code>Calendar.setup</code>. This
+ is useful, say, to automatically set a value in a second field based
+ on the value selected in the first field. See the documentation and
+ first sample in <a href="simple-1.html">simple-1.html</a>.</li>
+
+ <li>Other <code>Calendar.setup</code> low-level parameters, for those
+ wanting to have the complete control: <code>onSelect</code> and
+ <code>onClose</code>. The handlers are called when something is
+ selected in the calendar or when the calendar is closed.</li>
+
+ <li>The translation files can optionally include the short day names
+ and the short month names. That's because in some languages, like
+ German, the short form is not the first 3 letters of the entire name
+ but only the first 2. Also in other languages short names can't be
+ as easily derived from the full name by just calling substr, so this
+ patch solves the problem.</li>
+
+ <li>Implemented a nice way to make some dates "special" (look
+ different). Specifically, the <code>setDisabledHandler</code> method
+ was replaced with the more general <code>setDateStatusHandler</code>
+ method (the old one is still available for backwards compatibility but
+ <em>will</em> be removed). More details about this in the
+ documentation. Also see <a href="simple-3.html">simple-3.html</a>
+ for a live sample.</li>
+
+ <li>Date parsing and formatting engine is now rewritten and supports a
+ subset of <code>strftime</code> format specifiers from ANSI C. This
+ makes it possible to use dates like "YYYYMMDD" (the corresponding
+ format for this would be "%Y%m%d"). Details in the documentation.
+ <b>Please note that the new engine is not compatibile with older
+ calendar releases!</b></li>
+
+ <li>Along with the new date parser I workarounded an unpleasant crash
+ that occurred in IE when certain accented characters appeared in the
+ texts. I think German was one of the language with such problems, and
+ the workaround was to use the letter without an accent. Well, now you
+ can translate to whatever you want.</li>
+
+ <li>"Fixes" (I mean, "horrible workarounds") for Konqueror (and
+ hopefully Safari). Unfortunately, this otherwise excellent browser
+ still has some bugs that keep the calendar from working
+ <em>exactly</em> as it should.. But they're going to be fixed,
+ right? ;-)</li>
+
+ <li>CSS themes got pretty much modified too so if you wrote your theme
+ you need to update it. Aside for the time selector support, the CSS
+ themes contain a simple hack that makes the navigation buttons show
+ a little arrow in the lower-right corner which indicates that if one
+ holds the mouse a menu will appear.</li>
+
+ </ul>
+
+ <h3>Translation files</h3>
+
+ <p>The translation files need to be updated in order for the calendar to
+ work properly. Currently the only updated files are calendar-en.js
+ (main file) and calendar-ro.js (well, yes, I am a Romanian ;-).</p>
+
+ <p>Specifically, they need the following:</p>
+
+ <ul>
+
+ <li>Correct date format, according with the new format specifiers
+ introduced in 0.9.4. Details about the available format specifiers
+ in the documentation</li>
+
+ <li>Short day or month names, <em>if required</em>. If they can be
+ derived by taking the first N letters of the full name then a simple
+ Calendar._SDN_len = N or Calendar._SMN_len = N will suffice. If N
+ is 3 then nothing needs to be done as we take it for granted if no
+ other option is offered ;-)</li>
+
+ <li>We have some new texts that shows short usage information as well
+ as copyright information.</li>
+
+ </ul>
+
+ <p>If your favorite language is not there yet, or it is but not updated
+ according to the main calendar-en.js file, then please consider
+ translating calendar-en.js and send the translation back to me so that
+ I include it in the official distribution.</p>
+
+ <h3>Bug status</h3>
+
+ <p>Check <a
+ href="http://sourceforge.net/tracker/?atid=544285&group_id=75569&func=browse">SourceForge</a>,
+ I didn't keep track. However, there were a lot of bugfixes.</p>
+
+ <h2>0.9.3</h2>
+
+ <h3>New stuff</h3>
+
+ <ul>
+
+ <li>Opera 7 compatibility — keyboard navigation is
+ still not available; text selection can't be disabled, leading to an
+ ugly effect when walking through the month/year menus.</li>
+
+ <li>Ability to align the calendar relative to the input field (or any
+ other element). Vertical: top, center, bottom. Horizontal: left,
+ center, right. This is established as a new parameter for
+ <tt>showAtElement</tt>.</li>
+
+ <li>Added <tt>dateClicked</tt> property (boolean). This can be
+ inspected in the "onSelect" handler to determine if a date was
+ really clicked or the user only changed month/year using the menus.
+ You <em>need</em> to check this for "single-click" calendars and
+ only close/hide the calendar if it's <tt>true</tt>.</li>
+
+ <li>Full documentation in <a href="doc/html/reference.html">HTML</a>
+ and <a href="doc/reference.pdf">PDF</a> format is now available in the
+ distribution archive.</li>
+
+ <li>New language definition files: HU, HR, PT, ZH. Thanks those who
+ submitted!</li>
+
+ </ul>
+
+ <h3>Bug status</h3>
+
+ <p>This covers only those bugs that have been reported <a
+ href="http://sourceforge.net/projects/jscalendar" target="_blank"
+ title="Project page at SourceForge">at SourceForge</a>.</p>
+
+ <ol>
+
+ <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=703238&group_id=75569&atid=544285" target="_blank"
+ title="Go to bug description at sourceforge"><tt>#703,238</tt></a> — fixed</li>
+ <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=703814&group_id=75569&atid=544285" target="_blank"
+ title="Go to bug description at sourceforge"><tt>#703,814</tt></a> — fixed</li>
+ <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=716777&group_id=75569&atid=544285" target="_blank"
+ title="Go to bug description at sourceforge"><tt>#716,777</tt></a> — closed (was fixed already in 0.9.2-1)</li>
+ <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=723335&group_id=75569&atid=544285" target="_blank"
+ title="Go to bug description at sourceforge"><tt>#723,335</tt></a> — fixed</li>
+ <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=715122&group_id=75569&atid=544285" target="_blank"
+ title="Go to bug description at sourceforge"><tt>#715,122</tt></a> — feature request; implemented.</li>
+ <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=721206&group_id=75569&atid=544285" target="_blank"
+ title="Go to bug description at sourceforge"><tt>#721,206</tt></a> — fixed (added "refresh()" function)</li>
+ <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=721833&group_id=75569&atid=544285" target="_blank"
+ title="Go to bug description at sourceforge"><tt>#721,833</tt></a> — fixed (bug concerning the "yy" format
+ parsing)</li>
+ <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=721833&group_id=75569&atid=544285" target="_blank"
+ title="Go to bug description at sourceforge"><tt>#721,833</tt></a> — won't fix (we won't set the time to
+ midnight; time might actually be useful when we implement support
+ for time selection).
+
+ </ol>
+
+ <hr />
+ <address><a href="http://dynarch.com/mishoo/">Mihai Bazon</a></address>
+<!-- Created: Tue Jul 8 17:29:37 EEST 2003 -->
+<!-- hhmts start -->
+Last modified on Wed Oct 29 02:37:07 2003
+<!-- hhmts end -->
+<!-- doc-lang: English -->
+ </body>
+</html>
+
+
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/calendar/release-notes.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/class.tar.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/class.tar.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/class.tar.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,714 @@
+<?php
+// $Id$
+/*
+ package::i.tools
+
+ php-downloader v1.0 - www.ipunkt.biz
+
+ (c) 2002 - www.ipunkt.biz (rok)
+*/
+
+/*
+=======================================================================
+Name:
+ tar Class
+
+Author:
+ Josh Barger <joshb at npt.com>
+
+Description:
+ This class reads and writes Tape-Archive (TAR) Files and Gzip
+ compressed TAR files, which are mainly used on UNIX systems.
+ This class works on both windows AND unix systems, and does
+ NOT rely on external applications!! Woohoo!
+
+Usage:
+ Copyright (C) 2002 Josh Barger
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details at:
+ http://www.gnu.org/copyleft/lesser.html
+
+ If you use this script in your application/website, please
+ send me an e-mail letting me know about it :)
+
+Bugs:
+ Please report any bugs you might find to my e-mail address
+ at joshb at npt.com. If you have already created a fix/patch
+ for the bug, please do send it to me so I can incorporate it into my release.
+
+Version History:
+ 1.0 04/10/2002 - InitialRelease
+
+ 2.0 04/11/2002 - Merged both tarReader and tarWriter
+ classes into one
+ - Added support for gzipped tar files
+ Remember to name for .tar.gz or .tgz
+ if you use gzip compression!
+ :: THIS REQUIRES ZLIB EXTENSION ::
+ - Added additional comments to
+ functions to help users
+ - Added ability to remove files and
+ directories from archive
+ 2.1 04/12/2002 - Fixed serious bug in generating tar
+ - Created another example file
+ - Added check to make sure ZLIB is
+ installed before running GZIP
+ compression on TAR
+ 2.2 05/07/2002 - Added automatic detection of Gzipped
+ tar files (Thanks go to Jidgen Falch
+ for the idea)
+ - Changed "private" functions to have
+ special function names beginning with
+ two underscores
+=======================================================================
+XOOPS changes onokazu <webmaster at xoops.org>
+
+ 12/25/2002 - Added flag to addFile() function for binary files
+
+=======================================================================
+*/
+
+/**
+ * tar Class
+ *
+ * This class reads and writes Tape-Archive (TAR) Files and Gzip
+ * compressed TAR files, which are mainly used on UNIX systems.
+ * This class works on both windows AND unix systems, and does
+ * NOT rely on external applications!! Woohoo!
+ *
+ * @author Josh Barger <joshb at npt.com>
+ * @copyright Copyright (C) 2002 Josh Barger
+ *
+ * @package kernel
+ * @subpackage core
+ */
+class tar
+{
+ /**#@+
+ * Unprocessed Archive Information
+ */
+ var $filename;
+ var $isGzipped;
+ var $tar_file;
+ /**#@-*/
+
+ /**#@+
+ * Processed Archive Information
+ */
+ var $files;
+ var $directories;
+ var $numFiles;
+ var $numDirectories;
+ /**#@-*/
+
+
+ /**
+ * Class Constructor -- Does nothing...
+ */
+ function tar()
+ {
+ return true;
+ }
+
+ /**
+ * Computes the unsigned Checksum of a file's header
+ * to try to ensure valid file
+ *
+ * @param string $bytestring
+ *
+ * @access private
+ */
+ function __computeUnsignedChecksum($bytestring)
+ {
+ $unsigned_chksum = '';
+ for($i=0; $i<512; $i++)
+ $unsigned_chksum += ord($bytestring[$i]);
+ for($i=0; $i<8; $i++)
+ $unsigned_chksum -= ord($bytestring[148 + $i]);
+ $unsigned_chksum += ord(" ") * 8;
+
+ return $unsigned_chksum;
+ }
+
+
+ /**
+ * Converts a NULL padded string to a non-NULL padded string
+ *
+ * @param string $string
+ *
+ * @return string
+ *
+ * @access private
+ **/
+ function __parseNullPaddedString($string)
+ {
+ $position = strpos($string,chr(0));
+ return substr($string,0,$position);
+ }
+
+ /**
+ * This function parses the current TAR file
+ *
+ * @return bool always TRUE
+ *
+ * @access private
+ **/
+ function __parseTar()
+ {
+ // Read Files from archive
+ $tar_length = strlen($this->tar_file);
+ $main_offset = 0;
+ $this->numFiles = 0;
+ while ( $main_offset < $tar_length ) {
+ // If we read a block of 512 nulls, we are at the end of the archive
+ if(substr($this->tar_file,$main_offset,512) == str_repeat(chr(0),512))
+ break;
+
+ // Parse file name
+ $file_name = $this->__parseNullPaddedString(substr($this->tar_file,$main_offset,100));
+
+ // Parse the file mode
+ $file_mode = substr($this->tar_file,$main_offset + 100,8);
+
+ // Parse the file user ID
+ $file_uid = octdec(substr($this->tar_file,$main_offset + 108,8));
+
+ // Parse the file group ID
+ $file_gid = octdec(substr($this->tar_file,$main_offset + 116,8));
+
+ // Parse the file size
+ $file_size = octdec(substr($this->tar_file,$main_offset + 124,12));
+
+ // Parse the file update time - unix timestamp format
+ $file_time = octdec(substr($this->tar_file,$main_offset + 136,12));
+
+ // Parse Checksum
+ $file_chksum = octdec(substr($this->tar_file,$main_offset + 148,6));
+
+ // Parse user name
+ $file_uname = $this->__parseNullPaddedString(substr($this->tar_file,$main_offset + 265,32));
+
+ // Parse Group name
+ $file_gname = $this->__parseNullPaddedString(substr($this->tar_file,$main_offset + 297,32));
+
+ // Make sure our file is valid
+ if($this->__computeUnsignedChecksum(substr($this->tar_file,$main_offset,512)) != $file_chksum)
+ return false;
+
+ // Parse File Contents
+ $file_contents = substr($this->tar_file,$main_offset + 512,$file_size);
+
+ /* ### Unused Header Information ###
+ $activeFile["typeflag"] = substr($this->tar_file,$main_offset + 156,1);
+ $activeFile["linkname"] = substr($this->tar_file,$main_offset + 157,100);
+ $activeFile["magic"] = substr($this->tar_file,$main_offset + 257,6);
+ $activeFile["version"] = substr($this->tar_file,$main_offset + 263,2);
+ $activeFile["devmajor"] = substr($this->tar_file,$main_offset + 329,8);
+ $activeFile["devminor"] = substr($this->tar_file,$main_offset + 337,8);
+ $activeFile["prefix"] = substr($this->tar_file,$main_offset + 345,155);
+ $activeFile["endheader"] = substr($this->tar_file,$main_offset + 500,12);
+ */
+
+ if ( $file_size > 0 ) {
+ // Increment number of files
+ $this->numFiles++;
+
+ // Create us a new file in our array
+ $activeFile = &$this->files[];
+
+ // Asign Values
+ $activeFile["name"] = $file_name;
+ $activeFile["mode"] = $file_mode;
+ $activeFile["size"] = $file_size;
+ $activeFile["time"] = $file_time;
+ $activeFile["user_id"] = $file_uid;
+ $activeFile["group_id"] = $file_gid;
+ $activeFile["user_name"] = $file_uname;
+ $activeFile["group_name"] = $file_gname;
+ $activeFile["checksum"] = $file_chksum;
+ $activeFile["file"] = $file_contents;
+ } else {
+ // Increment number of directories
+ $this->numDirectories++;
+
+ // Create a new directory in our array
+ $activeDir = &$this->directories[];
+
+ // Assign values
+ $activeDir["name"] = $file_name;
+ $activeDir["mode"] = $file_mode;
+ $activeDir["time"] = $file_time;
+ $activeDir["user_id"] = $file_uid;
+ $activeDir["group_id"] = $file_gid;
+ $activeDir["user_name"] = $file_uname;
+ $activeDir["group_name"] = $file_gname;
+ $activeDir["checksum"] = $file_chksum;
+ }
+
+ // Move our offset the number of blocks we have processed
+ $main_offset += 512 + (ceil($file_size / 512) * 512);
+ }
+
+ return true;
+ }
+
+ /**
+ * Read a non gzipped tar file in for processing.
+ *
+ * @param string $filename full filename
+ * @return bool always TRUE
+ *
+ * @access private
+ **/
+ function __readTar($filename='')
+ {
+ // Set the filename to load
+ if(!$filename)
+ $filename = $this->filename;
+
+ // Read in the TAR file
+ $fp = fopen($filename,"rb");
+ $this->tar_file = fread($fp,filesize($filename));
+ fclose($fp);
+
+ if($this->tar_file[0] == chr(31) && $this->tar_file[1] == chr(139) && $this->tar_file[2] == chr(8)) {
+ if(!function_exists("gzinflate"))
+ return false;
+
+ $this->isGzipped = true;
+
+ $this->tar_file = gzinflate(substr($this->tar_file,10,-4));
+ }
+
+ // Parse the TAR file
+ $this->__parseTar();
+
+ return true;
+ }
+
+ /**
+ * Generates a TAR file from the processed data
+ *
+ * @return bool always TRUE
+ *
+ * @access private
+ **/
+ function __generateTAR()
+ {
+ // Clear any data currently in $this->tar_file
+ unset($this->tar_file);
+
+ // Generate Records for each directory, if we have directories
+ if($this->numDirectories > 0) {
+ foreach($this->directories as $key => $information) {
+ unset($header);
+
+ // Generate tar header for this directory
+ // Filename, Permissions, UID, GID, size, Time, checksum, typeflag, linkname, magic, version, user name, group name, devmajor, devminor, prefix, end
+ $header .= str_pad($information["name"],100,chr(0));
+ $header .= str_pad(decoct($information["mode"]),7,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_pad(decoct($information["user_id"]),7,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_pad(decoct($information["group_id"]),7,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_pad(decoct(0),11,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_pad(decoct($information["time"]),11,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_repeat(" ",8);
+ $header .= "5";
+ $header .= str_repeat(chr(0),100);
+ $header .= str_pad("ustar",6,chr(32));
+ $header .= chr(32) . chr(0);
+ $header .= str_pad("",32,chr(0));
+ $header .= str_pad("",32,chr(0));
+ $header .= str_repeat(chr(0),8);
+ $header .= str_repeat(chr(0),8);
+ $header .= str_repeat(chr(0),155);
+ $header .= str_repeat(chr(0),12);
+
+ // Compute header checksum
+ $checksum = str_pad(decoct($this->__computeUnsignedChecksum($header)),6,"0",STR_PAD_LEFT);
+ for($i=0; $i<6; $i++) {
+ $header[(148 + $i)] = substr($checksum,$i,1);
+ }
+ $header[154] = chr(0);
+ $header[155] = chr(32);
+
+ // Add new tar formatted data to tar file contents
+ $this->tar_file .= $header;
+ }
+ }
+
+ // Generate Records for each file, if we have files (We should...)
+ if($this->numFiles > 0) {
+ $this->tar_file = '';
+ foreach($this->files as $key => $information) {
+ unset($header);
+
+ // Generate the TAR header for this file
+ // Filename, Permissions, UID, GID, size, Time, checksum, typeflag, linkname, magic, version, user name, group name, devmajor, devminor, prefix, end
+ $header = str_pad($information["name"],100,chr(0));
+ $header .= str_pad(decoct($information["mode"]),7,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_pad(decoct($information["user_id"]),7,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_pad(decoct($information["group_id"]),7,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_pad(decoct($information["size"]),11,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_pad(decoct($information["time"]),11,"0",STR_PAD_LEFT) . chr(0);
+ $header .= str_repeat(" ",8);
+ $header .= "0";
+ $header .= str_repeat(chr(0),100);
+ $header .= str_pad("ustar",6,chr(32));
+ $header .= chr(32) . chr(0);
+ $header .= str_pad($information["user_name"],32,chr(0)); // How do I get a file's user name from PHP?
+ $header .= str_pad($information["group_name"],32,chr(0)); // How do I get a file's group name from PHP?
+ $header .= str_repeat(chr(0),8);
+ $header .= str_repeat(chr(0),8);
+ $header .= str_repeat(chr(0),155);
+ $header .= str_repeat(chr(0),12);
+
+ // Compute header checksum
+ $checksum = str_pad(decoct($this->__computeUnsignedChecksum($header)),6,"0",STR_PAD_LEFT);
+ for($i=0; $i<6; $i++) {
+ $header[(148 + $i)] = substr($checksum,$i,1);
+ }
+ $header[154] = chr(0);
+ $header[155] = chr(32);
+
+ // Pad file contents to byte count divisible by 512
+ $file_contents = str_pad($information["file"],(ceil($information["size"] / 512) * 512),chr(0));
+
+ // Add new tar formatted data to tar file contents
+ $this->tar_file .= $header . $file_contents;
+ }
+ }
+
+ // Add 512 bytes of NULLs to designate EOF
+ $this->tar_file .= str_repeat(chr(0),512);
+
+ return true;
+ }
+
+
+ /**
+ * Open a TAR file
+ *
+ * @param string $filename
+ * @return bool
+ **/
+ function openTAR($filename)
+ {
+ // Clear any values from previous tar archives
+ unset($this->filename);
+ unset($this->isGzipped);
+ unset($this->tar_file);
+ unset($this->files);
+ unset($this->directories);
+ unset($this->numFiles);
+ unset($this->numDirectories);
+
+ // If the tar file doesn't exist...
+ if(!file_exists($filename))
+ return false;
+
+ $this->filename = $filename;
+
+ // Parse this file
+ $this->__readTar();
+
+ return true;
+ }
+
+ /**
+ * Appends a tar file to the end of the currently opened tar file.
+ *
+ * @param string $filename
+ * @return bool
+ **/
+ function appendTar($filename)
+ {
+ // If the tar file doesn't exist...
+ if(!file_exists($filename))
+ return false;
+
+ $this->__readTar($filename);
+
+ return true;
+ }
+
+ /**
+ * Retrieves information about a file in the current tar archive
+ *
+ * @param string $filename
+ * @return string FALSE on fail
+ **/
+ function getFile($filename)
+ {
+ if ( $this->numFiles > 0 ) {
+ foreach($this->files as $key => $information) {
+ if($information["name"] == $filename)
+ return $information;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Retrieves information about a directory in the current tar archive
+ *
+ * @param string $dirname
+ * @return string FALSE on fail
+ **/
+ function getDirectory($dirname)
+ {
+ if($this->numDirectories > 0) {
+ foreach($this->directories as $key => $information) {
+ if($information["name"] == $dirname)
+ return $information;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Check if this tar archive contains a specific file
+ *
+ * @param string $filename
+ * @return bool
+ **/
+ function containsFile($filename)
+ {
+ if ( $this->numFiles > 0 ) {
+ foreach($this->files as $key => $information) {
+ if($information["name"] == $filename)
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Check if this tar archive contains a specific directory
+ *
+ * @param string $dirname
+ * @return bool
+ **/
+ function containsDirectory($dirname)
+ {
+ if ( $this->numDirectories > 0 ) {
+ foreach ( $this->directories as $key => $information ) {
+ if ( $information["name"] == $dirname ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Add a directory to this tar archive
+ *
+ * @param string $dirname
+ * @return bool
+ **/
+ function addDirectory($dirname)
+ {
+ if ( !file_exists($dirname) ) {
+ return false;
+ }
+
+ // Get directory information
+ $file_information = stat($dirname);
+
+ // Add directory to processed data
+ $this->numDirectories++;
+ $activeDir = &$this->directories[];
+ $activeDir["name"] = $dirname;
+ $activeDir["mode"] = $file_information["mode"];
+ $activeDir["time"] = $file_information["time"];
+ $activeDir["user_id"] = $file_information["uid"];
+ $activeDir["group_id"] = $file_information["gid"];
+ $activeDir["checksum"] = $checksum;
+
+ return true;
+ }
+
+ /**
+ * Add a file to the tar archive
+ *
+ * @param string $filename
+ * @param boolean $binary Binary file?
+ * @return bool
+ **/
+ function addFile($filename, $binary = false)
+ {
+ // Make sure the file we are adding exists!
+ if ( !file_exists($filename) ) {
+ return false;
+ }
+
+ // Make sure there are no other files in the archive that have this same filename
+ if ( $this->containsFile($filename) ) {
+ return false;
+ }
+
+ // Get file information
+ $file_information = stat($filename);
+
+ // Read in the file's contents
+ if (!$binary) {
+ $fp = fopen($filename, "r");
+ } else {
+ $fp = fopen($filename, "rb");
+ }
+ $file_contents = fread($fp,filesize($filename));
+ fclose($fp);
+
+ // Add file to processed data
+ $this->numFiles++;
+ $activeFile = &$this->files[];
+ $activeFile["name"] = $filename;
+ $activeFile["mode"] = $file_information["mode"];
+ $activeFile["user_id"] = $file_information["uid"];
+ $activeFile["group_id"] = $file_information["gid"];
+ $activeFile["size"] = $file_information["size"];
+ $activeFile["time"] = $file_information["mtime"];
+ $activeFile["checksum"] = isset($checksum) ? $checksum : '';
+ $activeFile["user_name"] = "";
+ $activeFile["group_name"] = "";
+ $activeFile["file"] = trim($file_contents);
+
+ return true;
+ }
+
+ /**
+ * Remove a file from the tar archive
+ *
+ * @param string $filename
+ * @return bool
+ **/
+ function removeFile($filename)
+ {
+ if ( $this->numFiles > 0 ) {
+ foreach ( $this->files as $key => $information ) {
+ if ( $information["name"] == $filename ) {
+ $this->numFiles--;
+ unset($this->files[$key]);
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Remove a directory from the tar archive
+ *
+ * @param string $dirname
+ * @return bool
+ **/
+ function removeDirectory($dirname)
+ {
+ if ( $this->numDirectories > 0 ) {
+ foreach ( $this->directories as $key => $information ) {
+ if ( $information["name"] == $dirname ) {
+ $this->numDirectories--;
+ unset($this->directories[$key]);
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Write the currently loaded tar archive to disk
+ *
+ * @return bool
+ **/
+ function saveTar()
+ {
+ if ( !$this->filename ) {
+ return false;
+ }
+
+ // Write tar to current file using specified gzip compression
+ $this->toTar($this->filename,$this->isGzipped);
+
+ return true;
+ }
+
+ /**
+ * Saves tar archive to a different file than the current file
+ *
+ * @param string $filename
+ * @param bool $useGzip Use GZ compression?
+ * @return bool
+ **/
+ function toTar($filename,$useGzip)
+ {
+ if ( !$filename ) {
+ return false;
+ }
+
+ // Encode processed files into TAR file format
+ $this->__generateTar();
+
+ // GZ Compress the data if we need to
+ if ( $useGzip ) {
+ // Make sure we have gzip support
+ if ( !function_exists("gzencode") ) {
+ return false;
+ }
+
+ $file = gzencode($this->tar_file);
+ } else {
+ $file = $this->tar_file;
+ }
+
+ // Write the TAR file
+ $fp = fopen($filename,"wb");
+ fwrite($fp,$file);
+ fclose($fp);
+
+ return true;
+ }
+
+ /**
+ * Sends tar archive to stdout
+ *
+ * @param string $filename
+ * @param bool $useGzip Use GZ compression?
+ * @return string
+ **/
+ function toTarOutput($filename,$useGzip)
+ {
+ if ( !$filename ) {
+ return false;
+ }
+
+ // Encode processed files into TAR file format
+ $this->__generateTar();
+
+ // GZ Compress the data if we need to
+ if ( $useGzip ) {
+ // Make sure we have gzip support
+ if ( !function_exists("gzencode") ) {
+ return false;
+ }
+
+ $file = gzencode($this->tar_file);
+ } else {
+ $file = $this->tar_file;
+ }
+
+ return $file;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/class.tar.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/class.zipfile.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/class.zipfile.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/class.zipfile.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,196 @@
+<?php
+// $Id$
+/*
+ package::i.tools
+
+ php-downloader v1.0 - www.ipunkt.biz
+
+ (c) 2002 - www.ipunkt.biz (rok)
+
+ * Zip file creation class.
+ * Makes zip files.
+ *
+ * Based on :
+ *
+ * http://www.zend.com/codex.php?id=535&single=1
+ * By Eric Mueller <eric at themepark.com>
+ *
+ * http://www.zend.com/codex.php?id=470&single=1
+ * by Denis125 <webmaster at atlant.ru>
+ *
+ * a patch from Peter Listiak <mlady at users.sourceforge.net> for last modified
+ * date and time of the compressed file
+ *
+ * Official ZIP file format: http://www.pkware.com/appnote.txt
+ *
+ * @copyright (c) 2002 - www.ipunkt.biz (rok)
+ * @access public
+ *
+ * @package kernel
+ * @subpackage core
+ */
+class zipfile
+{
+ /**
+ * Array to store compressed data
+ *
+ * @var array $datasec
+ */
+ var $datasec = array();
+
+ /**
+ * Central directory
+ *
+ * @var array $ctrl_dir
+ */
+ var $ctrl_dir = array();
+
+ /**
+ * End of central directory record
+ *
+ * @var string $eof_ctrl_dir
+ */
+ var $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00";
+
+ /**
+ * Last offset position
+ *
+ * @var integer $old_offset
+ */
+ var $old_offset = 0;
+
+
+ /**
+ * Converts an Unix timestamp to a four byte DOS date and time format (date
+ * in high two bytes, time in low two bytes allowing magnitude comparison).
+ *
+ * @param integer the current Unix timestamp
+ *
+ * @return integer the current date in a four byte DOS format
+ *
+ * @access private
+ */
+ function unix2DosTime($unixtime = 0)
+ {
+ $timearray = ($unixtime == 0) ? getdate() : getdate($unixtime);
+
+ if ($timearray['year'] < 1980) {
+ $timearray['year'] = 1980;
+ $timearray['mon'] = 1;
+ $timearray['mday'] = 1;
+ $timearray['hours'] = 0;
+ $timearray['minutes'] = 0;
+ $timearray['seconds'] = 0;
+ } // end if
+
+ return (($timearray['year'] - 1980) << 25) | ($timearray['mon'] << 21) | ($timearray['mday'] << 16) |
+ ($timearray['hours'] << 11) | ($timearray['minutes'] << 5) | ($timearray['seconds'] >> 1);
+ } // end of the 'unix2DosTime()' method
+
+
+ /**
+ * Adds "file" to archive
+ *
+ * @param string file contents
+ * @param string name of the file in the archive (may contains the path)
+ * @param integer the current timestamp
+ *
+ * @access public
+ */
+ function addFile($data, $name, $time = 0)
+ {
+ $name = str_replace('\\', '/', $name);
+
+ $dtime = dechex($this->unix2DosTime($time));
+ $hexdtime = '\x' . $dtime[6] . $dtime[7]
+ . '\x' . $dtime[4] . $dtime[5]
+ . '\x' . $dtime[2] . $dtime[3]
+ . '\x' . $dtime[0] . $dtime[1];
+ eval('$hexdtime = "' . $hexdtime . '";');
+
+ $fr = "\x50\x4b\x03\x04";
+ $fr .= "\x14\x00"; // ver needed to extract
+ $fr .= "\x00\x00"; // gen purpose bit flag
+ $fr .= "\x08\x00"; // compression method
+ $fr .= $hexdtime; // last mod time and date
+
+ // "local file header" segment
+ $unc_len = strlen($data);
+ $crc = crc32($data);
+ $zdata = gzcompress($data);
+ $zdata = substr(substr($zdata, 0, strlen($zdata) - 4), 2); // fix crc bug
+ $c_len = strlen($zdata);
+ $fr .= pack('V', $crc); // crc32
+ $fr .= pack('V', $c_len); // compressed filesize
+ $fr .= pack('V', $unc_len); // uncompressed filesize
+ $fr .= pack('v', strlen($name)); // length of filename
+ $fr .= pack('v', 0); // extra field length
+ $fr .= $name;
+
+ // "file data" segment
+ $fr .= $zdata;
+
+ // "data descriptor" segment (optional but necessary if archive is not
+ // served as file)
+ $fr .= pack('V', $crc); // crc32
+ $fr .= pack('V', $c_len); // compressed filesize
+ $fr .= pack('V', $unc_len); // uncompressed filesize
+
+ // add this entry to array
+ $this -> datasec[] = $fr;
+ $new_offset = strlen(implode('', $this->datasec));
+
+ // now add to central directory record
+ $cdrec = "\x50\x4b\x01\x02";
+ $cdrec .= "\x00\x00"; // version made by
+ $cdrec .= "\x14\x00"; // version needed to extract
+ $cdrec .= "\x00\x00"; // gen purpose bit flag
+ $cdrec .= "\x08\x00"; // compression method
+ $cdrec .= $hexdtime; // last mod time & date
+ $cdrec .= pack('V', $crc); // crc32
+ $cdrec .= pack('V', $c_len); // compressed filesize
+ $cdrec .= pack('V', $unc_len); // uncompressed filesize
+ $cdrec .= pack('v', strlen($name) ); // length of filename
+ $cdrec .= pack('v', 0 ); // extra field length
+ $cdrec .= pack('v', 0 ); // file comment length
+ $cdrec .= pack('v', 0 ); // disk number start
+ $cdrec .= pack('v', 0 ); // internal file attributes
+ $cdrec .= pack('V', 32 ); // external file attributes - 'archive' bit set
+
+ $cdrec .= pack('V', $this -> old_offset ); // relative offset of local header
+ $this -> old_offset = $new_offset;
+
+ $cdrec .= $name;
+
+ // optional extra field, file comment goes here
+ // save to central directory
+ $this -> ctrl_dir[] = $cdrec;
+ } // end of the 'addFile()' method
+
+
+ /**
+ * Dumps out file
+ *
+ * @return string the zipped file
+ *
+ * @access public
+ */
+ function file()
+ {
+ $data = implode('', $this -> datasec);
+ $ctrldir = implode('', $this -> ctrl_dir);
+
+ return
+ $data .
+ $ctrldir .
+ $this -> eof_ctrl_dir .
+ pack('v', count($this -> ctrl_dir)) . // total # of entries "on this disk"
+ pack('v', count($this -> ctrl_dir)) . // total # of entries overall
+ pack('V', strlen($ctrldir)) . // size of central dir
+ pack('V', strlen($data)) . // offset to start of central dir
+ "\x00\x00"; // .zip file comment length
+ } // end of the 'file()' method
+
+} // end of the 'zipfile' class
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/class.zipfile.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/commentrenderer.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/commentrenderer.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/commentrenderer.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,388 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+/**
+ * Display comments
+ *
+ * @package kernel
+ * @subpackage comment
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright (c) 2000-2003 The Xoops Project - www.xoops.org
+ */
+class XoopsCommentRenderer {
+
+ /**#@+
+ * @access private
+ */
+ var $_tpl;
+ var $_comments = null;
+ var $_useIcons = true;
+ var $_doIconCheck = false;
+ var $_memberHandler;
+ var $_statusText;
+ /**#@-*/
+
+ /**
+ * Constructor
+ *
+ * @param object &$tpl
+ * @param boolean $use_icons
+ * @param boolean $do_iconcheck
+ **/
+ function XoopsCommentRenderer(&$tpl, $use_icons = true, $do_iconcheck = false)
+ {
+ $this->_tpl =& $tpl;
+ $this->_useIcons = $use_icons;
+ $this->_doIconCheck = $do_iconcheck;
+ $this->_memberHandler =& xoops_gethandler('member');
+ $this->_statusText = array(XOOPS_COMMENT_PENDING => '<span style="text-decoration: none; font-weight: bold; color: #00ff00;">'._CM_PENDING.'</span>', XOOPS_COMMENT_ACTIVE => '<span style="text-decoration: none; font-weight: bold; color: #ff0000;">'._CM_ACTIVE.'</span>', XOOPS_COMMENT_HIDDEN => '<span style="text-decoration: none; font-weight: bold; color: #0000ff;">'._CM_HIDDEN.'</span>');
+ }
+
+ /**
+ * Access the only instance of this class
+ *
+ * @param object $tpl reference to a {@link Smarty} object
+ * @param boolean $use_icons
+ * @param boolean $do_iconcheck
+ * @return
+ **/
+ function &instance(&$tpl, $use_icons = true, $do_iconcheck = false)
+ {
+ static $instance;
+ if (!isset($instance)) {
+ $instance = new XoopsCommentRenderer($tpl, $use_icons, $do_iconcheck);
+ }
+ return $instance;
+ }
+
+ /**
+ * Accessor
+ *
+ * @param object &$comments_arr array of {@link XoopsComment} objects
+ **/
+ function setComments(&$comments_arr)
+ {
+ if (isset($this->_comments)) {
+ unset($this->_comments);
+ }
+ $this->_comments =& $comments_arr;
+ }
+
+ /**
+ * Render the comments in flat view
+ *
+ * @param boolean $admin_view
+ **/
+ function renderFlatView($admin_view = false)
+ {
+ $count = count($this->_comments);
+ for ($i = 0; $i < $count; $i++) {
+ if (false != $this->_useIcons) {
+ $title = $this->_getTitleIcon($this->_comments[$i]->getVar('com_icon')).' '.$this->_comments[$i]->getVar('com_title');
+ } else {
+ $title = $this->_comments[$i]->getVar('com_title');
+ }
+ $poster = $this->_getPosterArray($this->_comments[$i]->getVar('com_uid'));
+ if (false != $admin_view) {
+ $text = $this->_comments[$i]->getVar('com_text').'<div style="text-align:right; margin-top: 2px; margin-bottom: 0px; margin-right: 2px;">'._CM_STATUS.': '.$this->_statusText[$this->_comments[$i]->getVar('com_status')].'<br />IP: <span style="font-weight: bold;">'.$this->_comments[$i]->getVar('com_ip').'</span></div>';
+ } else {
+ // hide comments that are not active
+ if (XOOPS_COMMENT_ACTIVE != $this->_comments[$i]->getVar('com_status')) {
+ continue;
+ } else {
+ $text = $this->_comments[$i]->getVar('com_text');
+ }
+ }
+ $this->_tpl->append('comments', array('id' => $this->_comments[$i]->getVar('com_id'), 'title' => $title, 'text' => $text, 'date_posted' => formatTimestamp($this->_comments[$i]->getVar('com_created'), 'm'), 'date_modified' => formatTimestamp($this->_comments[$i]->getVar('com_modified'), 'm'), 'poster' => $poster));
+ }
+ }
+
+ /**
+ * Render the comments in thread view
+ *
+ * This method calls itself recursively
+ *
+ * @param integer $comment_id Should be "0" when called by client
+ * @param boolean $admin_view
+ * @param boolean $show_nav
+ **/
+ function renderThreadView($comment_id = 0, $admin_view = false, $show_nav = true)
+ {
+ include_once XOOPS_ROOT_PATH.'/class/tree.php';
+ // construct comment tree
+ $xot = new XoopsObjectTree($this->_comments, 'com_id', 'com_pid', 'com_rootid');
+ $tree =& $xot->getTree();
+
+ if (false != $this->_useIcons) {
+ $title = $this->_getTitleIcon($tree[$comment_id]['obj']->getVar('com_icon')).' '.$tree[$comment_id]['obj']->getVar('com_title');
+ } else {
+ $title = $tree[$comment_id]['obj']->getVar('com_title');
+ }
+ if (false != $show_nav && $tree[$comment_id]['obj']->getVar('com_pid') != 0) {
+ $this->_tpl->assign('lang_top', _CM_TOP);
+ $this->_tpl->assign('lang_parent', _CM_PARENT);
+ $this->_tpl->assign('show_threadnav', true);
+ } else {
+ $this->_tpl->assign('show_threadnav', false);
+ }
+ if (false != $admin_view) {
+ // admins can see all
+ $text = $tree[$comment_id]['obj']->getVar('com_text').'<div style="text-align:right; margin-top: 2px; margin-bottom: 0px; margin-right: 2px;">'._CM_STATUS.': '.$this->_statusText[$tree[$comment_id]['obj']->getVar('com_status')].'<br />IP: <span style="font-weight: bold;">'.$tree[$comment_id]['obj']->getVar('com_ip').'</span></div>';
+ } else {
+ // hide comments that are not active
+ if (XOOPS_COMMENT_ACTIVE != $tree[$comment_id]['obj']->getVar('com_status')) {
+ // if there are any child comments, display them as root comments
+ if (isset($tree[$comment_id]['child']) && !empty($tree[$comment_id]['child'])) {
+ foreach ($tree[$comment_id]['child'] as $child_id) {
+ $this->renderThreadView($child_id, $admin_view, false);
+ }
+ }
+ return;
+ } else {
+ $text = $tree[$comment_id]['obj']->getVar('com_text');
+ }
+ }
+ $replies = array();
+ $this->_renderThreadReplies($tree, $comment_id, $replies, ' ', $admin_view);
+ $show_replies = (count($replies) > 0) ? true : false;
+ $this->_tpl->append('comments', array('pid' => $tree[$comment_id]['obj']->getVar('com_pid'), 'id' => $tree[$comment_id]['obj']->getVar('com_id'), 'itemid' => $tree[$comment_id]['obj']->getVar('com_itemid'), 'rootid' => $tree[$comment_id]['obj']->getVar('com_rootid'), 'title' => $title, 'text' => $text, 'date_posted' => formatTimestamp($tree[$comment_id]['obj']->getVar('com_created'), 'm'), 'date_modified' => formatTimestamp($tree[$comment_id]['obj']->getVar('com_modified'), 'm'), 'poster' => $this->_getPosterArray($tree[$comment_id]['obj']->getVar('com_uid')), 'replies' => $replies, 'show_replies' => $show_replies));
+ }
+
+ /**
+ * Render replies to a thread
+ *
+ * @param array &$thread
+ * @param int $key
+ * @param array $replies
+ * @param string $prefix
+ * @param bool $admin_view
+ * @param integer $depth
+ * @param string $current_prefix
+ *
+ * @access private
+ **/
+ function _renderThreadReplies(&$thread, $key, &$replies, $prefix, $admin_view, $depth = 0, $current_prefix = '')
+ {
+ if ($depth > 0) {
+ if (false != $this->_useIcons) {
+ $title = $this->_getTitleIcon($thread[$key]['obj']->getVar('com_icon')).' '.$thread[$key]['obj']->getVar('com_title');
+ } else {
+ $title = $thread[$key]['obj']->getVar('com_title');
+ }
+ $title = (false != $admin_view) ? $title.' '.$this->_statusText[$thread[$key]['obj']->getVar('com_status')] : $title;
+ $replies[] = array('id' => $key, 'prefix' => $current_prefix, 'date_posted' => formatTimestamp($thread[$key]['obj']->getVar('com_created'), 'm'), 'title' => $title, 'root_id' => $thread[$key]['obj']->getVar('com_rootid'), 'status' => $this->_statusText[$thread[$key]['obj']->getVar('com_status')], 'poster' => $this->_getPosterName($thread[$key]['obj']->getVar('com_uid')));
+ $current_prefix .= $prefix;
+ }
+ if (isset($thread[$key]['child']) && !empty($thread[$key]['child'])) {
+ $depth++;
+ foreach ($thread[$key]['child'] as $childkey) {
+ if (!$admin_view && $thread[$childkey]['obj']->getVar('com_status') != XOOPS_COMMENT_ACTIVE) {
+ // skip this comment if it is not active and continue on processing its child comments instead
+ if (isset($thread[$childkey]['child']) && !empty($thread[$childkey]['child'])) {
+ foreach ($thread[$childkey]['child'] as $childchildkey) {
+ $this->_renderThreadReplies($thread, $childchildkey, $replies, $prefix, $admin_view, $depth);
+ }
+ }
+ } else {
+ $this->_renderThreadReplies($thread, $childkey, $replies, $prefix, $admin_view, $depth, $current_prefix);
+ }
+ }
+ }
+ }
+
+ /**
+ * Render comments in nested view
+ *
+ * Danger: Recursive!
+ *
+ * @param integer $comment_id Always "0" when called by client.
+ * @param boolean $admin_view
+ **/
+ function renderNestView($comment_id = 0, $admin_view = false)
+ {
+ include_once XOOPS_ROOT_PATH.'/class/tree.php';
+ $xot = new XoopsObjectTree($this->_comments, 'com_id', 'com_pid', 'com_rootid');
+ $tree =& $xot->getTree();
+ if (false != $this->_useIcons) {
+ $title = $this->_getTitleIcon($tree[$comment_id]['obj']->getVar('com_icon')).' '.$tree[$comment_id]['obj']->getVar('com_title');
+ } else {
+ $title = $tree[$comment_id]['obj']->getVar('com_title');
+ }
+ if (false != $admin_view) {
+ $text = $tree[$comment_id]['obj']->getVar('com_text').'<div style="text-align:right; margin-top: 2px; margin-bottom: 0px; margin-right: 2px;">'._CM_STATUS.': '.$this->_statusText[$tree[$comment_id]['obj']->getVar('com_status')].'<br />IP: <span style="font-weight: bold;">'.$tree[$comment_id]['obj']->getVar('com_ip').'</span></div>';
+ } else {
+ // skip this comment if it is not active and continue on processing its child comments instead
+ if (XOOPS_COMMENT_ACTIVE != $tree[$comment_id]['obj']->getVar('com_status')) {
+ // if there are any child comments, display them as root comments
+ if (isset($tree[$comment_id]['child']) && !empty($tree[$comment_id]['child'])) {
+ foreach ($tree[$comment_id]['child'] as $child_id) {
+ $this->renderNestView($child_id, $admin_view);
+ }
+ }
+ return;
+ } else {
+ $text = $tree[$comment_id]['obj']->getVar('com_text');
+ }
+ }
+ $replies = array();
+ $this->_renderNestReplies($tree, $comment_id, $replies, 25, $admin_view);
+ $this->_tpl->append('comments', array('pid' => $tree[$comment_id]['obj']->getVar('com_pid'), 'id' => $tree[$comment_id]['obj']->getVar('com_id'), 'itemid' => $tree[$comment_id]['obj']->getVar('com_itemid'), 'rootid' => $tree[$comment_id]['obj']->getVar('com_rootid'), 'title' => $title, 'text' => $text, 'date_posted' => formatTimestamp($tree[$comment_id]['obj']->getVar('com_created'), 'm'), 'date_modified' => formatTimestamp($tree[$comment_id]['obj']->getVar('com_modified'), 'm'), 'poster' => $this->_getPosterArray($tree[$comment_id]['obj']->getVar('com_uid')), 'replies' => $replies));
+ }
+
+ /**
+ * Render replies in nested view
+ *
+ * @param array $thread
+ * @param int $key
+ * @param array $replies
+ * @param string $prefix
+ * @param bool $admin_view
+ * @param integer $depth
+ *
+ * @access private
+ **/
+ function _renderNestReplies(&$thread, $key, &$replies, $prefix, $admin_view, $depth = 0)
+ {
+ if ($depth > 0) {
+ if (false != $this->_useIcons) {
+ $title = $this->_getTitleIcon($thread[$key]['obj']->getVar('com_icon')).' '.$thread[$key]['obj']->getVar('com_title');
+ } else {
+ $title = $thread[$key]['obj']->getVar('com_title');
+ }
+ $text = (false != $admin_view) ? $thread[$key]['obj']->getVar('com_text').'<div style="text-align:right; margin-top: 2px; margin-right: 2px;">'._CM_STATUS.': '.$this->_statusText[$thread[$key]['obj']->getVar('com_status')].'<br />IP: <span style="font-weight: bold;">'.$thread[$key]['obj']->getVar('com_ip').'</span></div>' : $thread[$key]['obj']->getVar('com_text');
+ $replies[] = array('id' => $key, 'prefix' => $prefix, 'pid' => $thread[$key]['obj']->getVar('com_pid'), 'itemid' => $thread[$key]['obj']->getVar('com_itemid'), 'rootid' => $thread[$key]['obj']->getVar('com_rootid'), 'title' => $title, 'text' => $text, 'date_posted' => formatTimestamp($thread[$key]['obj']->getVar('com_created'), 'm'), 'date_modified' => formatTimestamp($thread[$key]['obj']->getVar('com_modified'), 'm'), 'poster' => $this->_getPosterArray($thread[$key]['obj']->getVar('com_uid')));
+
+ $prefix = $prefix + 25;
+ }
+ if (isset($thread[$key]['child']) && !empty($thread[$key]['child'])) {
+ $depth++;
+ foreach ($thread[$key]['child'] as $childkey) {
+ if (!$admin_view && $thread[$childkey]['obj']->getVar('com_status') != XOOPS_COMMENT_ACTIVE) {
+ // skip this comment if it is not active and continue on processing its child comments instead
+ if (isset($thread[$childkey]['child']) && !empty($thread[$childkey]['child'])) {
+ foreach ($thread[$childkey]['child'] as $childchildkey) {
+ $this->_renderNestReplies($thread, $childchildkey, $replies, $prefix, $admin_view, $depth);
+ }
+ }
+ } else {
+ $this->_renderNestReplies($thread, $childkey, $replies, $prefix, $admin_view, $depth);
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Get the name of the poster
+ *
+ * @param int $poster_id
+ * @return string
+ *
+ * @access private
+ **/
+ function _getPosterName($poster_id)
+ {
+ $poster['id'] = intval($poster_id);
+ if ($poster['id'] > 0) {
+ $com_poster =& $this->_memberHandler->getUser($poster_id);
+ if (is_object($com_poster)) {
+ $poster['uname'] = '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$poster['id'].'">'.$com_poster->getVar('uname').'</a>';
+ return $poster;
+ }
+ }
+ $poster['id'] = 0; // to cope with deleted user accounts
+ $poster['uname'] = $GLOBALS['xoopsConfig']['anonymous'];
+ return $poster;
+ }
+
+ /**
+ * Get an array with info about the poster
+ *
+ * @param int $poster_id
+ * @return array
+ *
+ * @access private
+ **/
+ function _getPosterArray($poster_id)
+ {
+ $poster['id'] = intval($poster_id);
+ if ($poster['id'] > 0) {
+ $com_poster =& $this->_memberHandler->getUser($poster['id']);
+ if (is_object($com_poster)) {
+ $poster['uname'] = '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$poster['id'].'">'.$com_poster->getVar('uname').'</a>';
+ $poster_rank = $com_poster->rank();
+ $poster['rank_image'] = ($poster_rank['image'] != '') ? $poster_rank['image'] : 'blank.gif';
+ $poster['rank_title'] = $poster_rank['title'];
+ $poster['avatar'] = $com_poster->getVar('user_avatar');
+ $poster['regdate'] = formatTimestamp($com_poster->getVar('user_regdate'), 's');
+ $poster['from'] = $com_poster->getVar('user_from');
+ $poster['postnum'] = $com_poster->getVar('posts');
+ $poster['status'] = $com_poster->isOnline() ? _CM_ONLINE : '';
+ return $poster;
+ }
+ }
+ $poster['id'] = 0; // to cope with deleted user accounts
+ $poster['uname'] = $GLOBALS['xoopsConfig']['anonymous'];
+ $poster['rank_title'] = '';
+ $poster['avatar'] = 'blank.gif';
+ $poster['regdate'] = '';
+ $poster['from'] = '';
+ $poster['postnum'] = 0;
+ $poster['status'] = '';
+ return $poster;
+ }
+
+ /**
+ * Get the IMG tag for the title icon
+ *
+ * @param string $icon_image
+ * @return string HTML IMG tag
+ *
+ * @access private
+ **/
+ function _getTitleIcon($icon_image)
+ {
+ $icon_image = htmlspecialchars( trim( $icon_image ) );
+ if ($icon_image != '') {
+ if (false != $this->_doIconCheck) {
+ if (!file_exists(XOOPS_URL.'/images/subject/'.$icon_image)) {
+ return '<img src="'.XOOPS_URL.'/images/icons/no_posticon.gif" alt="" />';
+ } else {
+ return '<img src="'.XOOPS_URL.'/images/subject/'.$icon_image.'" alt="" />';
+ }
+ } else {
+ return '<img src="'.XOOPS_URL.'/images/subject/'.$icon_image.'" alt="" />';
+ }
+ }
+ return '<img src="'.XOOPS_URL.'/images/icons/no_posticon.gif" alt="" />';
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/commentrenderer.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/criteria.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/criteria.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/criteria.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,408 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+// Modified by: Nathan Dial //
+// Date: 20 March 2003 //
+// Desc: added experimental LDAP filter generation code //
+// also refactored to remove about 20 lines of redundant code. //
+// ------------------------------------------------------------------------- //
+
+/**
+ *
+ *
+ * @package kernel
+ * @subpackage database
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * A criteria (grammar?) for a database query.
+ *
+ * Abstract base class should never be instantiated directly.
+ *
+ * @abstract
+ *
+ * @package kernel
+ * @subpackage database
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class CriteriaElement
+{
+ /**
+ * Sort order
+ * @var string
+ */
+ var $order = 'ASC';
+
+ /**
+ * @var string
+ */
+ var $sort = '';
+
+ /**
+ * Number of records to retrieve
+ * @var int
+ */
+ var $limit = 0;
+
+ /**
+ * Offset of first record
+ * @var int
+ */
+ var $start = 0;
+
+ /**
+ * @var string
+ */
+ var $groupby = '';
+
+ /**
+ * Constructor
+ **/
+ function CriteriaElement()
+ {
+
+ }
+
+ /**
+ * Render the criteria element
+ */
+ function render()
+ {
+
+ }
+
+ /**#@+
+ * Accessor
+ */
+ /**
+ * @param string $sort
+ */
+ function setSort($sort)
+ {
+ $this->sort = $sort;
+ }
+
+ /**
+ * @return string
+ */
+ function getSort()
+ {
+ return $this->sort;
+ }
+
+ /**
+ * @param string $order
+ */
+ function setOrder($order)
+ {
+ if ('DESC' == strtoupper($order)) {
+ $this->order = 'DESC';
+ }
+ }
+
+ /**
+ * @return string
+ */
+ function getOrder()
+ {
+ return $this->order;
+ }
+
+ /**
+ * @param int $limit
+ */
+ function setLimit($limit=0)
+ {
+ $this->limit = intval($limit);
+ }
+
+ /**
+ * @return int
+ */
+ function getLimit()
+ {
+ return $this->limit;
+ }
+
+ /**
+ * @param int $start
+ */
+ function setStart($start=0)
+ {
+ $this->start = intval($start);
+ }
+
+ /**
+ * @return int
+ */
+ function getStart()
+ {
+ return $this->start;
+ }
+
+ /**
+ * @param string $group
+ */
+ function setGroupby($group){
+ $this->groupby = $group;
+ }
+
+ /**
+ * @return string
+ */
+ function getGroupby(){
+ return ' GROUP BY '.$this->groupby;
+ }
+ /**#@-*/
+}
+
+/**
+ * Collection of multiple {@link CriteriaElement}s
+ *
+ * @package kernel
+ * @subpackage database
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class CriteriaCompo extends CriteriaElement
+{
+
+ /**
+ * The elements of the collection
+ * @var array Array of {@link CriteriaElement} objects
+ */
+ var $criteriaElements = array();
+
+ /**
+ * Conditions
+ * @var array
+ */
+ var $conditions = array();
+
+ /**
+ * Constructor
+ *
+ * @param object $ele
+ * @param string $condition
+ **/
+ function CriteriaCompo($ele=null, $condition='AND')
+ {
+ if (isset($ele) && is_object($ele)) {
+ $this->add($ele, $condition);
+ }
+ }
+
+ /**
+ * Add an element
+ *
+ * @param object &$criteriaElement
+ * @param string $condition
+ *
+ * @return object reference to this collection
+ **/
+ function &add(&$criteriaElement, $condition='AND')
+ {
+ $this->criteriaElements[] =& $criteriaElement;
+ $this->conditions[] = $condition;
+ return $this;
+ }
+
+ /**
+ * Make the criteria into a query string
+ *
+ * @return string
+ */
+ function render()
+ {
+ $ret = '';
+ $count = count($this->criteriaElements);
+ if ($count > 0) {
+ $ret = '('. $this->criteriaElements[0]->render();
+ for ($i = 1; $i < $count; $i++) {
+ $ret .= ' '.$this->conditions[$i].' '.$this->criteriaElements[$i]->render();
+ }
+ $ret .= ')';
+ }
+ return $ret;
+ }
+
+ /**
+ * Make the criteria into a SQL "WHERE" clause
+ *
+ * @return string
+ */
+ function renderWhere()
+ {
+ $ret = $this->render();
+ $ret = ($ret != '') ? 'WHERE ' . $ret : $ret;
+ return $ret;
+ }
+
+ /**
+ * Generate an LDAP filter from criteria
+ *
+ * @return string
+ * @author Nathan Dial ndial at trillion21.com
+ */
+ function renderLdap(){
+ $retval = '';
+ $count = count($this->criteriaElements);
+ if ($count > 0) {
+ $retval = $this->criteriaElements[0]->renderLdap();
+ for ($i = 1; $i < $count; $i++) {
+ $cond = $this->conditions[$i];
+ if(strtoupper($cond) == 'AND'){
+ $op = '&';
+ } elseif (strtoupper($cond)=='OR'){
+ $op = '|';
+ }
+ $retval = "($op$retval" . $this->criteriaElements[$i]->renderLdap().")";
+ }
+ }
+ return $retval;
+ }
+}
+
+
+/**
+ * A single criteria
+ *
+ * @package kernel
+ * @subpackage database
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class Criteria extends CriteriaElement
+{
+
+ /**
+ * @var string
+ */
+ var $prefix;
+ var $function;
+ var $column;
+ var $operator;
+ var $value;
+
+ /**
+ * Constructor
+ *
+ * @param string $column
+ * @param string $value
+ * @param string $operator
+ **/
+ function Criteria($column, $value='', $operator='=', $prefix = '', $function = '') {
+ $this->prefix = $prefix;
+ $this->function = $function;
+ $this->column = $column;
+ $this->value = $value;
+ $this->operator = $operator;
+ }
+
+ /**
+ * Make a sql condition string
+ *
+ * @return string
+ **/
+ function render() {
+ if ( strtoupper($this->operator) == 'IN' || strtoupper($this->operator) == "NOT IN") {
+ $value = $this->value;
+ } else {
+ if ( '' === ($value = trim($this->value)) ) {
+ return '';
+ }
+ if ( (substr($value, 0, 1) != '`') && (substr($value, -1) != '`') ) {
+ $value = "'".addslashes(stripslashes($value))."'";
+ //$value = "'".$value."'";
+ }
+ }
+ $clause = (!empty($this->prefix) ? "{$this->prefix}." : "") . $this->column;
+ if ( !empty($this->function) ) {
+ $clause = sprintf($this->function, $clause);
+ }
+ $clause .= " {$this->operator} $value";
+ return $clause;
+ }
+
+ /**
+ * Generate an LDAP filter from criteria
+ *
+ * @return string
+ * @author Nathan Dial ndial at trillion21.com, improved by Pierre-Eric MENUET pemen at sourceforge.net
+ */
+ function renderLdap(){
+ if ($this->operator == '>') {
+ $this->operator = '>=';
+ }
+ if ($this->operator == '<') {
+ $this->operator = '<=';
+ }
+
+ if ($this->operator == '!=' || $this->operator == '<>') {
+ $operator = '=';
+ $clause = "(!(" . $this->column . $operator . $this->value . "))";
+ }
+ else {
+ if ($this->operator == 'IN') {
+ $newvalue = str_replace(array('(',')'),'',
+ $this->value);
+ $tab = explode(',',$newvalue);
+ foreach ($tab as $uid)
+ {
+ $clause .= '(' . $this->column . '=' . $uid
+ .')';
+ }
+ $clause = '(|' . $clause . ')';
+ }
+ else {
+ $clause = "(" . $this->column . $this->operator . $this->value . ")";
+ }
+ }
+ return $clause;
+ }
+
+ /**
+ * Make a SQL "WHERE" clause
+ *
+ * @return string
+ */
+ function renderWhere() {
+ $cond = $this->render();
+ return empty($cond) ? '' : "WHERE $cond";
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/criteria.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/database/database.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/database/database.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/database/database.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,132 @@
+<?php
+// $Id$
+// database.php - defines abstract database wrapper class
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+/**
+ * @package kernel
+ * @subpackage database
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * make sure this is only included once!
+ */
+if ( !defined("XOOPS_C_DATABASE_INCLUDED") ) {
+ define("XOOPS_C_DATABASE_INCLUDED",1);
+
+/**
+ * Abstract base class for Database access classes
+ *
+ * @abstract
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage database
+ */
+class XoopsDatabase
+ {
+ /**
+ * Prefix for tables in the database
+ * @var string
+ */
+ var $prefix = '';
+ /**
+ * reference to a {@link XoopsLogger} object
+ * @see XoopsLogger
+ * @var object XoopsLogger
+ */
+ var $logger;
+
+ /**
+ * constructor
+ *
+ * will always fail, because this is an abstract class!
+ */
+ function XoopsDatabase()
+ {
+ // exit("Cannot instantiate this class directly");
+ }
+
+ /**
+ * assign a {@link XoopsLogger} object to the database
+ *
+ * @see XoopsLogger
+ * @param object $logger reference to a {@link XoopsLogger} object
+ */
+ function setLogger(&$logger)
+ {
+ $this->logger =& $logger;
+ }
+
+ /**
+ * set the prefix for tables in the database
+ *
+ * @param string $value table prefix
+ */
+ function setPrefix($value)
+ {
+ $this->prefix = $value;
+ }
+
+ /**
+ * attach the prefix.'_' to a given tablename
+ *
+ * if tablename is empty, only prefix will be returned
+ *
+ * @param string $tablename tablename
+ * @return string prefixed tablename, just prefix if tablename is empty
+ */
+ function prefix($tablename='')
+ {
+ if ( $tablename != '' ) {
+ return $this->prefix .'_'. $tablename;
+ } else {
+ return $this->prefix;
+ }
+ }
+ }
+}
+
+
+/**
+ * Only for backward compatibility
+ *
+ * @deprecated
+ */
+class Database
+{
+
+ function &getInstance()
+ {
+ return XoopsDatabaseFactory::getDatabaseConnection();
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/database/database.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/database/databasefactory.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/database/databasefactory.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/database/databasefactory.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,66 @@
+<?php
+class XoopsDatabaseFactory
+{
+
+ function XoopsDatabaseFactory()
+ {
+ }
+
+ /**
+ * Get a reference to the only instance of database class and connects to DB
+ *
+ * if the class has not been instantiated yet, this will also take
+ * care of that
+ *
+ * @static
+ * @staticvar object The only instance of database class
+ * @return object Reference to the only instance of database class
+ */
+ function &getDatabaseConnection()
+ {
+ static $instance;
+ if (!isset($instance)) {
+ $file = XOOPS_ROOT_PATH.'/class/database/'.XOOPS_DB_TYPE.'database.php';
+ require_once $file;
+ if (!defined('XOOPS_DB_PROXY')) {
+ $class = 'Xoops'.ucfirst(XOOPS_DB_TYPE).'DatabaseSafe';
+ } else {
+ $class = 'Xoops'.ucfirst(XOOPS_DB_TYPE).'DatabaseProxy';
+ }
+ $instance = new $class();
+ $instance->setLogger(XoopsLogger::instance());
+ $instance->setPrefix(XOOPS_DB_PREFIX);
+ if (!$instance->connect()) {
+ trigger_error("Unable to connect to database", E_USER_ERROR);
+ }
+ }
+ return $instance;
+ }
+
+ /**
+ * Gets a reference to the only instance of database class. Currently
+ * only being used within the installer.
+ *
+ * @static
+ * @staticvar object The only instance of database class
+ * @return object Reference to the only instance of database class
+ */
+ function &getDatabase()
+ {
+ static $database;
+ if (!isset($database)) {
+ $file = XOOPS_ROOT_PATH.'/class/database/'.XOOPS_DB_TYPE.'database.php';
+ require_once $file;
+ if (!defined('XOOPS_DB_PROXY')) {
+ $class = 'Xoops'.ucfirst(XOOPS_DB_TYPE).'DatabaseSafe';
+ } else {
+ $class = 'Xoops'.ucfirst(XOOPS_DB_TYPE).'DatabaseProxy';
+ }
+ $database = new $class();
+ }
+ return $database;
+ }
+
+
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/database/databasefactory.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/database/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/database/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/database/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/database/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/database/mysqldatabase.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/database/mysqldatabase.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/database/mysqldatabase.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,406 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package kernel
+ * @subpackage database
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * base class
+ */
+include_once XOOPS_ROOT_PATH."/class/database/database.php";
+
+/**
+ * connection to a mysql database
+ *
+ * @abstract
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage database
+ */
+class XoopsMySQLDatabase extends XoopsDatabase
+{
+ /**
+ * Database connection
+ * @var resource
+ */
+ var $conn;
+
+ /**
+ * connect to the database
+ *
+ * @param bool $selectdb select the database now?
+ * @return bool successful?
+ */
+ function connect($selectdb = true)
+ {
+ extension_loaded('mysql') or trigger_error('mysql extension not loaded', E_USER_ERROR);
+ if (XOOPS_DB_PCONNECT == 1) {
+ $this->conn = @mysql_pconnect(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS);
+ } else {
+ $this->conn = @mysql_connect(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS);
+ }
+
+ if (!$this->conn) {
+ $this->logger->addQuery('', $this->error(), $this->errno());
+ return false;
+ }
+
+ if($selectdb != false){
+ if (!mysql_select_db(XOOPS_DB_NAME)) {
+ $this->logger->addQuery('', $this->error(), $this->errno());
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * generate an ID for a new row
+ *
+ * This is for compatibility only. Will always return 0, because MySQL supports
+ * autoincrement for primary keys.
+ *
+ * @param string $sequence name of the sequence from which to get the next ID
+ * @return int always 0, because mysql has support for autoincrement
+ */
+ function genId($sequence)
+ {
+ return 0; // will use auto_increment
+ }
+
+ /**
+ * Get a result row as an enumerated array
+ *
+ * @param resource $result
+ * @return array
+ */
+ function fetchRow($result)
+ {
+ return @mysql_fetch_row($result);
+ }
+
+ /**
+ * Fetch a result row as an associative array
+ *
+ * @return array
+ */
+ function fetchArray($result)
+ {
+ return @mysql_fetch_assoc( $result );
+ }
+
+ /**
+ * Fetch a result row as an associative array
+ *
+ * @return array
+ */
+ function fetchBoth($result)
+ {
+ return @mysql_fetch_array( $result, MYSQL_BOTH );
+ }
+
+ /**
+ * Get the ID generated from the previous INSERT operation
+ *
+ * @return int
+ */
+ function getInsertId()
+ {
+ return mysql_insert_id($this->conn);
+ }
+
+ /**
+ * Get number of rows in result
+ *
+ * @param resource query result
+ * @return int
+ */
+ function getRowsNum($result)
+ {
+ return @mysql_num_rows($result);
+ }
+
+ /**
+ * Get number of affected rows
+ *
+ * @return int
+ */
+ function getAffectedRows()
+ {
+ return mysql_affected_rows($this->conn);
+ }
+
+ /**
+ * Close MySQL connection
+ *
+ */
+ function close()
+ {
+ mysql_close($this->conn);
+ }
+
+ /**
+ * will free all memory associated with the result identifier result.
+ *
+ * @param resource query result
+ * @return bool TRUE on success or FALSE on failure.
+ */
+ function freeRecordSet($result)
+ {
+ return mysql_free_result($result);
+ }
+
+ /**
+ * Returns the text of the error message from previous MySQL operation
+ *
+ * @return bool Returns the error text from the last MySQL function, or '' (the empty string) if no error occurred.
+ */
+ function error()
+ {
+ return @mysql_error();
+ }
+
+ /**
+ * Returns the numerical value of the error message from previous MySQL operation
+ *
+ * @return int Returns the error number from the last MySQL function, or 0 (zero) if no error occurred.
+ */
+ function errno()
+ {
+ return @mysql_errno();
+ }
+
+ /**
+ * Returns escaped string text with single quotes around it to be safely stored in database
+ *
+ * @param string $str unescaped string text
+ * @return string escaped string text with single quotes around
+ */
+ function quoteString($str) {
+ return ( "'" . str_replace('\\"', '"', addslashes($str) ) . "'" );
+ }
+
+ /**
+ * perform a query on the database
+ *
+ * @param string $sql a valid MySQL query
+ * @param int $limit number of records to return
+ * @param int $start offset of first record to return
+ * @return resource query result or FALSE if successful
+ * or TRUE if successful and no result
+ */
+ function queryF($sql, $limit=0, $start=0)
+ {
+ if ( !empty($limit) ) {
+ if (empty($start)) {
+ $start = 0;
+ }
+ $sql = $sql. ' LIMIT '.(int)$start.', '.(int)$limit;
+ }
+ $query_time = null;
+ if (isset($GLOBALS['xoopsConfig']) && isset($GLOBALS['xoopsConfig']['debug_mode']) && in_array(2, $GLOBALS['xoopsConfig']['debug_mode'])) {
+ //if mysql debug enabled
+ $this->logger->startTime('query_time', false);
+ $result =& mysql_query($sql, $this->conn);
+ $this->logger->stopTime('query_time');
+ $query_time = $this->logger->dumpTime('query_time');
+ }
+ else {
+ //just execute the query
+ $result = mysql_query($sql, $this->conn);
+ }
+ if ( $result ) {
+ $this->logger->addQuery($sql,NULL,NULL,$query_time);
+ return $result;
+ } else {
+ $this->logger->addQuery($sql, $this->error(), $this->errno(), $query_time);
+ return false;
+ }
+ }
+
+ /**
+ * perform a query
+ *
+ * This method is empty and does nothing! It should therefore only be
+ * used if nothing is exactly what you want done! ;-)
+ *
+ * @param string $sql a valid MySQL query
+ * @param int $limit number of records to return
+ * @param int $start offset of first record to return
+ *
+ * @abstract
+ */
+ function query($sql, $limit=0, $start=0)
+ {
+
+ }
+
+ /**
+ * perform queries from SQL dump file in a batch
+ *
+ * @param string $file file path to an SQL dump file
+ *
+ * @return bool FALSE if failed reading SQL file or TRUE if the file has been read and queries executed
+ */
+ function queryFromFile($file){
+ if (false !== ($fp = fopen($file, 'r'))) {
+ include_once XOOPS_ROOT_PATH.'/class/database/sqlutility.php';
+ $sql_queries = trim(fread($fp, filesize($file)));
+ SqlUtility::splitMySqlFile($pieces, $sql_queries);
+ foreach ($pieces as $query) {
+ // [0] contains the prefixed query
+ // [4] contains unprefixed table name
+ $prefixed_query = SqlUtility::prefixQuery(trim($query), $this->prefix());
+ if ($prefixed_query != false) {
+ $this->query($prefixed_query[0]);
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Get field name
+ *
+ * @param resource $result query result
+ * @param int numerical field index
+ * @return string
+ */
+ function getFieldName($result, $offset)
+ {
+ return mysql_field_name($result, $offset);
+ }
+
+ /**
+ * Get field type
+ *
+ * @param resource $result query result
+ * @param int $offset numerical field index
+ * @return string
+ */
+ function getFieldType($result, $offset)
+ {
+ return mysql_field_type($result, $offset);
+ }
+
+ /**
+ * Get number of fields in result
+ *
+ * @param resource $result query result
+ * @return int
+ */
+ function getFieldsNum($result)
+ {
+ return mysql_num_fields($result);
+ }
+}
+
+/**
+ * Safe Connection to a MySQL database.
+ *
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage database
+ */
+class XoopsMySQLDatabaseSafe extends XoopsMySQLDatabase
+{
+
+ /**
+ * perform a query on the database
+ *
+ * @param string $sql a valid MySQL query
+ * @param int $limit number of records to return
+ * @param int $start offset of first record to return
+ * @return resource query result or FALSE if successful
+ * or TRUE if successful and no result
+ */
+ function query($sql, $limit=0, $start=0)
+ {
+ return $this->queryF($sql, $limit, $start);
+ }
+}
+
+/**
+ * Read-Only connection to a MySQL database.
+ *
+ * This class allows only SELECT queries to be performed through its
+ * {@link query()} method for security reasons.
+ *
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage database
+ */
+class XoopsMySQLDatabaseProxy extends XoopsMySQLDatabase
+{
+
+ /**
+ * perform a query on the database
+ *
+ * this method allows only SELECT queries for safety.
+ *
+ * @param string $sql a valid MySQL query
+ * @param int $limit number of records to return
+ * @param int $start offset of first record to return
+ * @return resource query result or FALSE if unsuccessful
+ */
+ function query($sql, $limit=0, $start=0)
+ {
+ $sql = ltrim($sql);
+ if (strtolower(substr($sql, 0, 6)) == 'select') {
+ //if (preg_match("/^SELECT.*/i", $sql)) {
+ return $this->queryF($sql, $limit, $start);
+ }
+ elseif (is_object($GLOBALS['xoopsSecurity']) && !$GLOBALS['xoopsSecurity']->checkReferer()) {
+ $eh =& XoopsErrorHandler::getInstance();
+ $eh->errorPage(1);
+ }
+ $this->logger->addQuery($sql, 'Database update not allowed during processing of a GET request', 0);
+ return false;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/database/mysqldatabase.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/database/sqlutility.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/database/sqlutility.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/database/sqlutility.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,160 @@
+<?php
+// $Id$
+// sqlutility.php - defines utility class for MySQL database
+/**
+ * @package kernel
+ * @subpackage database
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * provide some utility methods for databases
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage database
+ */
+class SqlUtility
+{
+ /**
+ * Function from phpMyAdmin (http://phpwizard.net/projects/phpMyAdmin/)
+ *
+ * Removes comment and splits large sql files into individual queries
+ *
+ * Last revision: September 23, 2001 - gandon
+ *
+ * @param array the splitted sql commands
+ * @param string the sql commands
+ * @return boolean always true
+ * @access public
+ */
+ function splitMySqlFile(&$ret, $sql)
+ {
+ $sql = trim($sql);
+ $sql_len = strlen($sql);
+ $char = '';
+ $string_start = '';
+ $in_string = false;
+
+ for ($i = 0; $i < $sql_len; ++$i) {
+ $char = $sql[$i];
+
+ // We are in a string, check for not escaped end of
+ // strings except for backquotes that can't be escaped
+ if ($in_string) {
+ for (;;) {
+ $i = strpos($sql, $string_start, $i);
+ // No end of string found -> add the current
+ // substring to the returned array
+ if (!$i) {
+ $ret[] = $sql;
+ return true;
+ }
+ // Backquotes or no backslashes before
+ // quotes: it's indeed the end of the
+ // string -> exit the loop
+ else if ($string_start == '`' || $sql[$i-1] != '\\') {
+ $string_start = '';
+ $in_string = false;
+ break;
+ }
+ // one or more Backslashes before the presumed
+ // end of string...
+ else {
+ // first checks for escaped backslashes
+ $j = 2;
+ $escaped_backslash = false;
+ while ($i-$j > 0 && $sql[$i-$j] == '\\') {
+ $escaped_backslash = !$escaped_backslash;
+ $j++;
+ }
+ // ... if escaped backslashes: it's really the
+ // end of the string -> exit the loop
+ if ($escaped_backslash) {
+ $string_start = '';
+ $in_string = false;
+ break;
+ }
+ // ... else loop
+ else {
+ $i++;
+ }
+ } // end if...elseif...else
+ } // end for
+ } // end if (in string)
+ // We are not in a string, first check for delimiter...
+ else if ($char == ';') {
+ // if delimiter found, add the parsed part to the returned array
+ $ret[] = substr($sql, 0, $i);
+ $sql = ltrim(substr($sql, min($i + 1, $sql_len)));
+ $sql_len = strlen($sql);
+ if ($sql_len) {
+ $i = -1;
+ } else {
+ // The submited statement(s) end(s) here
+ return true;
+ }
+ } // end else if (is delimiter)
+ // ... then check for start of a string,...
+ else if (($char == '"') || ($char == '\'') || ($char == '`')) {
+ $in_string = true;
+ $string_start = $char;
+ } // end else if (is start of string)
+
+ // for start of a comment (and remove this comment if found)...
+ else if ($char == '#' || ($char == ' ' && $i > 1 && $sql[$i-2] . $sql[$i-1] == '--')) {
+ // starting position of the comment depends on the comment type
+ $start_of_comment = (($sql[$i] == '#') ? $i : $i-2);
+ // if no "\n" exits in the remaining string, checks for "\r"
+ // (Mac eol style)
+ $end_of_comment = (strpos(' ' . $sql, "\012", $i+2))
+ ? strpos(' ' . $sql, "\012", $i+2)
+ : strpos(' ' . $sql, "\015", $i+2);
+ if (!$end_of_comment) {
+ // no eol found after '#', add the parsed part to the returned
+ // array and exit
+ // RMV fix for comments at end of file
+ $last = trim(substr($sql, 0, $i-1));
+ if (!empty($last)) {
+ $ret[] = $last;
+ }
+ return true;
+ } else {
+ $sql = substr($sql, 0, $start_of_comment) . ltrim(substr($sql, $end_of_comment));
+ $sql_len = strlen($sql);
+ $i--;
+ } // end if...else
+ } // end else if (is comment)
+ } // end for
+
+ // add any rest to the returned array
+ if (!empty($sql) && trim($sql) != '') {
+ $ret[] = $sql;
+ }
+ return true;
+ }
+
+ /**
+ * add a prefix.'_' to all tablenames in a query
+ *
+ * @param string $query valid SQL query string
+ * @param string $prefix prefix to add to all table names
+ * @return mixed FALSE on failure
+ */
+ function prefixQuery($query, $prefix)
+ {
+ $pattern = "/^(INSERT INTO|CREATE TABLE|ALTER TABLE|UPDATE)(\s)+([`]?)([^`\s]+)\\3(\s)+/siU";
+ $pattern2 = "/^(DROP TABLE)(\s)+([`]?)([^`\s]+)\\3(\s)?$/siU";
+ if (preg_match($pattern, $query, $matches) || preg_match($pattern2, $query, $matches)) {
+ $replace = "\\1 ".$prefix."_\\4\\5";
+ $matches[0] = preg_replace($pattern, $replace, $query);
+ return $matches;
+ }
+ return false;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/database/sqlutility.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/downloader.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/downloader.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/downloader.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,141 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+/**
+ * Sends non HTML files through a http socket
+ *
+ * @package kernel
+ * @subpackage core
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsDownloader
+{
+
+ /**#@+
+ * file information
+ */
+ var $mimetype;
+ var $ext;
+ var $archiver;
+ /**#@-*/
+
+ /**
+ * Constructor
+ */
+ function XoopsDownloader()
+ {
+ //EMPTY
+ }
+
+ /**
+ * Send the HTTP header
+ *
+ * @param string $filename
+ *
+ * @access private
+ */
+ function _header($filename)
+ {
+ if (function_exists('mb_http_output')) {
+ mb_http_output('pass');
+ }
+ header('Content-Type: '.$this->mimetype);
+ if (preg_match("/MSIE ([0-9]\.[0-9]{1,2})/", $_SERVER['HTTP_USER_AGENT'])) {
+ header('Content-Disposition: inline; filename="'.$filename.'"');
+ header('Expires: 0');
+ header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+ header('Pragma: public');
+ } else {
+ header('Content-Disposition: attachment; filename="'.$filename.'"');
+ header('Expires: 0');
+ header('Pragma: no-cache');
+ }
+ }
+
+ /**
+ * XoopsDownloader::addFile()
+ *
+ * @param string $filepath
+ * @param string $newfilename
+ **/
+ function addFile($filepath, $newfilename=null)
+ {
+ //EMPTY
+ }
+
+ /**
+ * XoopsDownloader::addBinaryFile()
+ *
+ * @param string $filepath
+ * @param string $newfilename
+ **/
+ function addBinaryFile($filepath, $newfilename=null)
+ {
+ //EMPTY
+ }
+
+ /**
+ * XoopsDownloader::addFileData()
+ *
+ * @param mixed $data
+ * @param string $filename
+ * @param integer $time
+ **/
+ function addFileData(&$data, $filename, $time=0)
+ {
+ //EMPTY
+ }
+
+ /**
+ * XoopsDownloader::addBinaryFileData()
+ *
+ * @param mixed $data
+ * @param string $filename
+ * @param integer $time
+ **/
+ function addBinaryFileData(&$data, $filename, $time=0)
+ {
+ //EMPTY
+ }
+
+ /**
+ * XoopsDownloader::download()
+ *
+ * @param string $name
+ * @param boolean $gzip
+ **/
+ function download($name, $gzip = true)
+ {
+ //EMPTY
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/downloader.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/errorhandler.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/errorhandler.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/errorhandler.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,234 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+/**
+ * Error handler class
+ *
+ * @author Michael van Dam
+ */
+class XoopsErrorHandler
+{
+ /**
+ * List of errors
+ *
+ * @var array
+ * @access private
+ */
+ var $_errors = array();
+
+ /**
+ * Show error messages?
+ *
+ * @var boolean
+ * @access private
+ */
+ var $_showErrors = false;
+
+ /**
+ * Was there a fatal error (E_USER_ERROR)
+ *
+ * @var boolean
+ * @access private
+ */
+ var $_isFatal = false;
+
+ /**
+ * Constructor
+ *
+ * Registers the error handler and shutdown functions. NOTE: when
+ * registering an error handler, the setting or 'error_reporting' is
+ * ignored and *everything* is trapped.
+ */
+ function XoopsErrorHandler()
+ {
+ set_error_handler('XoopsErrorHandler_HandleError');
+ register_shutdown_function('XoopsErrorHandler_Shutdown');
+ }
+
+ /**
+ * Get the (singleton) instance of the error handler
+ *
+ * @access public
+ */
+ function &getInstance()
+ {
+ static $instance = null;
+ if (empty($instance)) {
+ $instance = new XoopsErrorHandler;
+ }
+ return $instance;
+ }
+
+ /**
+ * Activate the error handler
+ *
+ * @access public
+ * @param boolean $showErrors True if debug mode is on
+ * @return void
+ */
+ function activate($showErrors=false)
+ {
+ $this->_showErrors = $showErrors;
+ }
+
+ /**
+ * Handle an error
+ *
+ * @param array $error Associative array containing error info
+ * @access public
+ * @return void
+ */
+ function handleError($error)
+ {
+ if (($error['errno'] & error_reporting()) != $error['errno']) {
+ return;
+ }
+ $this->_errors[] = $error;
+ if ($error['errno'] == E_USER_ERROR) {
+ $this->_isFatal = true;
+ exit();
+ }
+ }
+
+ /**
+ * Redirect to an error page
+ *
+ * @param int $code error code
+ * @param int $moduleid ID of module this error is in
+ *
+ * @return void
+ **/
+ function errorPage($code, $moduleid = 0) {
+ $modstring = $moduleid > 0 ? "m=".intval($moduleid) : "";
+ header("location: ".XOOPS_URL."/error.php?c=".$code.$modstring);
+ exit();
+ }
+
+ /**
+ * Render the list of errors
+ *
+ * NOTE: Unfortunately PHP 'fatal' and 'parse' errors are not trappable.
+ * If the server has 'display_errors Off', then the result will be a
+ * blank page. It would be nice to print a message 'This page cannot
+ * be displayed', but there seems to be no way to print this only when
+ * exiting due to a fatal error rather than normal end of page.
+ *
+ * Thus, 'trigger_error' should be used to trap problems early and
+ * display a meaningful message before a PHP fatal or parse error can
+ * occur.
+ *
+ * @TODO Use CSS
+ * @TODO Use language? or allow customized message?
+ *
+ * @access public
+ * @return void
+ */
+ function renderErrors()
+ {
+ $output = '';
+ if ($this->_isFatal) {
+ // Local supporters should translate/customize this message for a user-friendly appearance
+ $output .= 'This page cannot be displayed due to an internal error.<br/><br/>';
+ $output .= 'If you are the administrator of this site, please visit the <a href="http://www.xoops.org/modules/smartfaq/faq.php?faqid=80" target="_blank">Xoops Troubleshooting Page</a>';
+ // Local supporter need uncomment and customize the line:
+ //$output .= ' or <a href="http://local.xoops.org/TroubleShootingPage/" target="_blank">Xoops Local Support Site</a>';
+ $output .= ' for assistance.<br/><br/>';
+ $output .= 'Helpful infomation you should provide while asking for assistance:<br/><br/>';
+ }
+ if (!$this->_showErrors || empty($this->_errors)) {
+ return $output;
+ }
+
+ foreach( $this->_errors as $error )
+ {
+ switch ( $error['errno'] )
+ {
+ case E_USER_NOTICE:
+ $output .= "Notice [Xoops]: ";
+ break;
+ case E_USER_WARNING:
+ $output .= "Warning [Xoops]: ";
+ break;
+ case E_USER_ERROR:
+ $output .= "Error [Xoops]: ";
+ break;
+ case E_NOTICE:
+ $output .= "Notice [PHP]: ";
+ break;
+ case E_WARNING:
+ $output .= "Warning [PHP]: ";
+ break;
+ default:
+ $output .= "Unknown Condition [" . $error['errno'] . "]: ";
+ }
+ $output .= sprintf( "%s in file %s line %s<br>\n", $error['errstr'], $error['errfile'], $error['errline'] );
+ }
+ return $output;
+ }
+
+}
+
+/**
+ * User-defined error handler (called from 'trigger_error')
+ *
+ * NOTE: Some recent versions of PHP have a 5th parameter, &$p_ErrContext
+ * which is an associative array of all variables defined in scope in which
+ * error occurred. We cannot support this, for compatibility with older PHP.
+ *
+ * @access public
+ * @param int $errNo Type of error
+ * @param string $errStr Error message
+ * @param string $errFile File in which error occurred
+ * @param int $errLine Line number on which error occurred
+ * @return void
+ */
+function XoopsErrorHandler_HandleError($errNo, $errStr, $errFile, $errLine)
+{
+ // NOTE: we only store relative pathnames
+ $new_error = array(
+ 'errno' => $errNo,
+ 'errstr' => $errStr,
+ 'errfile' => preg_replace("|^" . preg_quote(XOOPS_ROOT_PATH) . "/|", '', $errFile),
+ 'errline' => $errLine
+ );
+ $error_handler =& XoopsErrorHandler::getInstance();
+ $error_handler->handleError($new_error);
+}
+
+/**
+ * User-defined shutdown function (called from 'exit')
+ *
+ * @access public
+ * @return void
+ */
+function XoopsErrorHandler_Shutdown()
+{
+ $error_handler =& XoopsErrorHandler::getInstance();
+ echo $error_handler->renderErrors();
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/errorhandler.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/logger.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/logger.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/logger.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,305 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+/**
+ * Collects information for a page request
+ *
+ * <b>Singelton:</b> There can be only one instance of this class and it must
+ * be accessed through the {@link instance()} method!
+ *
+ * records information about database queries, blocks, and execution time
+ * and can display it as HTML
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ */
+class XoopsLogger
+{
+ /**#@+
+ * @var array
+ */
+ var $queries = array();
+ var $blocks = array();
+ var $extra = array();
+ var $logstart = array();
+ var $logend = array();
+ var $executions = array();
+ /**#@-*/
+
+ /**
+ * @var string
+ */
+ var $context;
+
+ /**
+ * constructor
+ *
+ * @access private
+ */
+ function XoopsLogger()
+ {
+
+ }
+
+ /**
+ * get a reference to the only instance of this class
+ *
+ * @return object XoopsLogger reference to the only instance
+ */
+ function &instance()
+ {
+ static $instance;
+ if (!isset($instance)) {
+ $instance = new XoopsLogger();
+ $instance->context = "core";
+ }
+ return $instance;
+ }
+
+ /**
+ * start a timer
+ *
+ * @param string $name name of the timer
+ * @param bool $execution whether to count this timer in the execution time
+ *
+ */
+ function startTime($name = 'XOOPS', $execution = true)
+ {
+ if ($execution) {
+ $this->executions[$name] = true;
+ }
+ $this->logstart[$name] = explode(' ', microtime());
+ }
+
+ /**
+ * stop a timer
+ *
+ * @param string $name name of the timer
+ */
+ function stopTime($name = 'XOOPS')
+ {
+ $this->logend[$name] = explode(' ', microtime());
+ }
+
+ /**
+ * log a database query
+ *
+ * @param string $sql SQL string
+ * @param string $error error message (if any)
+ * @param int $errno error number (if any)
+ * @param int $sql_time query execution time (if any)
+ */
+ function addQuery($sql, $error=null, $errno=null, $sql_time = null)
+ {
+ $this->queries[$this->context][] = array('sql' => $sql, 'error' => $error, 'errno' => $errno, 'sql_time' => $sql_time);
+ }
+
+ /**
+ * log display of a block
+ *
+ * @param string $name name of the block
+ * @param bool $cached was the block cached?
+ * @param int $cachetime cachetime of the block
+ */
+ function addBlock($name, $cached = false, $cachetime = 0, $queries = 0)
+ {
+ $this->blocks[] = array('name' => $name, 'cached' => $cached, 'cachetime' => $cachetime, 'queries' => $queries);
+ }
+
+ /**
+ * log extra information
+ *
+ * @param string $name name for the entry
+ * @param int $msg text message for the entry
+ */
+ function addExtra($name, $msg)
+ {
+ $this->extra[] = array('name' => $name, 'msg' => $msg);
+ }
+
+ /**
+ * get the logged queries in a HTML table
+ *
+ * @param string $context which context to get
+ *
+ * @return string HTML table with queries
+ */
+ function dumpQueries($context)
+ {
+ $ret = '<table class="outer" width="100%" cellspacing="1"><tr><th>Queries '.$context.'</th></tr>';
+ $class = 'even';
+ $sql_time_total = array();
+ if (isset($this->queries[$context])) {
+ foreach ($this->queries[$context] as $q) {
+ if (isset($q['error'])) {
+ $ret .= '<tr class="'.$class.'"><td><span style="color:#ff0000;">'.htmlentities($q['sql']).'<br /><b>Error number:</b> '.$q['errno'].'<br /><b>Error message:</b> '.$q['error'];
+ } else {
+ $ret .= '<tr class="'.$class.'"><td>'.htmlentities($q['sql']);
+ }
+ if(isset($q['sql_time'])){
+ $ret .= '<br />( '.round($q['sql_time'], 6).')';
+ }
+ $ret .= '</span></td></tr>';
+ $class = ($class == 'odd') ? 'even' : 'odd';
+ if(isset($q['sql_time'])){
+ $sql_time_total[] = $q['sql_time'];
+ }
+ }
+ $ret .= '<tr class="foot"><td>Total Number of Queries: <span style="color:#ff0000;">'.count($this->queries[$context]).'</span>';
+ }
+ else {
+ $ret .= '<tr class="foot"><td>Total Number of Queries: <span style="color:#ff0000;">0</span>';
+ }
+ $ret .= ' | Total SQL Generation Time: <span style="color:#ff0000;">'.round(array_sum($sql_time_total), 6).'</span>';
+ $ret .= ' </td></tr></table><br />';
+ return $ret;
+ }
+
+ /**
+ * get the logged blocks in a HTML table
+ *
+ * @return string HTML table with blocks
+ */
+ function dumpBlocks()
+ {
+ $ret = '<table class="outer" width="100%" cellspacing="1"><tr><th colspan="2">Blocks</th></tr>';
+ $class = 'even';
+ foreach ($this->blocks as $b) {
+ if ($b['cached']) {
+ $ret .= '<tr><td class="'.$class.'"><b>'.$b['name'].':</b> Cached (regenerates every '.intval($b['cachetime']).' seconds)</td></tr>';
+ } else {
+ $ret .= '<tr><td class="'.$class.'"><b>'.$b['name'].':</b> ('.$b['queries'].' Queries) No Cache</td></tr>';
+ }
+ $class = ($class == 'odd') ? 'even' : 'odd';
+ }
+ $ret .= '<tr class="foot"><td>Total: <span style="color:#ff0000;">'.count($this->blocks).'</span> blocks</td></tr></table><br />';
+ return $ret;
+ }
+
+ /**
+ * get the current execution time of a timer
+ *
+ * @param string $name name of the counter
+ * @return float current execution time of the counter
+ */
+ function dumpTime($name = 'XOOPS')
+ {
+ if (!isset($this->logstart[$name])) {
+ return 0;
+ }
+ if (!isset($this->logend[$name])) {
+ $stop_time = explode(' ', microtime());
+ } else {
+ $stop_time = $this->logend[$name];
+ }
+ return ((float)$stop_time[1] + (float)$stop_time[0]) - ((float)$this->logstart[$name][1] + (float)$this->logstart[$name][0]);
+ }
+
+ /**
+ * get extra information in a HTML table
+ *
+ * @return string HTML table with extra information
+ */
+ function dumpExtra()
+ {
+ $ret = '<table class="outer" width="100%" cellspacing="1"><tr><th colspan="2">Extra</th></tr>';
+ $class = 'even';
+ foreach ($this->extra as $ex) {
+ $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($ex['name']).':</b> '.htmlspecialchars($ex['msg']).'</td></tr>';
+ $class = ($class == 'odd') ? 'even' : 'odd';
+ }
+ $ret .= '</table><br />';
+ return $ret;
+ }
+
+ /**
+ * get all logged information formatted in HTML tables
+ *
+ * @return string HTML output
+ */
+ function dumpAll()
+ {
+ $ret = $this->dumpQueries('core');
+ $ret .= $this->dumpQueries('module');
+ $ret .= $this->dumpQueries('block');
+ $ret .= $this->dumpBlocks();
+ if (count($this->logstart) > 0) {
+ $ret .= '<table class="outer" width="100%" cellspacing="1"><tr><th>Execution Time</th></tr>';
+ $class = 'even';
+ foreach (array_keys($this->executions) as $k) {
+ $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($k).'</b> took <span style="color:#ff0000;">'.$this->dumpTime($k).'</span> seconds to load.</td></tr>';
+ $class = ($class == 'odd') ? 'even' : 'odd';
+ }
+ $ret .= '</table><br />';
+ }
+ $ret .= $this->dumpExtra();
+ return $ret;
+ }
+
+ /**
+ * Returns javascript for the SQL debug window
+ *
+ * @return string
+ **/
+ function getSQLDebug() {
+ global $xoopsConfig;
+ $ret = '<script type="text/javascript">
+ <!--//
+ debug_window = openWithSelfMain("", "popup", 680, 450, true);
+ debug_window.document.clear();
+ ';
+ $content = '<html><head>
+ <meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" />
+ <meta http-equiv="content-language" content="'._LANGCODE.'" />
+ <title>'.$xoopsConfig['sitename'].'</title>
+ <link rel="stylesheet" type="text/css" media="all" href="'.xoops_getcss($xoopsConfig['theme_set']).'" />
+ </head>
+ <body>'.$this->dumpAll().'
+ <div style="text-align:center;">
+ <input class="formButton" value="'._CLOSE.'" type="button" onclick="javascript:window.close();" />
+ </div>
+ </body>
+ </html>';
+ $lines = preg_split("/(\r\n|\r|\n)( *)/", $content);
+ foreach ($lines as $line) {
+ $ret .= 'debug_window.document.writeln("'.str_replace('"', '\"', $line).'");';
+ }
+ //$ret .= 'debug_window.focus();';
+ $ret .= 'debug_window.document.close();
+ window.focus();
+ //-->
+ </script>';
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/logger.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/mail/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/mail/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/mail/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/mail/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/ChangeLog.txt
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/ChangeLog.txt 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/ChangeLog.txt 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,153 @@
+ChangeLog
+
+* New $Hostname variable
+* New Message-ID header
+* Received header reformat
+* Helo variable default changed to $Hostname
+* Removed extra spaces in Content-Type definition (#667182)
+* Return-Path should be set to Sender when set
+* Adds Q or B encoding to headers when necessary
+* quoted-encoding should now encode NULs \000
+* Fixed encoding of body/AltBody (#553370)
+* Adds "To: undisclosed-recipients:;" when all recipients are hidden (BCC)
+
+Version 1.65 (Fri, Aug 09 2002)
+* Fixed non-visible attachment bug (#585097) for Outlook
+* SMTP connections are now closed after each transaction
+* Fixed SMTP::Expand return value
+* Converted SMTP class documentation to phpDocumentor format
+
+Version 1.62 (Wed, Jun 26 2002)
+* Fixed multi-attach bug
+* Set proper word wrapping
+* Reduced memory use with attachments
+* Added more debugging
+* Changed documentation to phpDocumentor format
+
+Version 1.60 (Sat, Mar 30 2002)
+* Sendmail pipe and address patch (Christian Holtje)
+* Added embedded image and read confirmation support (A. Ognio)
+* Added unit tests
+* Added SMTP timeout support (*nix only)
+* Added possibly temporary PluginDir variable for SMTP class
+* Added LE message line ending variable
+* Refactored boundary and attachment code
+* Eliminated SMTP class warnings
+* Added SendToQueue method for future queuing support
+
+Version 1.54 (Wed, Dec 19 2001)
+* Add some queuing support code
+* Fixed a pesky multi/alt bug
+* Messages are no longer forced to have "To" addresses
+
+Version 1.50 (Thu, Nov 08 2001)
+* Fix extra lines when not using SMTP mailer
+* Set WordWrap variable to int with a zero default
+
+Version 1.47 (Tue, Oct 16 2001)
+* Fixed Received header code format
+* Fixed AltBody order error
+* Fixed alternate port warning
+
+Version 1.45 (Tue, Sep 25 2001)
+* Added enhanced SMTP debug support
+* Added support for multiple ports on SMTP
+* Added Received header for tracing
+* Fixed AddStringAttachment encoding
+* Fixed possible header name quote bug
+* Fixed wordwrap() trim bug
+* Couple other small bug fixes
+
+Version 1.41 (Wed, Aug 22 2001)
+* Fixed AltBody bug w/o attachments
+* Fixed rfc_date() for certain mail servers
+
+Version 1.40 (Sun, Aug 12 2001)
+* Added multipart/alternative support (AltBody)
+* Documentation update
+* Fixed bug in Mercury MTA
+
+Version 1.29 (Fri, Aug 03 2001)
+* Added AddStringAttachment() method
+* Added SMTP authentication support
+
+Version 1.28 (Mon, Jul 30 2001)
+* Fixed a typo in SMTP class
+* Fixed header issue with Imail (win32) SMTP server
+* Made fopen() calls for attachments use "rb" to fix win32 error
+
+Version 1.25 (Mon, Jul 02 2001)
+* Added RFC 822 date fix (Patrice)
+* Added improved error handling by adding a $ErrorInfo variable
+* Removed MailerDebug variable (obsolete with new error handler)
+
+Version 1.20 (Mon, Jun 25 2001)
+* Added quoted-printable encoding (Patrice)
+* Set Version as public and removed PrintVersion()
+* Changed phpdoc to only display public variables and methods
+
+Version 1.19 (Thu, Jun 21 2001)
+* Fixed MS Mail header bug
+* Added fix for Bcc problem with mail(). *Does not work on Win32*
+ (See PHP bug report: http://www.php.net/bugs.php?id=11616)
+* mail() no longer passes a fifth parameter when not needed
+
+Version 1.15 (Fri, Jun 15 2001)
+[Note: these changes contributed by Patrice Fournier]
+* Changed all remaining \n to \r\n
+* Bcc: header no longer writen to message except
+when sent directly to sendmail
+* Added a small message to non-MIME compliant mail reader
+* Added Sender variable to change the Sender email
+used in -f for sendmail/mail and in 'MAIL FROM' for smtp mode
+* Changed boundary setting to a place it will be set only once
+* Removed transfer encoding for whole message when using multipart
+* Message body now uses Encoding in multipart messages
+* Can set encoding and type to attachments 7bit, 8bit
+and binary attachment are sent as is, base64 are encoded
+* Can set Encoding to base64 to send 8 bits body
+through 7 bits servers
+
+Version 1.10 (Tue, Jun 12 2001)
+* Fixed win32 mail header bug (printed out headers in message body)
+
+Version 1.09 (Fri, Jun 08 2001)
+* Changed date header to work with Netscape mail programs
+* Altered phpdoc documentation
+
+Version 1.08 (Tue, Jun 05 2001)
+* Added enhanced error-checking
+* Added phpdoc documentation to source
+
+Version 1.06 (Fri, Jun 01 2001)
+* Added optional name for file attachments
+
+Version 1.05 (Tue, May 29 2001)
+* Code cleanup
+* Eliminated sendmail header warning message
+* Fixed possible SMTP error
+
+Version 1.03 (Thu, May 24 2001)
+* Fixed problem where qmail sends out duplicate messages
+
+Version 1.02 (Wed, May 23 2001)
+* Added multiple recipient and attachment Clear* methods
+* Added Sendmail public variable
+* Fixed problem with loading SMTP library multiple times
+
+Version 0.98 (Tue, May 22 2001)
+* Fixed problem with redundant mail hosts sending out multiple messages
+* Added additional error handler code
+* Added AddCustomHeader() function
+* Added support for Microsoft mail client headers (affects priority)
+* Fixed small bug with Mailer variable
+* Added PrintVersion() function
+
+Version 0.92 (Tue, May 15 2001)
+* Changed file names to class.phpmailer.php and class.smtp.php to match
+ current PHP class trend.
+* Fixed problem where body not being printed when a message is attached
+* Several small bug fixes
+
+Version 0.90 (Tue, April 17 2001)
+* Intial public release
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/LICENSE
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/LICENSE 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/LICENSE 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,504 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/README
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/README 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/README 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,85 @@
+phpmailer - PHP email class
+==============================
+http://phpmailer.sourceforge.net
+
+Please read LICENSE for information on this softwares availability and
+distribution.
+
+Class Features:
+- Send emails with multiple TOs, CCs, BCCs and REPLY-TOs
+- Redundant SMTP servers
+- Multipart/alternative emails for mail clients that do not read HTML email
+- Support for 8bit, base64, binary, and quoted-printable encoding
+- Uses the same methods as the very popular AspEmail active server (COM) component
+- SMTP authentication
+- Word wrap
+- Many more...
+
+Why you might need it:
+
+Many PHP developers utilize email in their code. The only PHP function
+that supports this is the mail() function. However, it does not expose
+any of the popular features that many email clients use nowadays like
+HTML-based emails and attachments. There are two proprietary
+development tools out there that have all the functionality built into
+easy to use classes: AspEmail(tm) and AspMail. Both of these
+programs are COM components only available on Windows. They are also a
+little pricey for smaller projects.
+
+Since I do Linux development Ive missed these tools for my PHP coding.
+So I built a version myself that implements the same methods (object
+calls) that the Windows-based components do. It is open source and the
+LGPL license allows you to place the class in your proprietary PHP
+projects.
+
+
+Installation:
+
+Copy class.phpmailer.php into your php.ini include_path. If you are
+using the SMTP mailer then place class.smtp.php in your path as well.
+
+Example
+
+<?php
+require("class.phpmailer.php");
+
+$mail = new phpmailer();
+
+$mail->IsSMTP(); // set mailer to use SMTP
+$mail->Host = "smtp1.example.com;smtp2.example.com"; // specify main and backup server
+$mail->SMTPAuth = true // turn on SMTP authentication
+$mail->Username = "jswan" // SMTP username
+$mail->Password = "secret" // SMTP password
+
+$mail->From = "from at example.com";
+$mail->FromName = "Mailer";
+$mail->AddAddress("josh at example.net", "Josh Adams");
+$mail->AddAddress("ellen at example.com"); // name is optional
+$mail->AddReplyTo("info at example.com", "Information");
+
+$mail->WordWrap = 50; // set word wrap to 50 characters
+$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments
+$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name
+$mail->IsHTML(true); // set email format to HTML
+
+$mail->Subject = "Here is the subject";
+$mail->Body = "This is the HTML message body <b>in bold!</b>";
+$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
+
+if(!$mail->Send())
+{
+ echo "Message could not be sent. <p>";
+ echo "Mailer Error: " . $mail->ErrorInfo;
+ exit;
+}
+
+echo "Message has been sent";
+?>
+
+CHANGELOG
+
+See ChangeLog.txt
+
+Download: http://sourceforge.net/project/showfiles.php?group_id=26031
+
+Brent R. Matzelle <bmatzelle at yahoo.com>
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/class.phpmailer.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/class.phpmailer.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/class.phpmailer.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,1779 @@
+<?php
+////////////////////////////////////////////////////
+// phpmailer - PHP email class
+//
+// Version 1.65, Created 08/09/2002
+//
+// Class for sending email using either
+// sendmail, PHP mail(), or SMTP. Methods are
+// based upon the standard AspEmail(tm) classes.
+//
+// Author: Brent R. Matzelle <bmatzelle at yahoo.com>
+//
+// License: LGPL, see LICENSE
+////////////////////////////////////////////////////
+
+/**
+ * phpmailer - PHP email transport class
+ * @author Brent R. Matzelle
+ */
+class phpmailer
+{
+ /////////////////////////////////////////////////
+ // PUBLIC VARIABLES
+ /////////////////////////////////////////////////
+
+ /**
+ * Email priority (1 = High, 3 = Normal, 5 = low).
+ * @access public
+ * @var int
+ */
+ var $Priority = 3;
+
+ /**
+ * Sets the CharSet of the message.
+ * @access public
+ * @var string
+ */
+ var $CharSet = "iso-8859-1";
+
+ /**
+ * Sets the Content-type of the message.
+ * @access public
+ * @var string
+ */
+ var $ContentType = "text/plain";
+
+ /**
+ * Sets the Encoding of the message. Options for this are "8bit",
+ * "7bit", "binary", "base64", and "quoted-printable".
+ * @access public
+ * @var string
+ */
+ var $Encoding = "8bit";
+
+ /**
+ * Holds the most recent mailer error message.
+ * @access public
+ * @var string
+ */
+ var $ErrorInfo = "";
+
+ /**
+ * Sets the From email address for the message.
+ * @access public
+ * @var string
+ */
+ var $From = "root at localhost";
+
+ /**
+ * Sets the From name of the message.
+ * @access public
+ * @var string
+ */
+ var $FromName = "Root User";
+
+ /**
+ * Sets the Sender email of the message. If not empty, will be sent via -f to sendmail
+ * or as 'MAIL FROM' in smtp mode.
+ * @access public
+ * @var string
+ */
+ var $Sender = "";
+
+ /**
+ * Sets the Subject of the message.
+ * @access public
+ * @var string
+ */
+ var $Subject = "";
+
+ /**
+ * Sets the Body of the message. This can be either an HTML or text body.
+ * If HTML then run IsHTML(true).
+ * @access public
+ * @var string
+ */
+ var $Body = "";
+
+ /**
+ * Sets the text-only body of the message. This automatically sets the
+ * email to multipart/alternative. This body can be read by mail
+ * clients that do not have HTML email capability such as mutt. Clients
+ * that can read HTML will view the normal Body.
+ * @access public
+ * @var string
+ */
+ var $AltBody = "";
+
+ /**
+ * Sets word wrapping on the body of the message to a given number of
+ * characters.
+ * @access public
+ * @var int
+ */
+ var $WordWrap = 0;
+
+ /**
+ * Method to send mail: ("mail", "sendmail", or "smtp").
+ * @access public
+ * @var string
+ */
+ var $Mailer = "mail";
+
+ /**
+ * Sets the path of the sendmail program.
+ * @access public
+ * @var string
+ */
+ var $Sendmail = "/usr/sbin/sendmail";
+
+ /**
+ * Turns Microsoft mail client headers on and off. Useful mostly
+ * for older clients.
+ * @access public
+ * @var bool
+ */
+ var $UseMSMailHeaders = false;
+
+ /**
+ * Path to phpmailer plugins. This is now only useful if the SMTP class
+ * is in a different directory than the PHP include path.
+ * @access public
+ * @var string
+ */
+ var $PluginDir = "";
+
+ /**
+ * Holds phpmailer version.
+ * @access public
+ * @var string
+ */
+ var $Version = "1.65";
+
+ /**
+ * Sets the email address that a reading confirmation will be sent.
+ * @access public
+ * @var string
+ */
+ var $ConfirmReadingTo = "";
+
+ /**
+ * Sets the line endings of the message.
+ * @access public
+ * @var string
+ */
+ var $LE = "\n";
+
+ /**
+ * Sets the hostname to use in Message-Id and Received headers
+ * and as default HELO string. If empty, the value returned
+ * by SERVER_NAME is used or 'localhost.localdomain'.
+ * @access public
+ * @var string
+ */
+ var $Hostname = "";
+
+
+ /////////////////////////////////////////////////
+ // SMTP VARIABLES
+ /////////////////////////////////////////////////
+
+ /**
+ * Sets the SMTP hosts. All hosts must be separated by a
+ * semicolon. You can also specify a different port
+ * for each host by using this format: [hostname:port]
+ * (e.g. "smtp1.example.com:25;smtp2.example.com").
+ * Hosts will be tried in order.
+ * @access public
+ * @var string
+ */
+ var $Host = "localhost";
+
+ /**
+ * Sets the default SMTP server port.
+ * @access public
+ * @var int
+ */
+ var $Port = 25;
+
+ /**
+ * Sets the SMTP HELO of the message (Default is $Hostname).
+ * @access public
+ * @var string
+ */
+ var $Helo = "";
+
+ /**
+ * Sets SMTP authentication. Utilizes the Username and Password variables.
+ * @access public
+ * @var bool
+ */
+ var $SMTPAuth = false;
+
+ /**
+ * Sets SMTP username.
+ * @access public
+ * @var string
+ */
+ var $Username = "";
+
+ /**
+ * Sets SMTP password.
+ * @access public
+ * @var string
+ */
+ var $Password = "";
+
+ /**
+ * Sets the SMTP server timeout in seconds. This function will not
+ * work with the win32 version.
+ * @access public
+ * @var int
+ */
+ var $Timeout = 10;
+
+ /**
+ * Sets SMTP class debugging on or off.
+ * @access public
+ * @var bool
+ */
+ var $SMTPDebug = false;
+
+
+ /////////////////////////////////////////////////
+ // PRIVATE VARIABLES
+ /////////////////////////////////////////////////
+
+ /**
+ * Holds all "To" addresses.
+ * @access private
+ * @var array
+ */
+ var $to = array();
+
+ /**
+ * Holds all "CC" addresses.
+ * @access private
+ * @var array
+ */
+ var $cc = array();
+
+ /**
+ * Holds all "BCC" addresses.
+ * @access private
+ * @var array
+ */
+ var $bcc = array();
+
+ /**
+ * Holds all "Reply-To" addresses.
+ * @var array
+ */
+ var $ReplyTo = array();
+
+ /**
+ * Holds all string and binary attachments.
+ * @access private
+ * @var array
+ */
+ var $attachment = array();
+
+ /**
+ * Holds all custom headers.
+ * @var array
+ */
+ var $CustomHeader = array();
+
+ /**
+ * Holds the type of the message.
+ * @var string
+ */
+ var $message_type = "";
+
+ /**
+ * Holds the message boundaries.
+ * @access private
+ * @var string array
+ */
+ var $boundary = array();
+
+ /////////////////////////////////////////////////
+ // VARIABLE METHODS
+ /////////////////////////////////////////////////
+
+ /**
+ * Sets message type to HTML. Returns void.
+ * @access public
+ * @return void
+ */
+ function IsHTML($bool) {
+ if($bool == true)
+ $this->ContentType = "text/html";
+ else
+ $this->ContentType = "text/plain";
+ }
+
+ /**
+ * Sets Mailer to send message using SMTP.
+ * Returns void.
+ * @access public
+ * @return void
+ */
+ function IsSMTP() {
+ $this->Mailer = "smtp";
+ }
+
+ /**
+ * Sets Mailer to send message using PHP mail() function.
+ * Returns void.
+ * @access public
+ * @return void
+ */
+ function IsMail() {
+ $this->Mailer = "mail";
+ }
+
+ /**
+ * Sets Mailer to send message using the $Sendmail program.
+ * Returns void.
+ * @access public
+ * @return void
+ */
+ function IsSendmail() {
+ $this->Mailer = "sendmail";
+ }
+
+ /**
+ * Sets Mailer to send message using the qmail MTA. Returns void.
+ * @access public
+ * @return void
+ */
+ function IsQmail() {
+ //$this->Sendmail = "/var/qmail/bin/qmail-inject";
+ $this->Sendmail = "/var/qmail/bin/sendmail";
+ $this->Mailer = "sendmail";
+ }
+
+
+ /////////////////////////////////////////////////
+ // RECIPIENT METHODS
+ /////////////////////////////////////////////////
+
+ /**
+ * Adds a "To" address. Returns void.
+ * @access public
+ * @return void
+ */
+ function AddAddress($address, $name = "") {
+ $cur = count($this->to);
+ $this->to[$cur][0] = trim($address);
+ $this->to[$cur][1] = $name;
+ }
+
+ /**
+ * Adds a "Cc" address. Note: this function works
+ * with the SMTP mailer on win32, not with the "mail"
+ * mailer. This is a PHP bug that has been submitted
+ * on http://bugs.php.net. The *NIX version of PHP
+ * functions correctly. Returns void.
+ * @access public
+ * @return void
+ */
+ function AddCC($address, $name = "") {
+ $cur = count($this->cc);
+ $this->cc[$cur][0] = trim($address);
+ $this->cc[$cur][1] = $name;
+ }
+
+ /**
+ * Adds a "Bcc" address. Note: this function works
+ * with the SMTP mailer on win32, not with the "mail"
+ * mailer. This is a PHP bug that has been submitted
+ * on http://bugs.php.net. The *NIX version of PHP
+ * functions correctly.
+ * Returns void.
+ * @access public
+ * @return void
+ */
+ function AddBCC($address, $name = "") {
+ $cur = count($this->bcc);
+ $this->bcc[$cur][0] = trim($address);
+ $this->bcc[$cur][1] = $name;
+ }
+
+ /**
+ * Adds a "Reply-to" address. Returns void.
+ * @access public
+ * @return void
+ */
+ function AddReplyTo($address, $name = "") {
+ $cur = count($this->ReplyTo);
+ $this->ReplyTo[$cur][0] = trim($address);
+ $this->ReplyTo[$cur][1] = $name;
+ }
+
+
+ /////////////////////////////////////////////////
+ // MAIL SENDING METHODS
+ /////////////////////////////////////////////////
+
+ /**
+ * Creates message and assigns Mailer. If the message is
+ * not sent successfully then it returns false. Use the ErrorInfo
+ * variable to view description of the error. Returns bool.
+ * @access public
+ * @return bool
+ */
+ function Send() {
+ $header = "";
+ $body = "";
+
+ if((count($this->to) + count($this->cc) + count($this->bcc)) < 1)
+ {
+ $this->error_handler("You must provide at least one recipient email address");
+ return false;
+ }
+
+ // Set whether the message is multipart/alternative
+ if(!empty($this->AltBody))
+ $this->ContentType = "multipart/alternative";
+
+ // Attach sender information & date
+ $header = $this->received();
+ $header .= sprintf("Date: %s%s", $this->rfc_date(), $this->LE);
+ $header .= $this->create_header();
+
+ if(!$body = $this->create_body())
+ return false;
+
+ //echo "<pre>".$header . $body . "</pre>"; // debugging
+
+ // Choose the mailer
+ if($this->Mailer == "sendmail")
+ {
+ if(!$this->sendmail_send($header, $body))
+ return false;
+ }
+ elseif($this->Mailer == "mail")
+ {
+ if(!$this->mail_send($header, $body))
+ return false;
+ }
+ elseif($this->Mailer == "smtp")
+ {
+ if(!$this->smtp_send($header, $body))
+ return false;
+ }
+ else
+ {
+ $this->error_handler(sprintf("%s mailer is not supported", $this->Mailer));
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Sends mail message to an assigned queue directory. Has an optional
+ * sendTime argument. This is used when the user wants the
+ * message to be sent from the queue at a predetermined time.
+ * The data must be a valid timestamp like that returned from
+ * the time() or strtotime() functions. Returns false on failure
+ * or the message file name if success.
+ * @access public
+ * @return string
+ */
+ function SendToQueue($queue_path, $send_time = 0) {
+ $message = array();
+ $header = "";
+ $body = "";
+
+ // If invalid or empty just set to the current time
+ if($send_time == 0)
+ $send_time = time();
+
+ if(!is_dir($queue_path))
+ {
+ $this->error_handler("The supplied queue directory does not exist");
+ return false;
+ }
+
+ if((count($this->to) + count($this->cc) + count($this->bcc)) < 1)
+ {
+ $this->error_handler("You must provide at least one recipient email address");
+ return false;
+ }
+
+ // Set whether the message is multipart/alternative
+ if(!empty($this->AltBody))
+ $this->ContentType = "multipart/alternative";
+
+ $header = $this->create_header();
+ if(!$body = $this->create_body())
+ return false;
+
+ // Seed randomizer
+ mt_srand(time());
+ $msg_id = md5(uniqid(mt_rand()));
+
+ $fp = @fopen($queue_path . $msg_id . ".pqm", "wb");
+ if(!$fp)
+ {
+ $this->error_handler(sprintf("Could not write to %s directory", $queue_path));
+ return false;
+ }
+
+ $message[] = sprintf("----START PQM HEADER----%s", $this->LE);
+ $message[] = sprintf("SendTime: %s%s", $send_time, $this->LE);
+ $message[] = sprintf("Mailer: %s%s", $this->Mailer, $this->LE);
+
+ // Choose the mailer
+ if($this->Mailer == "sendmail")
+ {
+ $message[] = sprintf("Sendmail: %s%s", $this->Sendmail, $this->LE);
+ $message[] = sprintf("Sender: %s%s", $this->Sender, $this->LE);
+ }
+ elseif($this->Mailer == "mail")
+ {
+ $message[] = sprintf("Sender: %s%s", $this->Sender, $this->LE);
+ $message[] = sprintf("Subject: %s%s", $this->Subject, $this->LE);
+ $message[] = sprintf("to: %s%s", $this->addr_list($this->to), $this->LE);
+ }
+ elseif($this->Mailer == "smtp")
+ {
+ $message[] = sprintf("Host: %s%s", $this->Host, $this->LE);
+ $message[] = sprintf("Port: %d%s", $this->Port, $this->LE);
+ $message[] = sprintf("Helo: %s%s", $this->Helo, $this->LE);
+ $message[] = sprintf("Timeout: %d%s", $this->Timeout, $this->LE);
+
+ if($this->SMTPAuth)
+ $auth_no = 1;
+ else
+ $auth_no = 0;
+ $message[] = sprintf("SMTPAuth: %d%s", $auth_no, $this->LE);
+ $message[] = sprintf("Username: %s%s", $this->Username, $this->LE);
+ $message[] = sprintf("Password: %s%s", $this->Password, $this->LE);
+ $message[] = sprintf("From: %s%s", $this->From, $this->LE);
+
+ $message[] = sprintf("to: %s%s", $this->addr_list($this->to), $this->LE);
+ $message[] = sprintf("cc: %s%s", $this->addr_list($this->cc), $this->LE);
+ $message[] = sprintf("bcc: %s%s", $this->addr_list($this->bcc), $this->LE);
+ }
+ else
+ {
+ $this->error_handler(sprintf("%s mailer is not supported", $this->Mailer));
+ return false;
+ }
+
+ $message[] = sprintf("----END PQM HEADER----%s", $this->LE); // end of pqm header
+ $message[] = $header;
+ $message[] = $body;
+
+ if(fwrite($fp, join("", $message)) == -1)
+ {
+ $this->error_handler("Write to file failed");
+ return false;
+ }
+ fclose($fp);
+
+ return ($msg_id . ".pqm");
+ }
+
+ /**
+ * Sends mail using the $Sendmail program. Returns bool.
+ * @access private
+ * @return bool
+ */
+ function sendmail_send($header, $body) {
+ if ($this->Sender != "")
+ $sendmail = sprintf("%s -oi -f %s -t", $this->Sendmail, $this->Sender);
+ else
+ $sendmail = sprintf("%s -oi -t", $this->Sendmail);
+
+ if(!@$mail = popen($sendmail, "w"))
+ {
+ $this->error_handler(sprintf("Could not execute %s", $this->Sendmail));
+ return false;
+ }
+
+ fputs($mail, $header);
+ fputs($mail, $body);
+
+ $result = pclose($mail) >> 8 & 0xFF;
+ if($result != 0)
+ {
+ $this->error_handler(sprintf("Could not execute %s", $this->Sendmail));
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Sends mail using the PHP mail() function. Returns bool.
+ * @access private
+ * @return bool
+ */
+ function mail_send($header, $body) {
+ //$to = substr($this->addr_append("To", $this->to), 4, -2);
+
+ // Cannot add Bcc's to the $to
+ $to = $this->to[0][0]; // no extra comma
+ for($i = 1; $i < count($this->to); $i++)
+ $to .= sprintf(",%s", $this->to[$i][0]);
+
+ if ($this->Sender != "" && PHP_VERSION >= "4.0")
+ {
+ $old_from = ini_get("sendmail_from");
+ ini_set("sendmail_from", $this->Sender);
+ }
+
+ if ($this->Sender != "" && PHP_VERSION >= "4.0.5")
+ {
+ // The fifth parameter to mail is only available in PHP >= 4.0.5
+ $params = sprintf("-oi -f %s", $this->Sender);
+ $rt = @mail($to, $this->encode_header($this->Subject), $body, $header, $params);
+ }
+ else
+ {
+ $rt = @mail($to, $this->encode_header($this->Subject), $body, $header);
+ }
+
+ if (isset($old_from))
+ ini_set("sendmail_from", $old_from);
+
+ if(!$rt)
+ {
+ $this->error_handler("Could not instantiate mail()");
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Sends mail via SMTP using PhpSMTP (Author:
+ * Chris Ryan). Returns bool. Returns false if there is a
+ * bad MAIL FROM, RCPT, or DATA input.
+ * @access private
+ * @return bool
+ */
+ function smtp_send($header, $body) {
+ // Include SMTP class code, but not twice
+ include_once($this->PluginDir . "class.smtp.php");
+
+ $smtp = new SMTP;
+
+ $smtp->do_debug = $this->SMTPDebug;
+
+ // Try to connect to all SMTP servers
+ $hosts = explode(";", $this->Host);
+ $index = 0;
+ $connection = false;
+ $smtp_from = "";
+ $bad_rcpt = array();
+ $e = "";
+
+ // Retry while there is no connection
+ while($index < count($hosts) && $connection == false)
+ {
+ if(strstr($hosts[$index], ":"))
+ list($host, $port) = explode(":", $hosts[$index]);
+ else
+ {
+ $host = $hosts[$index];
+ $port = $this->Port;
+ }
+
+ if($smtp->Connect($host, $port, $this->Timeout))
+ $connection = true;
+ //printf("%s host could not connect<br>", $hosts[$index]); //debug only
+ $index++;
+ }
+ if(!$connection)
+ {
+ $this->error_handler("SMTP Error: could not connect to SMTP host server(s)");
+ return false;
+ }
+
+ // Must perform HELO before authentication
+ if ($this->Helo != '')
+ $smtp->Hello($this->Helo);
+ else
+ $smtp->Hello($this->get_server_hostname());
+
+ // If user requests SMTP authentication
+ if($this->SMTPAuth)
+ {
+ if(!$smtp->Authenticate($this->Username, $this->Password))
+ {
+ $this->error_handler("SMTP Error: Could not authenticate");
+ return false;
+ }
+ }
+
+ if ($this->Sender == "")
+ $smtp_from = $this->From;
+ else
+ $smtp_from = $this->Sender;
+
+ if(!$smtp->Mail(sprintf("<%s>", $smtp_from)))
+ {
+ $e = sprintf("SMTP Error: From address [%s] failed", $smtp_from);
+ $this->error_handler($e);
+ return false;
+ }
+
+ // Attempt to send attach all recipients
+ for($i = 0; $i < count($this->to); $i++)
+ {
+ if(!$smtp->Recipient(sprintf("<%s>", $this->to[$i][0])))
+ $bad_rcpt[] = $this->to[$i][0];
+ }
+ for($i = 0; $i < count($this->cc); $i++)
+ {
+ if(!$smtp->Recipient(sprintf("<%s>", $this->cc[$i][0])))
+ $bad_rcpt[] = $this->cc[$i][0];
+ }
+ for($i = 0; $i < count($this->bcc); $i++)
+ {
+ if(!$smtp->Recipient(sprintf("<%s>", $this->bcc[$i][0])))
+ $bad_rcpt[] = $this->bcc[$i][0];
+ }
+
+ // Create error message
+ if(count($bad_rcpt) > 0)
+ {
+ for($i = 0; $i < count($bad_rcpt); $i++)
+ {
+ if($i != 0)
+ $e .= ", ";
+ $e .= $bad_rcpt[$i];
+ }
+ $e = sprintf("SMTP Error: The following recipients failed [%s]", $e);
+ $this->error_handler($e);
+
+ return false;
+ }
+
+
+ if(!$smtp->Data(sprintf("%s%s", $header, $body)))
+ {
+ $this->error_handler("SMTP Error: Data not accepted");
+ return false;
+ }
+ $smtp->Quit();
+ $smtp->Close();
+
+ return true;
+ }
+
+
+ /////////////////////////////////////////////////
+ // MESSAGE CREATION METHODS
+ /////////////////////////////////////////////////
+
+ /**
+ * Creates recipient headers. Returns string.
+ * @access private
+ * @return string
+ */
+ function addr_append($type, $addr) {
+ $addr_str = $type . ": ";
+ $addr_str .= $this->addr_format($addr[0]);
+ if(count($addr) > 1)
+ {
+ for($i = 1; $i < count($addr); $i++)
+ {
+ $addr_str .= sprintf(", %s", $this->addr_format($addr[$i]));
+ }
+ $addr_str .= $this->LE;
+ }
+ else
+ $addr_str .= $this->LE;
+
+ return($addr_str);
+ }
+
+ /**
+ * Creates a semicolon delimited list for use in pqm files.
+ * @access private
+ * @return string
+ */
+ function addr_list($list_array) {
+ $addr_list = "";
+ for($i = 0; $i < count($list_array); $i++)
+ {
+ if($i > 0)
+ $addr_list .= ";";
+ $addr_list .= $list_array[$i][0];
+ }
+
+ return $addr_list;
+ }
+
+ /**
+ * Formats an address correctly.
+ * @access private
+ * @return string
+ */
+ function addr_format($addr) {
+ if(empty($addr[1]))
+ $formatted = $addr[0];
+ else
+ $formatted = sprintf('%s <%s>', $this->encode_header($addr[1], 'phrase'), $addr[0]);
+
+ return $formatted;
+ }
+
+ /**
+ * Wraps message for use with mailers that do not
+ * automatically perform wrapping and for quoted-printable.
+ * Original written by philippe. Returns string.
+ * @access private
+ * @return string
+ */
+ function word_wrap($message, $length, $qp_mode = false) {
+ if ($qp_mode)
+ $soft_break = sprintf(" =%s", $this->LE);
+ else
+ $soft_break = $this->LE;
+
+ $message = $this->fix_eol($message);
+ if (substr($message, -1) == $this->LE)
+ $message = substr($message, 0, -1);
+
+ $line = explode($this->LE, $message);
+ $message = "";
+ for ($i=0 ;$i < count($line); $i++)
+ {
+ $line_part = explode(" ", $line[$i]);
+ $buf = "";
+ for ($e = 0; $e<count($line_part); $e++)
+ {
+ $word = $line_part[$e];
+ if ($qp_mode and (strlen($word) > $length))
+ {
+ $space_left = $length - strlen($buf) - 1;
+ if ($e != 0)
+ {
+ if ($space_left > 20)
+ {
+ $len = $space_left;
+ if (substr($word, $len - 1, 1) == "=")
+ $len--;
+ elseif (substr($word, $len - 2, 1) == "=")
+ $len -= 2;
+ $part = substr($word, 0, $len);
+ $word = substr($word, $len);
+ $buf .= " " . $part;
+ $message .= $buf . sprintf("=%s", $this->LE);
+ }
+ else
+ {
+ $message .= $buf . $soft_break;
+ }
+ $buf = "";
+ }
+ while (strlen($word) > 0)
+ {
+ $len = $length;
+ if (substr($word, $len - 1, 1) == "=")
+ $len--;
+ elseif (substr($word, $len - 2, 1) == "=")
+ $len -= 2;
+ $part = substr($word, 0, $len);
+ $word = substr($word, $len);
+
+ if (strlen($word) > 0)
+ $message .= $part . sprintf("=%s", $this->LE);
+ else
+ $buf = $part;
+ }
+ }
+ else
+ {
+ $buf_o = $buf;
+ if ($e == 0)
+ $buf .= $word;
+ else
+ $buf .= " " . $word;
+ if (strlen($buf) > $length and $buf_o != "")
+ {
+ $message .= $buf_o . $soft_break;
+ $buf = $word;
+ }
+ }
+ }
+ $message .= $buf . $this->LE;
+ }
+
+ return ($message);
+ }
+
+ /**
+ * Set the body wrapping.
+ * @access private
+ * @return void
+ */
+ function SetWordWrap() {
+ if($this->WordWrap < 1)
+ return;
+
+ switch($this->message_type)
+ {
+ case "alt":
+ case "alt_attachment":
+ $this->AltBody = $this->word_wrap($this->AltBody, $this->WordWrap);
+ break;
+ default:
+ $this->Body = $this->word_wrap($this->Body, $this->WordWrap);
+ break;
+ }
+ }
+
+ /**
+ * Assembles message header. Returns a string if successful
+ * or false if unsuccessful.
+ * @access private
+ * @return string
+ */
+ function create_header() {
+ $header = array();
+
+ // Set the boundaries
+ $uniq_id = md5(uniqid(time()));
+ $this->boundary[1] = "b1_" . $uniq_id;
+ $this->boundary[2] = "b2_" . $uniq_id;
+
+ // To be created automatically by mail()
+ if($this->Mailer != "mail")
+ {
+ if(count($this->to) > 0)
+ $header[] = $this->addr_append("To", $this->to);
+ else if (count($this->cc) == 0)
+ $header[] = "To: undisclosed-recipients:;".$this->LE;
+ }
+
+ $from = array();
+ $from[0][0] = trim($this->From);
+ $from[0][1] = $this->FromName;
+ $header[] = $this->addr_append("From", $from);
+
+ if(count($this->cc) > 0)
+ $header[] = $this->addr_append("Cc", $this->cc);
+
+ // sendmail and mail() extract Bcc from the header before sending
+ if((($this->Mailer == "sendmail") || ($this->Mailer == "mail")) && (count($this->bcc) > 0))
+ $header[] = $this->addr_append("Bcc", $this->bcc);
+
+ if(count($this->ReplyTo) > 0)
+ $header[] = $this->addr_append("Reply-to", $this->ReplyTo);
+
+ // mail() sets the subject itself
+ if($this->Mailer != "mail")
+ $header[] = sprintf("Subject: %s%s", $this->encode_header(trim($this->Subject)), $this->LE);
+
+ $header[] = sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->get_server_hostname(), $this->LE);
+ $header[] = sprintf("X-Priority: %d%s", $this->Priority, $this->LE);
+ $header[] = sprintf("X-Mailer: phpmailer [version %s]%s", $this->Version, $this->LE);
+ if($this->Sender == "")
+ $header[] = sprintf("Return-Path: %s%s", trim($this->From), $this->LE);
+ else
+ $header[] = sprintf("Return-Path: %s%s", trim($this->Sender), $this->LE);
+
+ if($this->ConfirmReadingTo != "")
+ $header[] = sprintf("Disposition-Notification-To: <%s>%s",
+ trim($this->ConfirmReadingTo), $this->LE);
+
+ // Add custom headers
+ for($index = 0; $index < count($this->CustomHeader); $index++)
+ $header[] = sprintf("%s: %s%s", trim($this->CustomHeader[$index][0]), $this->encode_header(trim($this->CustomHeader[$index][1])), $this->LE);
+
+ if($this->UseMSMailHeaders)
+ $header[] = $this->AddMSMailHeaders();
+
+ $header[] = sprintf("MIME-Version: 1.0%s", $this->LE);
+
+ // Determine what type of message this is
+ if(count($this->attachment) < 1 && strlen($this->AltBody) < 1)
+ $this->message_type = "plain";
+ else
+ {
+ if(count($this->attachment) > 0)
+ $this->message_type = "attachments";
+ if(strlen($this->AltBody) > 0 && count($this->attachment) < 1)
+ $this->message_type = "alt";
+ if(strlen($this->AltBody) > 0 && count($this->attachment) > 0)
+ $this->message_type = "alt_attachments";
+ }
+
+ switch($this->message_type)
+ {
+ case "plain":
+ $header[] = sprintf("Content-Transfer-Encoding: %s%s",
+ $this->Encoding, $this->LE);
+ $header[] = sprintf("Content-Type: %s; charset=\"%s\"",
+ $this->ContentType, $this->CharSet);
+ break;
+ case "attachments":
+ case "alt_attachments":
+ if($this->EmbeddedImageCount() > 0)
+ {
+ $header[] = sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s",
+ "multipart/related", $this->LE, $this->LE,
+ $this->boundary[1], $this->LE);
+ }
+ else
+ {
+ $header[] = sprintf("Content-Type: %s;%s",
+ "multipart/mixed", $this->LE);
+ $header[] = sprintf("\tboundary=\"%s\"%s", $this->boundary[1], $this->LE);
+ }
+ break;
+ case "alt":
+ $header[] = sprintf("Content-Type: %s;%s",
+ "multipart/alternative", $this->LE);
+ $header[] = sprintf("\tboundary=\"%s\"%s", $this->boundary[1], $this->LE);
+ break;
+ }
+
+ // No additional lines when using mail() function
+ if($this->Mailer != "mail")
+ $header[] = $this->LE.$this->LE;
+
+ return(join("", $header));
+ }
+
+ /**
+ * Assembles the message body. Returns a string if successful
+ * or false if unsuccessful.
+ * @access private
+ * @return string
+ */
+ function create_body() {
+ $body = array();
+
+ $this->SetWordWrap();
+
+ switch($this->message_type)
+ {
+ case "alt":
+ // Return text of body
+ $bndry = new Boundary($this->boundary[1]);
+ $bndry->CharSet = $this->CharSet;
+ $bndry->Encoding = $this->Encoding;
+ $body[] = $bndry->GetSource();
+
+ $body[] = $this->encode_string($this->AltBody, $this->Encoding);
+ $body[] = $this->LE.$this->LE;
+
+ $bndry = new Boundary($this->boundary[1]);
+ $bndry->CharSet = $this->CharSet;
+ $bndry->ContentType = "text/html";
+ $bndry->Encoding = $this->Encoding;
+ $body[] = $bndry->GetSource();
+
+ $body[] = $this->encode_string($this->Body, $this->Encoding);
+ $body[] = $this->LE.$this->LE;
+
+ // End the boundary
+ $body[] = sprintf("%s--%s--%s", $this->LE,
+ $this->boundary[1], $this->LE.$this->LE);
+ break;
+ case "plain":
+ $body[] = $this->encode_string($this->Body, $this->Encoding);
+ break;
+ case "attachments":
+ $bndry = new Boundary($this->boundary[1]);
+ $bndry->CharSet = $this->CharSet;
+ $bndry->ContentType = $this->ContentType;
+ $bndry->Encoding = $this->Encoding;
+ $body[] = $bndry->GetSource(false) . $this->LE;
+ $body[] = $this->encode_string($this->Body, $this->Encoding);
+ $body[] = $this->LE;
+
+ if(!$body[] = $this->attach_all())
+ return false;
+ break;
+ case "alt_attachments":
+ $body[] = sprintf("--%s%s", $this->boundary[1], $this->LE);
+ $body[] = sprintf("Content-Type: %s;%s" .
+ "\tboundary=\"%s\"%s",
+ "multipart/alternative", $this->LE,
+ $this->boundary[2], $this->LE.$this->LE);
+
+ // Create text body
+ $bndry = new Boundary($this->boundary[2]);
+ $bndry->CharSet = $this->CharSet;
+ $bndry->ContentType = "text/plain";
+ $bndry->Encoding = $this->Encoding;
+ $body[] = $bndry->GetSource() . $this->LE;
+
+ $body[] = $this->encode_string($this->AltBody, $this->Encoding);
+ $body[] = $this->LE.$this->LE;
+
+ // Create the HTML body
+ $bndry = new Boundary($this->boundary[2]);
+ $bndry->CharSet = $this->CharSet;
+ $bndry->ContentType = "text/html";
+ $bndry->Encoding = $this->Encoding;
+ $body[] = $bndry->GetSource() . $this->LE;
+
+ $body[] = $this->encode_string($this->Body, $this->Encoding);
+ $body[] = $this->LE.$this->LE;
+
+ $body[] = sprintf("%s--%s--%s", $this->LE,
+ $this->boundary[2], $this->LE.$this->LE);
+
+ if(!$body[] = $this->attach_all())
+ return false;
+ break;
+ }
+ $sBody = join("", $body);
+
+ return $sBody;
+ }
+
+
+ /////////////////////////////////////////////////
+ // ATTACHMENT METHODS
+ /////////////////////////////////////////////////
+
+ /**
+ * Adds an attachment from a path on the filesystem.
+ * Checks if attachment is valid and then adds
+ * the attachment to the list.
+ * Returns false if the file could not be found
+ * or accessed.
+ * @access public
+ * @return bool
+ */
+ function AddAttachment($path, $name = "", $encoding = "base64", $type = "application/octet-stream") {
+ if(!@is_file($path))
+ {
+ $this->error_handler(sprintf("Could not access [%s] file", $path));
+ return false;
+ }
+
+ $filename = basename($path);
+ if($name == "")
+ $name = $filename;
+
+ // Append to $attachment array
+ $cur = count($this->attachment);
+ $this->attachment[$cur][0] = $path;
+ $this->attachment[$cur][1] = $filename;
+ $this->attachment[$cur][2] = $name;
+ $this->attachment[$cur][3] = $encoding;
+ $this->attachment[$cur][4] = $type;
+ $this->attachment[$cur][5] = false; // isStringAttachment
+ $this->attachment[$cur][6] = "attachment";
+ $this->attachment[$cur][7] = 0;
+
+ return true;
+ }
+
+ /**
+ * Attaches all fs, string, and binary attachments to the message.
+ * Returns a string if successful or false if unsuccessful.
+ * @access private
+ * @return string
+ */
+ function attach_all() {
+ // Return text of body
+ $mime = array();
+
+ // Add all attachments
+ for($i = 0; $i < count($this->attachment); $i++)
+ {
+ // Check for string attachment
+ $bString = $this->attachment[$i][5];
+ if ($bString)
+ {
+ $string = $this->attachment[$i][0];
+ }
+ else
+ {
+ $path = $this->attachment[$i][0];
+ }
+ $filename = $this->attachment[$i][1];
+ $name = $this->attachment[$i][2];
+ $encoding = $this->attachment[$i][3];
+ $type = $this->attachment[$i][4];
+ $disposition = $this->attachment[$i][6];
+ $cid = $this->attachment[$i][7];
+
+ $mime[] = sprintf("--%s%s", $this->boundary[1], $this->LE);
+ $mime[] = sprintf("Content-Type: %s; name=\"%s\"%s", $type, $name, $this->LE);
+ $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE);
+
+ if($disposition == "inline")
+ $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE);
+
+ $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s",
+ $disposition, $name, $this->LE.$this->LE);
+
+ // Encode as string attachment
+ if($bString)
+ {
+ if(!$mime[] = $this->encode_string($string, $encoding))
+ return false;
+ $mime[] = $this->LE.$this->LE;
+ }
+ else
+ {
+ if(!$mime[] = $this->encode_file($path, $encoding))
+ return false;
+ $mime[] = $this->LE.$this->LE;
+ }
+ }
+
+ $mime[] = sprintf("--%s--%s", $this->boundary[1], $this->LE);
+
+ return(join("", $mime));
+ }
+
+ /**
+ * Encodes attachment in requested format. Returns a
+ * string if successful or false if unsuccessful.
+ * @access private
+ * @return string
+ */
+ function encode_file ($path, $encoding = "base64") {
+ if(!@$fd = fopen($path, "rb"))
+ {
+ $this->error_handler(sprintf("File Error: Could not open file %s", $path));
+ return false;
+ }
+ $file_buffer = fread($fd, filesize($path));
+ $file_buffer = $this->encode_string($file_buffer, $encoding);
+ fclose($fd);
+
+ return $file_buffer;
+ }
+
+ /**
+ * Encodes string to requested format. Returns a
+ * string if successful or false if unsuccessful.
+ * @access private
+ * @return string
+ */
+ function encode_string ($str, $encoding = "base64") {
+ switch(strtolower($encoding)) {
+ case "base64":
+ // chunk_split is found in PHP >= 3.0.6
+ $encoded = chunk_split(base64_encode($str));
+ break;
+
+ case "7bit":
+ case "8bit":
+ $encoded = $this->fix_eol($str);
+ if (substr($encoded, -2) != $this->LE)
+ $encoded .= $this->LE;
+ break;
+
+ case "binary":
+ $encoded = $str;
+ break;
+
+ case "quoted-printable":
+ $encoded = $this->encode_qp($str);
+ break;
+
+ default:
+ $this->error_handler(sprintf("Unknown encoding: %s", $encoding));
+ return false;
+ }
+ return($encoded);
+ }
+
+ /**
+ * Encode a header string to best of Q, B, quoted or none. Returns a string.
+ * @access private
+ * @return string
+ */
+ function encode_header ($str, $position = 'text') {
+ $x = 0;
+
+ switch (strtolower($position)) {
+ case 'phrase':
+ if (preg_match_all('/[\200-\377]/', $str, $matches) == 0) {
+ // Can't use addslashes as we don't know what value has magic_quotes_sybase.
+ $encoded = addcslashes($str, '\000-\037\177');
+ $encoded = preg_replace('/([\"])/', '\\"', $encoded);
+
+ if (($str == $encoded) && (preg_match_all('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str, $matches) == 0))
+ return ($encoded);
+ else
+ return ("\"$encoded\"");
+ }
+ $x = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches);
+ break;
+ case 'comment':
+ $x = preg_match_all('/[()"]/', $str, $matches);
+ // Fall-through
+ case 'text':
+ default:
+ $x += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches);
+ break;
+ }
+
+ if ($x == 0)
+ return ($str);
+
+ $maxlen = 75 - 7 - strlen($this->CharSet);
+ // Try to select the encoding which should produce the shortest output
+// if (strlen($str)/3 < $x) {
+ $encoding = 'B';
+ $encoded = base64_encode($str);
+ $maxlen -= $maxlen % 4;
+ $encoded = trim(chunk_split($encoded, $maxlen, "\n"));
+// } else {
+// $encoding = 'Q';
+// $encoded = $this->encode_q($str, $position);
+// $encoded = $this->word_wrap($encoded, $maxlen, true);
+// $encoded = str_replace("=".$this->LE, "\n", trim($encoded));
+// }
+
+ $encoded = preg_replace('/^(.*)$/m', " =?".$this->CharSet."?$encoding?\\1?=", $encoded);
+ $encoded = trim(str_replace("\n", $this->LE, $encoded));
+
+ return($encoded);
+ }
+
+ /**
+ * Encode string to quoted-printable. Returns a string.
+ * @access private
+ * @return string
+ */
+ function encode_qp ($str) {
+ $encoded = $this->fix_eol($str);
+ if (substr($encoded, -2) != $this->LE)
+ $encoded .= $this->LE;
+
+ // Replace every high ascii, control and = characters
+ $encoded = preg_replace('/([\000-\010\013\014\016-\037\075\177-\377])/e',
+ "'='.sprintf('%02X', ord('\\1'))", $encoded);
+ // Replace every spaces and tabs when it's the last character on a line
+ $encoded = preg_replace("/([\011\040])".$this->LE."/e",
+ "'='.sprintf('%02X', ord('\\1')).'".$this->LE."'", $encoded);
+
+ // Maximum line length of 76 characters before CRLF (74 + space + '=')
+ $encoded = $this->word_wrap($encoded, 74, true);
+
+ return $encoded;
+ }
+
+ /**
+ * Encode string to q encoding. Returns a string.
+ * @access private
+ * @return string
+ */
+ function encode_q ($str, $position = 'text') {
+ // There should not be any EOL in the string
+ $encoded = preg_replace("[\r\n]", "", $str);
+
+ switch (strtolower($position)) {
+ case 'phrase':
+ $encoded = preg_replace("/([^A-Za-z0-9!*+\/ -])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);
+ break;
+ case 'comment':
+ $encoded = preg_replace("/([\(\)\"])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);
+ // Fall-through
+ case 'text':
+ default:
+ // Replace every high ascii, control =, ? and _ characters
+ $encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e',
+ "'='.sprintf('%02X', ord('\\1'))", $encoded);
+ break;
+ }
+
+ // Replace every spaces to _ (more readable than =20)
+ $encoded = str_replace(" ", "_", $encoded);
+
+ return $encoded;
+ }
+
+ /**
+ * Adds a string or binary attachment (non-filesystem) to the list.
+ * This method can be used to attach ascii or binary data,
+ * such as a BLOB record from a database.
+ * @access public
+ * @return void
+ */
+ function AddStringAttachment($string, $filename, $encoding = "base64", $type = "application/octet-stream") {
+ // Append to $attachment array
+ $cur = count($this->attachment);
+ $this->attachment[$cur][0] = $string;
+ $this->attachment[$cur][1] = $filename;
+ $this->attachment[$cur][2] = $filename;
+ $this->attachment[$cur][3] = $encoding;
+ $this->attachment[$cur][4] = $type;
+ $this->attachment[$cur][5] = true; // isString
+ $this->attachment[$cur][6] = "attachment";
+ $this->attachment[$cur][7] = 0;
+ }
+
+ /**
+ * Adds an embedded attachment. This can include images, sounds, and
+ * just about any other document.
+ * @param cid this is the Content Id of the attachment. Use this to identify
+ * the Id for accessing the image in an HTML form.
+ * @access public
+ * @return bool
+ */
+ function AddEmbeddedImage($path, $cid, $name = "", $encoding = "base64", $type = "application/octet-stream") {
+
+ if(!@is_file($path))
+ {
+ $this->error_handler(sprintf("Could not access [%s] file", $path));
+ return false;
+ }
+
+ $filename = basename($path);
+ if($name == "")
+ $name = $filename;
+
+ // Append to $attachment array
+ $cur = count($this->attachment);
+ $this->attachment[$cur][0] = $path;
+ $this->attachment[$cur][1] = $filename;
+ $this->attachment[$cur][2] = $name;
+ $this->attachment[$cur][3] = $encoding;
+ $this->attachment[$cur][4] = $type;
+ $this->attachment[$cur][5] = false; // isStringAttachment
+ $this->attachment[$cur][6] = "inline";
+ $this->attachment[$cur][7] = $cid;
+
+ return true;
+ }
+
+ /**
+ * Returns the number of embedded images in an email.
+ * @access private
+ * @return int
+ */
+ function EmbeddedImageCount() {
+ $ret = 0;
+ for($i = 0; $i < count($this->attachment); $i++)
+ {
+ if($this->attachment[$i][6] == "inline")
+ $ret++;
+ }
+
+ return $ret;
+ }
+
+ /////////////////////////////////////////////////
+ // MESSAGE RESET METHODS
+ /////////////////////////////////////////////////
+
+ /**
+ * Clears all recipients assigned in the TO array. Returns void.
+ * @access public
+ * @return void
+ */
+ function ClearAddresses() {
+ $this->to = array();
+ }
+
+ /**
+ * Clears all recipients assigned in the CC array. Returns void.
+ * @access public
+ * @return void
+ */
+ function ClearCCs() {
+ $this->cc = array();
+ }
+
+ /**
+ * Clears all recipients assigned in the BCC array. Returns void.
+ * @access public
+ * @return void
+ */
+ function ClearBCCs() {
+ $this->bcc = array();
+ }
+
+ /**
+ * Clears all recipients assigned in the ReplyTo array. Returns void.
+ * @access public
+ * @return void
+ */
+ function ClearReplyTos() {
+ $this->ReplyTo = array();
+ }
+
+ /**
+ * Clears all recipients assigned in the TO, CC and BCC
+ * array. Returns void.
+ * @access public
+ * @return void
+ */
+ function ClearAllRecipients() {
+ $this->to = array();
+ $this->cc = array();
+ $this->bcc = array();
+ }
+
+ /**
+ * Clears all previously set filesystem, string, and binary
+ * attachments. Returns void.
+ * @access public
+ * @return void
+ */
+ function ClearAttachments() {
+ $this->attachment = array();
+ }
+
+ /**
+ * Clears all custom headers. Returns void.
+ * @access public
+ * @return void
+ */
+ function ClearCustomHeaders() {
+ $this->CustomHeader = array();
+ }
+
+
+ /////////////////////////////////////////////////
+ // MISCELLANEOUS METHODS
+ /////////////////////////////////////////////////
+
+ /**
+ * Adds the error message to the error container.
+ * Returns void.
+ * @access private
+ * @return void
+ */
+ function error_handler($msg) {
+ $this->ErrorInfo = $msg;
+ }
+
+ /**
+ * Returns the proper RFC 822 formatted date. Returns string.
+ * @access private
+ * @return string
+ */
+ function rfc_date() {
+ $tz = date("Z");
+ $tzs = ($tz < 0) ? "-" : "+";
+ $tz = abs($tz);
+ $tz = ($tz/3600)*100 + ($tz%3600)/60;
+ $date = sprintf("%s %s%04d", date("D, j M Y H:i:s"), $tzs, $tz);
+ return $date;
+ }
+
+ /**
+ * Returns received header for message tracing. Returns string.
+ * @access private
+ * @return string
+ */
+ function received() {
+ // Check for vars because they might not exist. Possibly
+ // write a small retrieval function (that mailer can use too!)
+
+ if ($this->get_server_var('SERVER_NAME') != '')
+ {
+ $protocol = ($this->get_server_var('HTTPS') == 'on') ? 'HTTPS' : 'HTTP';
+ $remote = $this->get_server_var('REMOTE_HOST');
+ if ($remote == '')
+ $remote = 'phpmailer';
+ $remote .= ' (['.$this->get_server_var('REMOTE_ADDR').'])';
+ }
+ else
+ {
+ $protocol = 'local';
+ $remote = $this->get_server_var('USER');
+ if ($remote == '')
+ $remote = 'phpmailer';
+ }
+
+ $str = sprintf("Received: from %s %s\tby %s " .
+ "with %s (phpmailer);%s\t%s%s",
+ $remote,
+ $this->LE,
+ $this->get_server_hostname(),
+ $protocol,
+ $this->LE,
+ $this->rfc_date(),
+ $this->LE);
+
+ return $str;
+ }
+
+ /**
+ * Returns the appropriate server variable. Should work with both
+ * PHP 4.1.0+ as well as older versions. Returns an empty string
+ * if nothing is found.
+ * @access private
+ * @return mixed
+ */
+ function get_server_var($varName) {
+ global $HTTP_SERVER_VARS;
+ global $HTTP_ENV_VARS;
+
+ if(!isset($_SERVER))
+ {
+ $_SERVER = $HTTP_SERVER_VARS;
+ if(!isset($_SERVER["REMOTE_ADDR"]))
+ $_SERVER = $HTTP_ENV_VARS; // must be Apache
+ }
+
+ if(isset($_SERVER[$varName]))
+ return $_SERVER[$varName];
+ else
+ return "";
+ }
+
+ /**
+ * Returns the server hostname or 'localhost.localdomain' if unknown.
+ * @access private
+ * @return string
+ */
+ function get_server_hostname() {
+ if ($this->Hostname != '')
+ return $this->Hostname;
+ elseif ($this->get_server_var('SERVER_NAME') != '')
+ return $this->get_server_var('SERVER_NAME');
+ else
+ return 'localhost.localdomain';
+ }
+
+ /**
+ * Changes every end of line from CR or LF to CRLF. Returns string.
+ * @access private
+ * @return string
+ */
+ function fix_eol($str) {
+ $str = str_replace("\r\n", "\n", $str);
+ $str = str_replace("\r", "\n", $str);
+ $str = str_replace("\n", $this->LE, $str);
+ return $str;
+ }
+
+ /**
+ * Adds a custom header. Returns void.
+ * @access public
+ * @return void
+ */
+ function AddCustomHeader($custom_header) {
+ // Append to $custom_header array
+ $this->CustomHeader[] = explode(":", $custom_header, 2);
+ }
+
+ /**
+ * Adds all the Microsoft message headers. Returns string.
+ * @access private
+ * @return string
+ */
+ function AddMSMailHeaders() {
+ $MSHeader = "";
+ if($this->Priority == 1)
+ $MSPriority = "High";
+ elseif($this->Priority == 5)
+ $MSPriority = "Low";
+ else
+ $MSPriority = "Medium";
+
+ $MSHeader .= sprintf("X-MSMail-Priority: %s%s", $MSPriority, $this->LE);
+ $MSHeader .= sprintf("Importance: %s%s", $MSPriority, $this->LE);
+
+ return($MSHeader);
+ }
+
+}
+
+
+/**
+ * Boundary - MIME message boundary class
+ * @author Brent R. Matzelle
+ */
+class Boundary
+{
+ /**
+ * Sets the boundary ID.
+ * @access private
+ * @var string
+ */
+ var $ID = 0;
+
+ /**
+ * Sets the boundary Content Type.
+ * @access public
+ * @var string
+ */
+ var $ContentType = "text/plain";
+
+ /**
+ * Sets the Encoding.
+ * @access public
+ * @var string
+ */
+ var $Encoding = "";
+
+ /**
+ * Sets an attachment disposition.
+ * @access public
+ * @var string
+ */
+ var $Disposition = "";
+
+ /**
+ * Sets an attachment file name.
+ * @access public
+ * @var string
+ */
+ var $FileName = "";
+
+ /**
+ * Sets the Char set.
+ * @access public
+ * @var string
+ */
+ var $CharSet = "";
+
+ /**
+ * Sets the line endings of the message. Default is "\n";
+ * @access public
+ * @var string
+ */
+ var $LE = "\n";
+
+ /**
+ * Main constructor.
+ */
+ function Boundary($boundary_id) {
+ $this->ID = $boundary_id;
+ }
+
+ /**
+ * Returns the source of the boundary.
+ * @access public
+ * @return string
+ */
+ function GetSource($bLineEnding = true) {
+ $mime = array();
+ $mime[] = sprintf("--%s%s", $this->ID, $this->LE);
+ $mime[] = sprintf("Content-Type: %s; charset = \"%s\"%s",
+ $this->ContentType, $this->CharSet, $this->LE);
+ $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $this->Encoding,
+ $this->LE);
+
+ if(strlen($this->Disposition) > 0)
+ {
+ $mime[] = sprintf("Content-Disposition: %s;");
+ if(strlen($this->FileName) > 0)
+ $mime[] = sprinf("filename=\"%s\"", $this->FileName);
+ }
+
+ if($bLineEnding)
+ $mime[] = $this->LE;
+
+ return join("", $mime);
+ }
+}
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/class.phpmailer.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/class.smtp.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/class.smtp.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/class.smtp.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,1010 @@
+<?php
+////////////////////////////////////////////////////
+// SMTP - PHP SMTP class
+//
+// Version 1.02
+//
+// Define an SMTP class that can be used to connect
+// and communicate with any SMTP server. It implements
+// all the SMTP functions defined in RFC821 except TURN.
+//
+// Author: Chris Ryan
+//
+// License: LGPL, see LICENSE
+////////////////////////////////////////////////////
+
+/**
+ * STMP is rfc 821 compliant and implements all the rfc 821 SMTP
+ * commands except TURN which will always return a not implemented
+ * error. SMTP also provides some utility methods for sending mail
+ * to an SMTP server.
+ * @author Chris Ryan
+ */
+class SMTP
+{
+ var $SMTP_PORT = 25; # the default SMTP PORT
+ var $CRLF = "\r\n"; # CRLF pair
+
+ var $smtp_conn; # the socket to the server
+ var $error; # error if any on the last call
+ var $helo_rply; # the reply the server sent to us for HELO
+
+ var $do_debug; # the level of debug to perform
+
+ /**
+ * Initialize the class so that the data is in a known state.
+ * @access public
+ * @return void
+ */
+ function SMTP() {
+ $this->smtp_conn = 0;
+ $this->error = null;
+ $this->helo_rply = null;
+
+ $this->do_debug = 0;
+ }
+
+ /*************************************************************
+ * CONNECTION FUNCTIONS *
+ ***********************************************************/
+
+ /**
+ * Connect to the server specified on the port specified.
+ * If the port is not specified use the default SMTP_PORT.
+ * If tval is specified then a connection will try and be
+ * established with the server for that number of seconds.
+ * If tval is not specified the default is 30 seconds to
+ * try on the connection.
+ *
+ * SMTP CODE SUCCESS: 220
+ * SMTP CODE FAILURE: 421
+ * @access public
+ * @return bool
+ */
+ function Connect($host,$port=0,$tval=30) {
+ # set the error val to null so there is no confusion
+ $this->error = null;
+
+ # make sure we are __not__ connected
+ if($this->connected()) {
+ # ok we are connected! what should we do?
+ # for now we will just give an error saying we
+ # are already connected
+ $this->error =
+ array("error" => "Already connected to a server");
+ return false;
+ }
+
+ if(empty($port)) {
+ $port = $this->SMTP_PORT;
+ }
+
+ #connect to the smtp server
+ $this->smtp_conn = fsockopen($host, # the host of the server
+ $port, # the port to use
+ $errno, # error number if any
+ $errstr, # error message if any
+ $tval); # give up after ? secs
+ # verify we connected properly
+ if(empty($this->smtp_conn)) {
+ $this->error = array("error" => "Failed to connect to server",
+ "errno" => $errno,
+ "errstr" => $errstr);
+ if($this->do_debug >= 1) {
+ echo "SMTP -> ERROR: " . $this->error["error"] .
+ ": $errstr ($errno)" . $this->CRLF;
+ }
+ return false;
+ }
+
+ # sometimes the SMTP server takes a little longer to respond
+ # so we will give it a longer timeout for the first read
+ // Windows still does not have support for this timeout function
+ if(substr(PHP_OS, 0, 3) != "WIN")
+ socket_set_timeout($this->smtp_conn, 1, 0);
+
+ # get any announcement stuff
+ $announce = $this->get_lines();
+
+ # set the timeout of any socket functions at 1/10 of a second
+ //if(function_exists("socket_set_timeout"))
+ // socket_set_timeout($this->smtp_conn, 0, 100000);
+
+ if($this->do_debug >= 2) {
+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $announce;
+ }
+
+ return true;
+ }
+
+ /**
+ * Performs SMTP authentication. Must be run after running the
+ * Hello() method. Returns true if successfully authenticated.
+ * @access public
+ * @return bool
+ */
+ function Authenticate($username, $password) {
+ // Start authentication
+ fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF);
+
+ $rply = $this->get_lines();
+ $code = substr($rply,0,3);
+
+ if($code != 334) {
+ $this->error =
+ array("error" => "AUTH not accepted from server",
+ "smtp_code" => $code,
+ "smtp_msg" => substr($rply,4));
+ if($this->do_debug >= 1) {
+ echo "SMTP -> ERROR: " . $this->error["error"] .
+ ": " . $rply . $this->CRLF;
+ }
+ return false;
+ }
+
+ // Send encoded username
+ fputs($this->smtp_conn, base64_encode($username) . $this->CRLF);
+
+ $rply = $this->get_lines();
+ $code = substr($rply,0,3);
+
+ if($code != 334) {
+ $this->error =
+ array("error" => "Username not accepted from server",
+ "smtp_code" => $code,
+ "smtp_msg" => substr($rply,4));
+ if($this->do_debug >= 1) {
+ echo "SMTP -> ERROR: " . $this->error["error"] .
+ ": " . $rply . $this->CRLF;
+ }
+ return false;
+ }
+
+ // Send encoded password
+ fputs($this->smtp_conn, base64_encode($password) . $this->CRLF);
+
+ $rply = $this->get_lines();
+ $code = substr($rply,0,3);
+
+ if($code != 235) {
+ $this->error =
+ array("error" => "Password not accepted from server",
+ "smtp_code" => $code,
+ "smtp_msg" => substr($rply,4));
+ if($this->do_debug >= 1) {
+ echo "SMTP -> ERROR: " . $this->error["error"] .
+ ": " . $rply . $this->CRLF;
+ }
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Returns true if connected to a server otherwise false
+ * @access private
+ * @return bool
+ */
+ function Connected() {
+ if(!empty($this->smtp_conn)) {
+ $sock_status = socket_get_status($this->smtp_conn);
+ if($sock_status["eof"]) {
+ # hmm this is an odd situation... the socket is
+ # valid but we aren't connected anymore
+ if($this->do_debug >= 1) {
+ echo "SMTP -> NOTICE:" . $this->CRLF .
+ "EOF caught while checking if connected";
+ }
+ $this->Close();
+ return false;
+ }
+ return true; # everything looks good
+ }
+ return false;
+ }
+
+ /**
+ * Closes the socket and cleans up the state of the class.
+ * It is not considered good to use this function without
+ * first trying to use QUIT.
+ * @access public
+ * @return void
+ */
+ function Close() {
+ $this->error = null; # so there is no confusion
+ $this->helo_rply = null;
+ if(!empty($this->smtp_conn)) {
+ # close the connection and cleanup
+ fclose($this->smtp_conn);
+ $this->smtp_conn = 0;
+ }
+ }
+
+
+ /***************************************************************
+ * SMTP COMMANDS *
+ *************************************************************/
+
+ /**
+ * Issues a data command and sends the msg_data to the server
+ * finializing the mail transaction. $msg_data is the message
+ * that is to be send with the headers. Each header needs to be
+ * on a single line followed by a <CRLF> with the message headers
+ * and the message body being seperated by and additional <CRLF>.
+ *
+ * Implements rfc 821: DATA <CRLF>
+ *
+ * SMTP CODE INTERMEDIATE: 354
+ * [data]
+ * <CRLF>.<CRLF>
+ * SMTP CODE SUCCESS: 250
+ * SMTP CODE FAILURE: 552,554,451,452
+ * SMTP CODE FAILURE: 451,554
+ * SMTP CODE ERROR : 500,501,503,421
+ * @access public
+ * @return bool
+ */
+ function Data($msg_data) {
+ $this->error = null; # so no confusion is caused
+
+ if(!$this->connected()) {
+ $this->error = array(
+ "error" => "Called Data() without being connected");
+ return false;
+ }
+
+ fputs($this->smtp_conn,"DATA" . $this->CRLF);
+
+ $rply = $this->get_lines();
+ $code = substr($rply,0,3);
+
+ if($this->do_debug >= 2) {
+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
+ }
+
+ if($code != 354) {
+ $this->error =
+ array("error" => "DATA command not accepted from server",
+ "smtp_code" => $code,
+ "smtp_msg" => substr($rply,4));
+ if($this->do_debug >= 1) {
+ echo "SMTP -> ERROR: " . $this->error["error"] .
+ ": " . $rply . $this->CRLF;
+ }
+ return false;
+ }
+
+ # the server is ready to accept data!
+ # according to rfc 821 we should not send more than 1000
+ # including the CRLF
+ # characters on a single line so we will break the data up
+ # into lines by \r and/or \n then if needed we will break
+ # each of those into smaller lines to fit within the limit.
+ # in addition we will be looking for lines that start with
+ # a period '.' and append and additional period '.' to that
+ # line. NOTE: this does not count towards are limit.
+
+ # normalize the line breaks so we know the explode works
+ $msg_data = str_replace("\r\n","\n",$msg_data);
+ $msg_data = str_replace("\r","\n",$msg_data);
+ $lines = explode("\n",$msg_data);
+
+ # we need to find a good way to determine is headers are
+ # in the msg_data or if it is a straight msg body
+ # currently I'm assuming rfc 822 definitions of msg headers
+ # and if the first field of the first line (':' sperated)
+ # does not contain a space then it _should_ be a header
+ # and we can process all lines before a blank "" line as
+ # headers.
+ $field = substr($lines[0],0,strpos($lines[0],":"));
+ $in_headers = false;
+ if(!empty($field) && !strstr($field," ")) {
+ $in_headers = true;
+ }
+
+ $max_line_length = 998; # used below; set here for ease in change
+
+ while(list(,$line) = @each($lines)) {
+ $lines_out = null;
+ if($line == "" && $in_headers) {
+ $in_headers = false;
+ }
+ # ok we need to break this line up into several
+ # smaller lines
+ while(strlen($line) > $max_line_length) {
+ $pos = strrpos(substr($line,0,$max_line_length)," ");
+ // @XOOPS: Manual fix from PHPMailer 1.73 to prevent endless loops
+ // @XOOPS: We must update to 1.73 and fix its multibyte related issues instead of keeping this
+ if ( !$pos ) {
+ $pos = $max_line_length - 1;
+ }
+ $lines_out[] = substr($line,0,$pos);
+ $line = substr($line,$pos + 1);
+ # if we are processing headers we need to
+ # add a LWSP-char to the front of the new line
+ # rfc 822 on long msg headers
+ if($in_headers) {
+ $line = "\t" . $line;
+ }
+ }
+ $lines_out[] = $line;
+
+ # now send the lines to the server
+ while(list(,$line_out) = @each($lines_out)) {
+ if(strlen($line_out) > 0)
+ {
+ if(substr($line_out, 0, 1) == ".") {
+ $line_out = "." . $line_out;
+ }
+ }
+ fputs($this->smtp_conn,$line_out . $this->CRLF);
+ }
+ }
+
+ # ok all the message data has been sent so lets get this
+ # over with aleady
+ fputs($this->smtp_conn, $this->CRLF . "." . $this->CRLF);
+
+ $rply = $this->get_lines();
+ $code = substr($rply,0,3);
+
+ if($this->do_debug >= 2) {
+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
+ }
+
+ if($code != 250) {
+ $this->error =
+ array("error" => "DATA not accepted from server",
+ "smtp_code" => $code,
+ "smtp_msg" => substr($rply,4));
+ if($this->do_debug >= 1) {
+ echo "SMTP -> ERROR: " . $this->error["error"] .
+ ": " . $rply . $this->CRLF;
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Expand takes the name and asks the server to list all the
+ * people who are members of the _list_. Expand will return
+ * back and array of the result or false if an error occurs.
+ * Each value in the array returned has the format of:
+ * [ <full-name> <sp> ] <path>
+ * The definition of <path> is defined in rfc 821
+ *
+ * Implements rfc 821: EXPN <SP> <string> <CRLF>
+ *
+ * SMTP CODE SUCCESS: 250
+ * SMTP CODE FAILURE: 550
+ * SMTP CODE ERROR : 500,501,502,504,421
+ * @access public
+ * @return string array
+ */
+ function Expand($name) {
+ $this->error = null; # so no confusion is caused
+
+ if(!$this->connected()) {
+ $this->error = array(
+ "error" => "Called Expand() without being connected");
+ return false;
+ }
+
+ fputs($this->smtp_conn,"EXPN " . $name . $this->CRLF);
+
+ $rply = $this->get_lines();
+ $code = substr($rply,0,3);
+
+ if($this->do_debug >= 2) {
+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
+ }
+
+ if($code != 250) {
+ $this->error =
+ array("error" => "EXPN not accepted from server",
+ "smtp_code" => $code,
+ "smtp_msg" => substr($rply,4));
+ if($this->do_debug >= 1) {
+ echo "SMTP -> ERROR: " . $this->error["error"] .
+ ": " . $rply . $this->CRLF;
+ }
+ return false;
+ }
+
+ # parse the reply and place in our array to return to user
+ $entries = explode($this->CRLF,$rply);
+ while(list(,$l) = @each($entries)) {
+ $list[] = substr($l,4);
+ }
+
+ return $list;
+ }
+
+ /**
+ * Sends the HELO command to the smtp server.
+ * This makes sure that we and the server are in
+ * the same known state.
+ *
+ * Implements from rfc 821: HELO <SP> <domain> <CRLF>
+ *
+ * SMTP CODE SUCCESS: 250
+ * SMTP CODE ERROR : 500, 501, 504, 421
+ * @access public
+ * @return bool
+ */
+ function Hello($host="") {
+ $this->error = null; # so no confusion is caused
+
+ if(!$this->connected()) {
+ $this->error = array(
+ "error" => "Called Hello() without being connected");
+ return false;
+ }
+
+ # if a hostname for the HELO wasn't specified determine
+ # a suitable one to send
+ if(empty($host)) {
+ # we need to determine some sort of appopiate default
+ # to send to the server
+ $host = "localhost";
+ }
+
+ fputs($this->smtp_conn,"HELO " . $host . $this->CRLF);
+
+ $rply = $this->get_lines();
+ $code = substr($rply,0,3);
+
+ if($this->do_debug >= 2) {
+ echo "SMTP -> FROM SERVER: " . $this->CRLF . $rply;
+ }
+
+ if($code != 250) {
+ $this->error =
+ array("error" => "HELO not accepted from server",
+ "smtp_code" => $code,
+ "smtp_msg" => substr($rply,4));
+ if($this->do_debug >= 1) {
+ echo "SMTP -> ERROR: " . $this->error["error"] .
+ ": " . $rply . $this->CRLF;
+ }
+ return false;
+ }
+
+ $this->helo_rply = $rply;
+
+ return true;
+ }
+
+ /**
+ * Gets help information on the keyword specified. If the keyword
+ * is not specified then returns generic help, ussually contianing
+ * A list of keywords that help is available on. This function
+ * returns the results back to the user. It is up to the user to
+ * handle the returned data. If an error occurs then false is
+ * returned with $this->error set appropiately.
+ *
+ * Implements rfc 821: HELP [ <SP> <string> ] <CRLF>
+ *
+ * SMTP CODE SUCCESS: 211,214
+ * SMTP CODE ERROR : 500,501,502,504,421
+ * @access public
+ * @return string
+ */
+ function Help($keyword="") {
+ $this->error = null; # to avoid confusion
+
+ if(!$this->connected()) {
+ $this->error = array(
+ "error" => "Called Help() without being connected");
+ return false;
+ }
+
+ $extra = "";
+ if(!empty($keyword)) {
+ $extra = " " . $keyword;
+ }
+
+ fputs($this->smtp_conn,"HELP" . $extra . $this->CRLF);
+
+ $rply = $this->get_lines();
+ $code = substr($rply,0,3);
+
+ if($this->do_debug >= 2) {
+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
+ }
+
+ if($code != 211 && $code != 214) {
+ $this->error =
+ array("error" => "HELP not accepted from server",
+ "smtp_code" => $code,
+ "smtp_msg" => substr($rply,4));
+ if($this->do_debug >= 1) {
+ echo "SMTP -> ERROR: " . $this->error["error"] .
+ ": " . $rply . $this->CRLF;
+ }
+ return false;
+ }
+
+ return $rply;
+ }
+
+ /**
+ * Starts a mail transaction from the email address specified in
+ * $from. Returns true if successful or false otherwise. If True
+ * the mail transaction is started and then one or more Recipient
+ * commands may be called followed by a Data command.
+ *
+ * Implements rfc 821: MAIL <SP> FROM:<reverse-path> <CRLF>
+ *
+ * SMTP CODE SUCCESS: 250
+ * SMTP CODE SUCCESS: 552,451,452
+ * SMTP CODE SUCCESS: 500,501,421
+ * @access public
+ * @return bool
+ */
+ function Mail($from) {
+ $this->error = null; # so no confusion is caused
+
+ if(!$this->connected()) {
+ $this->error = array(
+ "error" => "Called Mail() without being connected");
+ return false;
+ }
+
+ fputs($this->smtp_conn,"MAIL FROM:" . $from . $this->CRLF);
+
+ $rply = $this->get_lines();
+ $code = substr($rply,0,3);
+
+ if($this->do_debug >= 2) {
+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
+ }
+
+ if($code != 250) {
+ $this->error =
+ array("error" => "MAIL not accepted from server",
+ "smtp_code" => $code,
+ "smtp_msg" => substr($rply,4));
+ if($this->do_debug >= 1) {
+ echo "SMTP -> ERROR: " . $this->error["error"] .
+ ": " . $rply . $this->CRLF;
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Sends the command NOOP to the SMTP server.
+ *
+ * Implements from rfc 821: NOOP <CRLF>
+ *
+ * SMTP CODE SUCCESS: 250
+ * SMTP CODE ERROR : 500, 421
+ * @access public
+ * @return bool
+ */
+ function Noop() {
+ $this->error = null; # so no confusion is caused
+
+ if(!$this->connected()) {
+ $this->error = array(
+ "error" => "Called Noop() without being connected");
+ return false;
+ }
+
+ fputs($this->smtp_conn,"NOOP" . $this->CRLF);
+
+ $rply = $this->get_lines();
+ $code = substr($rply,0,3);
+
+ if($this->do_debug >= 2) {
+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
+ }
+
+ if($code != 250) {
+ $this->error =
+ array("error" => "NOOP not accepted from server",
+ "smtp_code" => $code,
+ "smtp_msg" => substr($rply,4));
+ if($this->do_debug >= 1) {
+ echo "SMTP -> ERROR: " . $this->error["error"] .
+ ": " . $rply . $this->CRLF;
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Sends the quit command to the server and then closes the socket
+ * if there is no error or the $close_on_error argument is true.
+ *
+ * Implements from rfc 821: QUIT <CRLF>
+ *
+ * SMTP CODE SUCCESS: 221
+ * SMTP CODE ERROR : 500
+ * @access public
+ * @return bool
+ */
+ function Quit($close_on_error=true) {
+ $this->error = null; # so there is no confusion
+
+ if(!$this->connected()) {
+ $this->error = array(
+ "error" => "Called Quit() without being connected");
+ return false;
+ }
+
+ # send the quit command to the server
+ fputs($this->smtp_conn,"quit" . $this->CRLF);
+
+ # get any good-bye messages
+ $byemsg = $this->get_lines();
+
+ if($this->do_debug >= 2) {
+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $byemsg;
+ }
+
+ $rval = true;
+ $e = null;
+
+ $code = substr($byemsg,0,3);
+ if($code != 221) {
+ # use e as a tmp var cause Close will overwrite $this->error
+ $e = array("error" => "SMTP server rejected quit command",
+ "smtp_code" => $code,
+ "smtp_rply" => substr($byemsg,4));
+ $rval = false;
+ if($this->do_debug >= 1) {
+ echo "SMTP -> ERROR: " . $e["error"] . ": " .
+ $byemsg . $this->CRLF;
+ }
+ }
+
+ if(empty($e) || $close_on_error) {
+ $this->Close();
+ }
+
+ return $rval;
+ }
+
+ /**
+ * Sends the command RCPT to the SMTP server with the TO: argument of $to.
+ * Returns true if the recipient was accepted false if it was rejected.
+ *
+ * Implements from rfc 821: RCPT <SP> TO:<forward-path> <CRLF>
+ *
+ * SMTP CODE SUCCESS: 250,251
+ * SMTP CODE FAILURE: 550,551,552,553,450,451,452
+ * SMTP CODE ERROR : 500,501,503,421
+ * @access public
+ * @return bool
+ */
+ function Recipient($to) {
+ $this->error = null; # so no confusion is caused
+
+ if(!$this->connected()) {
+ $this->error = array(
+ "error" => "Called Recipient() without being connected");
+ return false;
+ }
+
+ fputs($this->smtp_conn,"RCPT TO:" . $to . $this->CRLF);
+
+ $rply = $this->get_lines();
+ $code = substr($rply,0,3);
+
+ if($this->do_debug >= 2) {
+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
+ }
+
+ if($code != 250 && $code != 251) {
+ $this->error =
+ array("error" => "RCPT not accepted from server",
+ "smtp_code" => $code,
+ "smtp_msg" => substr($rply,4));
+ if($this->do_debug >= 1) {
+ echo "SMTP -> ERROR: " . $this->error["error"] .
+ ": " . $rply . $this->CRLF;
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Sends the RSET command to abort and transaction that is
+ * currently in progress. Returns true if successful false
+ * otherwise.
+ *
+ * Implements rfc 821: RSET <CRLF>
+ *
+ * SMTP CODE SUCCESS: 250
+ * SMTP CODE ERROR : 500,501,504,421
+ * @access public
+ * @return bool
+ */
+ function Reset() {
+ $this->error = null; # so no confusion is caused
+
+ if(!$this->connected()) {
+ $this->error = array(
+ "error" => "Called Reset() without being connected");
+ return false;
+ }
+
+ fputs($this->smtp_conn,"RSET" . $this->CRLF);
+
+ $rply = $this->get_lines();
+ $code = substr($rply,0,3);
+
+ if($this->do_debug >= 2) {
+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
+ }
+
+ if($code != 250) {
+ $this->error =
+ array("error" => "RSET failed",
+ "smtp_code" => $code,
+ "smtp_msg" => substr($rply,4));
+ if($this->do_debug >= 1) {
+ echo "SMTP -> ERROR: " . $this->error["error"] .
+ ": " . $rply . $this->CRLF;
+ }
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Starts a mail transaction from the email address specified in
+ * $from. Returns true if successful or false otherwise. If True
+ * the mail transaction is started and then one or more Recipient
+ * commands may be called followed by a Data command. This command
+ * will send the message to the users terminal if they are logged
+ * in.
+ *
+ * Implements rfc 821: SEND <SP> FROM:<reverse-path> <CRLF>
+ *
+ * SMTP CODE SUCCESS: 250
+ * SMTP CODE SUCCESS: 552,451,452
+ * SMTP CODE SUCCESS: 500,501,502,421
+ * @access public
+ * @return bool
+ */
+ function Send($from) {
+ $this->error = null; # so no confusion is caused
+
+ if(!$this->connected()) {
+ $this->error = array(
+ "error" => "Called Send() without being connected");
+ return false;
+ }
+
+ fputs($this->smtp_conn,"SEND FROM:" . $from . $this->CRLF);
+
+ $rply = $this->get_lines();
+ $code = substr($rply,0,3);
+
+ if($this->do_debug >= 2) {
+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
+ }
+
+ if($code != 250) {
+ $this->error =
+ array("error" => "SEND not accepted from server",
+ "smtp_code" => $code,
+ "smtp_msg" => substr($rply,4));
+ if($this->do_debug >= 1) {
+ echo "SMTP -> ERROR: " . $this->error["error"] .
+ ": " . $rply . $this->CRLF;
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Starts a mail transaction from the email address specified in
+ * $from. Returns true if successful or false otherwise. If True
+ * the mail transaction is started and then one or more Recipient
+ * commands may be called followed by a Data command. This command
+ * will send the message to the users terminal if they are logged
+ * in and send them an email.
+ *
+ * Implements rfc 821: SAML <SP> FROM:<reverse-path> <CRLF>
+ *
+ * SMTP CODE SUCCESS: 250
+ * SMTP CODE SUCCESS: 552,451,452
+ * SMTP CODE SUCCESS: 500,501,502,421
+ * @access public
+ * @return bool
+ */
+ function SendAndMail($from) {
+ $this->error = null; # so no confusion is caused
+
+ if(!$this->connected()) {
+ $this->error = array(
+ "error" => "Called SendAndMail() without being connected");
+ return false;
+ }
+
+ fputs($this->smtp_conn,"SAML FROM:" . $from . $this->CRLF);
+
+ $rply = $this->get_lines();
+ $code = substr($rply,0,3);
+
+ if($this->do_debug >= 2) {
+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
+ }
+
+ if($code != 250) {
+ $this->error =
+ array("error" => "SAML not accepted from server",
+ "smtp_code" => $code,
+ "smtp_msg" => substr($rply,4));
+ if($this->do_debug >= 1) {
+ echo "SMTP -> ERROR: " . $this->error["error"] .
+ ": " . $rply . $this->CRLF;
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Starts a mail transaction from the email address specified in
+ * $from. Returns true if successful or false otherwise. If True
+ * the mail transaction is started and then one or more Recipient
+ * commands may be called followed by a Data command. This command
+ * will send the message to the users terminal if they are logged
+ * in or mail it to them if they are not.
+ *
+ * Implements rfc 821: SOML <SP> FROM:<reverse-path> <CRLF>
+ *
+ * SMTP CODE SUCCESS: 250
+ * SMTP CODE SUCCESS: 552,451,452
+ * SMTP CODE SUCCESS: 500,501,502,421
+ * @access public
+ * @return bool
+ */
+ function SendOrMail($from) {
+ $this->error = null; # so no confusion is caused
+
+ if(!$this->connected()) {
+ $this->error = array(
+ "error" => "Called SendOrMail() without being connected");
+ return false;
+ }
+
+ fputs($this->smtp_conn,"SOML FROM:" . $from . $this->CRLF);
+
+ $rply = $this->get_lines();
+ $code = substr($rply,0,3);
+
+ if($this->do_debug >= 2) {
+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
+ }
+
+ if($code != 250) {
+ $this->error =
+ array("error" => "SOML not accepted from server",
+ "smtp_code" => $code,
+ "smtp_msg" => substr($rply,4));
+ if($this->do_debug >= 1) {
+ echo "SMTP -> ERROR: " . $this->error["error"] .
+ ": " . $rply . $this->CRLF;
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * This is an optional command for SMTP that this class does not
+ * support. This method is here to make the RFC821 Definition
+ * complete for this class and __may__ be implimented in the future
+ *
+ * Implements from rfc 821: TURN <CRLF>
+ *
+ * SMTP CODE SUCCESS: 250
+ * SMTP CODE FAILURE: 502
+ * SMTP CODE ERROR : 500, 503
+ * @access public
+ * @return bool
+ */
+ function Turn() {
+ $this->error = array("error" => "This method, TURN, of the SMTP ".
+ "is not implemented");
+ if($this->do_debug >= 1) {
+ echo "SMTP -> NOTICE: " . $this->error["error"] . $this->CRLF;
+ }
+ return false;
+ }
+
+ /**
+ * Verifies that the name is recognized by the server.
+ * Returns false if the name could not be verified otherwise
+ * the response from the server is returned.
+ *
+ * Implements rfc 821: VRFY <SP> <string> <CRLF>
+ *
+ * SMTP CODE SUCCESS: 250,251
+ * SMTP CODE FAILURE: 550,551,553
+ * SMTP CODE ERROR : 500,501,502,421
+ * @access public
+ * @return int
+ */
+ function Verify($name) {
+ $this->error = null; # so no confusion is caused
+
+ if(!$this->connected()) {
+ $this->error = array(
+ "error" => "Called Verify() without being connected");
+ return false;
+ }
+
+ fputs($this->smtp_conn,"VRFY " . $name . $this->CRLF);
+
+ $rply = $this->get_lines();
+ $code = substr($rply,0,3);
+
+ if($this->do_debug >= 2) {
+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
+ }
+
+ if($code != 250 && $code != 251) {
+ $this->error =
+ array("error" => "VRFY failed on name '$name'",
+ "smtp_code" => $code,
+ "smtp_msg" => substr($rply,4));
+ if($this->do_debug >= 1) {
+ echo "SMTP -> ERROR: " . $this->error["error"] .
+ ": " . $rply . $this->CRLF;
+ }
+ return false;
+ }
+ return $rply;
+ }
+
+ /*******************************************************************
+ * INTERNAL FUNCTIONS *
+ ******************************************************************/
+
+ /**
+ * Read in as many lines as possible
+ * either before eof or socket timeout occurs on the operation.
+ * With SMTP we can tell if we have more lines to read if the
+ * 4th character is '-' symbol. If it is a space then we don't
+ * need to read anything else.
+ * @access private
+ * @return string
+ */
+ function get_lines() {
+ $data = "";
+ while($str = fgets($this->smtp_conn,515)) {
+ if($this->do_debug >= 4) {
+ echo "SMTP -> get_lines(): \$data was \"$data\"" .
+ $this->CRLF;
+ echo "SMTP -> get_lines(): \$str is \"$str\"" .
+ $this->CRLF;
+ }
+ $data .= $str;
+ if($this->do_debug >= 4) {
+ echo "SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF;
+ }
+ # if the 4th character is a space then we are done reading
+ # so just break the loop
+ if(substr($str,3,1) == " ") { break; }
+ }
+ return $data;
+ }
+
+}
+
+
+ ?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/class.smtp.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/mail/phpmailer/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/mail/xoopsmultimailer.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/mail/xoopsmultimailer.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/mail/xoopsmultimailer.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,192 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Jochen Büînagel (job at buennagel.com) //
+// URL: http://www.xoops.org //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package class
+ * @subpackage mail
+ *
+ * @filesource
+ *
+ * @author Jochen Büînagel <jb at buennagel.com>
+ * @copyright copyright (c) 2000-2003 The XOOPS Project (http://www.xoops.org)
+ *
+ * @version $Revision$ - $Date$
+ */
+
+/**
+ * load the base class
+ */
+require_once(XOOPS_ROOT_PATH.'/class/mail/phpmailer/class.phpmailer.php');
+
+/**
+ * Mailer Class.
+ *
+ * At the moment, this does nothing but send email through PHP's "mail()" function,
+ * but it has the abiltiy to do much more.
+ *
+ * If you have problems sending mail with "mail()", you can edit the member variables
+ * to suit your setting. Later this will be possible through the admin panel.
+ *
+ * @todo Make a page in the admin panel for setting mailer preferences.
+ *
+ * @package class
+ * @subpackage mail
+ *
+ * @author Jochen Buennagel <job at buennagel.com>
+ * @copyright (c) 2000-2003 The Xoops Project - www.xoops.org
+ * @version $Revision$ - changed by $Author: skalpa $ on $Date$
+ */
+class XoopsMultiMailer extends phpmailer {
+
+ /**
+ * "from" address
+ * @var string
+ * @access private
+ */
+ var $From = "";
+
+ /**
+ * "from" name
+ * @var string
+ * @access private
+ */
+ var $FromName = "";
+
+ // can be "smtp", "sendmail", or "mail"
+ /**
+ * Method to be used when sending the mail.
+ *
+ * This can be:
+ * <li>mail (standard PHP function "mail()") (default)
+ * <li>smtp (send through any SMTP server, SMTPAuth is supported.
+ * You must set {@link $Host}, for SMTPAuth also {@link $SMTPAuth},
+ * {@link $Username}, and {@link $Password}.)
+ * <li>sendmail (manually set the path to your sendmail program
+ * to something different than "mail()" uses in {@link $Sendmail})
+ *
+ * @var string
+ * @access private
+ */
+ var $Mailer = "mail";
+
+ /**
+ * set if $Mailer is "sendmail"
+ *
+ * Only used if {@link $Mailer} is set to "sendmail".
+ * Contains the full path to your sendmail program or replacement.
+ * @var string
+ * @access private
+ */
+ var $Sendmail = "/usr/sbin/sendmail";
+
+ /**
+ * SMTP Host.
+ *
+ * Only used if {@link $Mailer} is set to "smtp"
+ * @var string
+ * @access private
+ */
+ var $Host = "";
+
+ /**
+ * Does your SMTP host require SMTPAuth authentication?
+ * @var boolean
+ * @access private
+ */
+ var $SMTPAuth = FALSE;
+
+ /**
+ * Username for authentication with your SMTP host.
+ *
+ * Only used if {@link $Mailer} is "smtp" and {@link $SMTPAuth} is TRUE
+ * @var string
+ * @access private
+ */
+ var $Username = "";
+
+ /**
+ * Password for SMTPAuth.
+ *
+ * Only used if {@link $Mailer} is "smtp" and {@link $SMTPAuth} is TRUE
+ * @var string
+ * @access private
+ */
+ var $Password = "";
+
+ /**
+ * Constuctor
+ *
+ * @access public
+ * @return void
+ *
+ * @global $xoopsConfig
+ */
+ function XoopsMultiMailer(){
+ global $xoopsConfig;
+
+ $config_handler =& xoops_gethandler('config');
+ $xoopsMailerConfig =& $config_handler->getConfigsByCat(XOOPS_CONF_MAILER);
+ $this->From = $xoopsMailerConfig['from'];
+ if ($this->From == '') {
+ $this->From = $xoopsConfig['adminmail'];
+ }
+
+ if ($xoopsMailerConfig["mailmethod"] == "smtpauth") {
+ $this->Mailer = "smtp";
+ $this->SMTPAuth = TRUE;
+ $this->Host = $xoopsMailerConfig['smtphost'];
+ $this->Username = $xoopsMailerConfig['smtpuser'];
+ $this->Password = $xoopsMailerConfig['smtppass'];
+ } else {
+ $this->Mailer = $xoopsMailerConfig['mailmethod'];
+ $this->SMTPAuth = FALSE;
+ $this->Sendmail = $xoopsMailerConfig['sendmailpath'];
+ $this->Host = $xoopsMailerConfig['smtphost'];
+ }
+ }
+
+ /**
+ * Formats an address correctly. This overrides the default addr_format method which does not seem to encode $FromName correctly
+ * @access private
+ * @return string
+ */
+ function addr_format($addr) {
+ if(empty($addr[1]))
+ $formatted = $addr[0];
+ else
+ $formatted = sprintf('%s <%s>', '=?'.$this->CharSet.'?B?'.base64_encode($addr[1]).'?=', $addr[0]);
+
+ return $formatted;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/mail/xoopsmultimailer.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/mimetypes.inc.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/mimetypes.inc.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/mimetypes.inc.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,233 @@
+<?php
+// $Id$
+/**
+
+* Extension to mimetype lookup table
+
+*
+
+* This file is provided as an helper for objects who need to perform filename to mimetype translations.
+
+* Common types have been provided, but feel free to add your own one if you need it.
+
+* <br /><br />
+
+* See the enclosed file LICENSE for licensing information.
+
+* If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html
+
+*
+
+* @copyright The Xoops project http://www.xoops.org/
+
+* @license http://www.fsf.org/copyleft/gpl.html GNU public license
+
+* @author Skalpa Keo <skalpa at xoops.org>
+
+* @since 2.0.9.3
+
+*/
+
+return array(
+
+ "hqx" => "application/mac-binhex40",
+
+ "doc" => "application/msword",
+
+ "dot" => "application/msword",
+
+ "bin" => "application/octet-stream",
+
+ "lha" => "application/octet-stream",
+
+ "lzh" => "application/octet-stream",
+
+ "exe" => "application/octet-stream",
+
+ "class" => "application/octet-stream",
+
+ "so" => "application/octet-stream",
+
+ "dll" => "application/octet-stream",
+
+ "pdf" => "application/pdf",
+
+ "ai" => "application/postscript",
+
+ "eps" => "application/postscript",
+
+ "ps" => "application/postscript",
+
+ "smi" => "application/smil",
+
+ "smil" => "application/smil",
+
+ "wbxml" => "application/vnd.wap.wbxml",
+
+ "wmlc" => "application/vnd.wap.wmlc",
+
+ "wmlsc" => "application/vnd.wap.wmlscriptc",
+
+ "xla" => "application/vnd.ms-excel",
+
+ "xls" => "application/vnd.ms-excel",
+
+ "xlt" => "application/vnd.ms-excel",
+
+ "ppt" => "application/vnd.ms-powerpoint",
+
+ "csh" => "application/x-csh",
+
+ "dcr" => "application/x-director",
+
+ "dir" => "application/x-director",
+
+ "dxr" => "application/x-director",
+
+ "spl" => "application/x-futuresplash",
+
+ "gtar" => "application/x-gtar",
+
+ "php" => "application/x-httpd-php",
+
+ "php3" => "application/x-httpd-php",
+
+ "php5" => "application/x-httpd-php",
+
+ "phtml" => "application/x-httpd-php",
+
+ "js" => "application/x-javascript",
+
+ "sh" => "application/x-sh",
+
+ "swf" => "application/x-shockwave-flash",
+
+ "sit" => "application/x-stuffit",
+
+ "tar" => "application/x-tar",
+
+ "tcl" => "application/x-tcl",
+
+ "xhtml" => "application/xhtml+xml",
+
+ "xht" => "application/xhtml+xml",
+
+ "xhtml" => "application/xml",
+
+ "ent" => "application/xml-external-parsed-entity",
+
+ "dtd" => "application/xml-dtd",
+
+ "mod" => "application/xml-dtd",
+
+ "gz" => "application/x-gzip",
+
+ "zip" => "application/zip",
+
+ "au" => "audio/basic",
+
+ "snd" => "audio/basic",
+
+ "mid" => "audio/midi",
+
+ "midi" => "audio/midi",
+
+ "kar" => "audio/midi",
+
+ "mp1" => "audio/mpeg",
+
+ "mp2" => "audio/mpeg",
+
+ "mp3" => "audio/mpeg",
+
+ "aif" => "audio/x-aiff",
+
+ "aiff" => "audio/x-aiff",
+
+ "m3u" => "audio/x-mpegurl",
+
+ "ram" => "audio/x-pn-realaudio",
+
+ "rm" => "audio/x-pn-realaudio",
+
+ "rpm" => "audio/x-pn-realaudio-plugin",
+
+ "ra" => "audio/x-realaudio",
+
+ "wav" => "audio/x-wav",
+
+ "bmp" => "image/bmp",
+
+ "gif" => "image/gif",
+
+ "jpeg" => "image/jpeg",
+
+ "jpg" => "image/jpeg",
+
+ "jpe" => "image/jpeg",
+
+ "png" => "image/png",
+
+ "tiff" => "image/tiff",
+
+ "tif" => "image/tif",
+
+ "wbmp" => "image/vnd.wap.wbmp",
+
+ "pnm" => "image/x-portable-anymap",
+
+ "pbm" => "image/x-portable-bitmap",
+
+ "pgm" => "image/x-portable-graymap",
+
+ "ppm" => "image/x-portable-pixmap",
+
+ "xbm" => "image/x-xbitmap",
+
+ "xpm" => "image/x-xpixmap",
+
+ "ics" => "text/calendar",
+
+ "ifb" => "text/calendar",
+
+ "css" => "text/css",
+
+ "html" => "text/html",
+
+ "htm" => "text/html",
+
+ "asc" => "text/plain",
+
+ "txt" => "text/plain",
+
+ "rtf" => "text/rtf",
+
+ "sgml" => "text/x-sgml",
+
+ "sgm" => "text/x-sgml",
+
+ "tsv" => "text/tab-seperated-values",
+
+ "wml" => "text/vnd.wap.wml",
+
+ "wmls" => "text/vnd.wap.wmlscript",
+
+ "xsl" => "text/xml",
+
+ "mpeg" => "video/mpeg",
+
+ "mpg" => "video/mpeg",
+
+ "mpe" => "video/mpeg",
+
+ "qt" => "video/quicktime",
+
+ "mov" => "video/quicktime",
+
+ "avi" => "video/x-msvideo",
+
+);
+
+
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/mimetypes.inc.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/module.errorhandler.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/module.errorhandler.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/module.errorhandler.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,123 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author of File: Goghs (http://www.eqiao.com/) //
+################################################################################
+
+if ( !defined("XOOPS_C_ERRORHANDLER_INCLUDED") ) {
+ define("XOOPS_C_ERRORHANDLER_INCLUDED",1);
+
+ /**
+ * Error Handler class
+ *
+ * @package kernel
+ * @subpackage core
+ *
+ * @author Goghs (http://www.eqiao.com/)
+ * @copyright (c) 2000-2003 The Xoops Project - www.xoops.org
+ */
+ class ErrorHandler
+ {
+ /**
+ * Show an error message
+ *
+ * @param string $e_code Errorcode
+ * @param integer $pages How many pages should the link take you back?
+ *
+ * @global $xoopsConfig
+ **/
+ function show($e_code, $pages=1)
+ {
+ global $xoopsConfig, $xoopsUser, $xoopsRequestUri, $xoopsModule, $xoopsLogger;
+ $errmsg = array(
+ "0001" =>"Could not connect to the forums database.",
+ "0002" => "The forum you selected does not exist. Please go back and try again.",
+ "0003" => "Password Incorrect.",
+ "0004" => "Could not query the topics database.",
+ "0005" => "Error getting messages from the database.",
+ "0006" => "Please enter the Nickname and the Password.",
+ "0007" => "You are not the Moderator of this forum therefore you can't perform this function.",
+ "0008" => "You did not enter the correct password, please go back and try again.",
+ "0009" => "Could not remove posts from the database.",
+ "0010" => "Could not move selected topic to selected forum. Please go back and try again.",
+ "0011" => "Could not lock the selected topic. Please go back and try again.",
+ "0012" => "Could not unlock the selected topic. Please go back and try again.",
+ "0013" => "Could not query the database. <br />Error: ".mysql_error()."",
+ "0014" => "No such user or post in the database.",
+ "0015" => "Search Engine was unable to query the forums database.",
+ "0016" => "That user does not exist. Please go back and search again.",
+ "0017" => "You must type a subject to post. You can't post an empty subject. Go back and enter the subject",
+ "0018" => "You must choose message icon to post. Go back and choose message icon.",
+ "0019" => "You must type a message to post. You can't post an empty message. Go back and enter a message.",
+ "0020" => "Could not enter data into the database. Please go back and try again.",
+ "0021" => "Can't delete the selected message.",
+ "0022" => "An error ocurred while querying the database.",
+ "0023" => "Selected message was not found in the forum database.",
+ "0024" => "You can't reply to that message. It wasn't sent to you.",
+ "0025" => "You can't post a reply to this topic, it has been locked. Contact the administrator if you have any question.",
+ "0026" => "The forum or topic you are attempting to post to does not exist. Please try again.",
+ "0027" => "You must enter your username and password. Go back and do so.",
+ "0028" => "You have entered an incorrect password. Go back and try again.",
+ "0029" => "Couldn't update post count.",
+ "0030" => "The forum you are attempting to post to does not exist. Please try again.",
+ "0031" => "Unknown Error",
+ "0035" => "You can't edit a post that's not yours.",
+ "0036" => "You do not have permission to edit this post.",
+ "0037" => "You did not supply the correct password or do not have permission to edit this post. Please go back and try again.",
+ "1001" => "Please enter value for Title.",
+ "1002" => "Please enter value for Phone.",
+ "1003" => "Please enter value for Summary.",
+ "1004" => "Please enter value for Address.",
+ "1005" => "Please enter value for City.",
+ "1006" => "Please enter value for State/Province.",
+ "1007" => "Please enter value for Zipcode.",
+ "1008" => "Please enter value for Description.",
+ "1009" => "Vote for the selected resource only once.<br />All votes are logged and reviewed.",
+ "1010" => "You cannot vote on the resource you submitted.<br />All votes are logged and reviewed.",
+ "1011" => "No rating selected - no vote tallied.",
+ "1013" => "Please enter a search query.",
+ "1016" => "Please enter value for URL.",
+ "1017" => "Please enter value for Home Page.",
+ "9999" => "OOPS! God Knows"
+ );
+
+ $errorno = array_keys($errmsg);
+ if (!in_array($e_code, $errorno)) {
+ $e_code = '9999';
+ }
+ include_once XOOPS_ROOT_PATH."/header.php";
+ //OpenTable();
+ echo "<div><b>".$xoopsConfig['sitename']." Error</b><br /><br />";
+ echo "Error Code: $e_code<br /><br /><br />";
+ echo "<b>ERROR:</b> $errmsg[$e_code]<br /><br /><br />";
+ echo "[ <a href='javascript:history.go(-".$pages.")'>Go Back</a> ]</div>";
+ //CloseTable();
+ include_once XOOPS_ROOT_PATH."/footer.php";
+ exit();
+ }
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/module.errorhandler.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/module.textsanitizer.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/module.textsanitizer.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/module.textsanitizer.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,600 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (http://www.myweb.ne.jp/, http://jp.xoops.org/) //
+// Goghs Cheng (http://www.eqiao.com, http://www.devbeez.com/) //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+
+/**
+ * Class to "clean up" text for various uses
+ *
+ * <b>Singleton</b>
+ *
+ * @package kernel
+ * @subpackage core
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @author Goghs Cheng
+ * @copyright (c) 2000-2003 The Xoops Project - www.xoops.org
+ */
+class MyTextSanitizer
+{
+ /**
+ * @var array
+ */
+ var $smileys = array();
+
+ /**
+ *
+ */
+ var $censorConf;
+
+ /*
+ * Constructor of this class
+ *
+ * Gets allowed html tags from admin config settings
+ * <br> should not be allowed since nl2br will be used
+ * when storing data.
+ *
+ * @access private
+ *
+ * @todo Sofar, this does nuttin' ;-)
+ */
+ function MyTextSanitizer()
+ {
+
+ }
+
+ /**
+ * Access the only instance of this class
+ *
+ * @return object
+ *
+ * @static
+ * @staticvar object
+ */
+ function &getInstance()
+ {
+ static $instance;
+ if (!isset($instance)) {
+ $instance = new MyTextSanitizer();
+ }
+ return $instance;
+ }
+
+ /**
+ * Get the smileys
+ *
+ * @return array
+ */
+ function getSmileys()
+ {
+ return $this->smileys;
+ }
+
+ /**
+ * Replace emoticons in the message with smiley images
+ *
+ * @param string $message
+ *
+ * @return string
+ */
+ function smiley( $message )
+ {
+ $db =& Database::getInstance();
+ if (count($this->smileys) == 0) {
+ if ($getsmiles = $db->query("SELECT * FROM ".$db->prefix("smiles"))){
+ while ($smiles = $db->fetchArray($getsmiles)) {
+ $message = str_replace($smiles['code'], '<img src="'.XOOPS_UPLOAD_URL.'/'.htmlspecialchars($smiles['smile_url']).'" alt="" />', $message);
+ array_push($this->smileys, $smiles);
+ }
+ }
+ }
+ elseif (is_array($this->smileys)) {
+ foreach ($this->smileys as $smile) {
+ $message = str_replace($smile['code'], '<img src="'.XOOPS_UPLOAD_URL.'/'.htmlspecialchars($smile['smile_url']).'" alt="" />', $message);
+ }
+ }
+ return $message;
+ }
+
+ /**
+ * Make links in the text clickable
+ *
+ * @param string $text
+ * @return string
+ **/
+ function makeClickable( $text )
+ {
+ /*$patterns = array("/(^|[^]_a-z0-9-=\"'\/])([a-z]+?):\/\/([^, \r\n\"\(\)'<>]+)/i", "/(^|[^]_a-z0-9-=\"'\/])www\.([a-z0-9\-]+)\.([^, \r\n\"\(\)'<>]+)/i", "/(^|[^]_a-z0-9-=\"'\/])ftp\.([a-z0-9\-]+)\.([^, \r\n\"\(\)'<>]+)/i", "/(^|[^]_a-z0-9-=\"'\/:\.])([a-z0-9\-_\.]+?)@([^, \r\n\"\(\)'<>\[\]]+)/i");*/
+ $patterns = array("/(^|[^]_a-z0-9-=\"'\/])([a-z]+?):\/\/([^
+ \r\n\"\(\)'<>]+)/i",
+ "/(^|[^]_a-z0-9-=\"'\/])www\.([a-z0-9\-]+)\.([^
+ \r\n\"\(\)'<>]+)/i",
+ "/(^|[^]_a-z0-9-=\"'\/])ftp\.([a-z0-9\-]+)\.([^
+ \r\n\"\(\)'<>]+)/i",
+ "/(^|[^]_a-z0-9-=\"'\/:\.])([a-z0-9\-_\.]+?)@([^
+ \r\n\"\(\)'<>\[\]]+)/i");
+ $replacements = array("\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>",
+ "\\1<a href=\"http://www.\\2.\\3\" target=\"_blank\">www.\\2.\\3</a>",
+ "\\1<a href=\"ftp://ftp.\\2.\\3\" target=\"_blank\">ftp.\\2.\\3</a>",
+ "\\1<script type=\"text/javascript\">var id='\\2';var host1='\\3';var host2='';document.write('<a href=\"mailto:'+id+'@'+host1+'.'+host2+'\">'+id+'@'+host1+'.'+host2+'</a>');</script>");
+ return preg_replace($patterns, $replacements, $text);
+ }
+
+ /**
+ * Replace XoopsCodes with their equivalent HTML formatting
+ *
+ * @param string $text
+ * @param bool $allowimage Allow images in the text?
+ * On FALSE, uses links to images.
+ * @return string
+ **/
+ function xoopsCodeDecode( $text, $allowimage = 1 )
+ {
+ $patterns = array();
+ $replacements = array();
+ //$patterns[] = "/\[code](.*)\[\/code\]/esU";
+ //$replacements[] = "'<div class=\"xoopsCode\"><code><pre>'.wordwrap(MyTextSanitizer::htmlSpecialChars('\\1'), 100).'</pre></code></div>'";
+ // RMV: added new markup for intrasite url (allows easier site moves)
+ // TODO: automatically convert other URLs to this format if XOOPS_URL matches??
+ $patterns[] = "/\[siteurl=(['\"]?)([^\"'<>]*)\\1](.*)\[\/siteurl\]/sU";
+ $replacements[] = '<a href="'.XOOPS_URL.'/\\2">\\3</a>';
+ $patterns[] = "/\[url=(['\"]?)(http[s]?:\/\/[^\"'<>]*)\\1](.*)\[\/url\]/sU";
+ $replacements[] = '<a href="\\2" target="_blank">\\3</a>';
+ $patterns[] = "/\[url=(['\"]?)(ftp?:\/\/[^\"'<>]*)\\1](.*)\[\/url\]/sU";
+ $replacements[] = '<a href="\\2" target="_blank">\\3</a>';
+ $patterns[] = "/\[url=(['\"]?)([^\"'<>]*)\\1](.*)\[\/url\]/sU";
+ $replacements[] = '<a href="http://\\2" target="_blank">\\3</a>';
+ $patterns[] = "/\[color=(['\"]?)([a-zA-Z0-9]*)\\1](.*)\[\/color\]/sU";
+ $replacements[] = '<span style="color: #\\2;">\\3</span>';
+ $patterns[] = "/\[size=(['\"]?)([a-z0-9-]*)\\1](.*)\[\/size\]/sU";
+ $replacements[] = '<span style="font-size: \\2;">\\3</span>';
+ $patterns[] = "/\[font=(['\"]?)([^;<>\*\(\)\"']*)\\1](.*)\[\/font\]/sU";
+ $replacements[] = '<span style="font-family: \\2;">\\3</span>';
+ $patterns[] = "/\[email]([^;<>\*\(\)\"']*)\[\/email\]/sU";
+ $replacements[] = '<a href="mailto:\\1">\\1</a>';
+ $patterns[] = "/\[b](.*)\[\/b\]/sU";
+ $replacements[] = '<b>\\1</b>';
+ $patterns[] = "/\[i](.*)\[\/i\]/sU";
+ $replacements[] = '<i>\\1</i>';
+ $patterns[] = "/\[u](.*)\[\/u\]/sU";
+ $replacements[] = '<u>\\1</u>';
+ $patterns[] = "/\[d](.*)\[\/d\]/sU";
+ $replacements[] = '<del>\\1</del>';
+ //$patterns[] = "/\[li](.*)\[\/li\]/sU";
+ //$replacements[] = '<li>\\1</li>';
+ $patterns[] = "/\[img align=(['\"]?)(left|center|right)\\1]([^\"\(\)\?\&'<>]*)\[\/img\]/sU";
+ $patterns[] = "/\[img]([^\"\(\)\?\&'<>]*)\[\/img\]/sU";
+ $patterns[] = "/\[img align=(['\"]?)(left|center|right)\\1 id=(['\"]?)([0-9]*)\\3]([^\"\(\)\?\&'<>]*)\[\/img\]/sU";
+ $patterns[] = "/\[img id=(['\"]?)([0-9]*)\\1]([^\"\(\)\?\&'<>]*)\[\/img\]/sU";
+ if ($allowimage != 1) {
+ $replacements[] = '<a href="\\3" target="_blank">\\3</a>';
+ $replacements[] = '<a href="\\1" target="_blank">\\1</a>';
+ $replacements[] = '<a href="'.XOOPS_URL.'/image.php?id=\\4" target="_blank">\\4</a>';
+ $replacements[] = '<a href="'.XOOPS_URL.'/image.php?id=\\2" target="_blank">\\3</a>';
+ } else {
+ $replacements[] = '<img src="\\3" align="\\2" alt="" />';
+ $replacements[] = '<img src="\\1" alt="" />';
+ $replacements[] = '<img src="'.XOOPS_URL.'/image.php?id=\\4" align="\\2" alt="\\4" />';
+ $replacements[] = '<img src="'.XOOPS_URL.'/image.php?id=\\2" alt="\\3" />';
+ }
+ // Support [list] [*] [/list] constructs.
+ $patterns[] = '/\[\*\](.*)\r?\n/sU';
+ $replacements[] = '<li>\\1</li>';
+
+ //<ul> lists
+ $patterns[] = '/\[list]/sU';
+ $replacements[] = '<ul>';
+ $patterns[] = '/\[\/list]/sU';
+ $replacements[] = '</ul>';
+
+ //<ol> lists
+ $patterns[] = '/\[olist]/sU';
+ $replacements[] = '<ol>';
+ $patterns[] = '/\[\/list]/sU';
+ $replacements[] = '</ol>';
+
+ // [/rhl]
+ $patterns[] = "/\[quote]/sU";
+ $replacements[] = _QUOTEC.'<div class="xoopsQuote"><blockquote>';
+ //$replacements[] = 'Quote: <div class="xoopsQuote"><blockquote>';
+ $patterns[] = "/\[\/quote]/sU";
+ $replacements[] = '</blockquote></div>';
+ $text = str_replace( "\x00", "", $text );
+ $c = "[\x01-\x1f]*";
+ $patterns[] = "/j{$c}a{$c}v{$c}a{$c}s{$c}c{$c}r{$c}i{$c}p{$c}t{$c}:/si";
+ $replacements[] = "(tammairanslip)";
+ $patterns[] = "/a{$c}b{$c}o{$c}u{$c}t{$c}:/si";
+ $replacements[] = "about :";
+ return preg_replace($patterns, $replacements, $text);
+ }
+
+ /**
+ * Convert linebreaks to <br /> tags
+ *
+ * @param string $text
+ *
+ * @return string
+ */
+ function nl2Br($text)
+ {
+ return preg_replace("/(\015\012)|(\015)|(\012)/","<br />",$text);
+ }
+
+ /**
+ * Add slashes to the text if magic_quotes_gpc is turned off.
+ *
+ * @param string $text
+ * @return string
+ **/
+ function addSlashes($text)
+ {
+ return ( get_magic_quotes_gpc() ? $text : addslashes( $text ) );
+ }
+ /*
+ * if magic_quotes_gpc is on, stirip back slashes
+ *
+ * @param string $text
+ *
+ * @return string
+ */
+ function stripSlashesGPC($text)
+ {
+ return ( get_magic_quotes_gpc() ? stripslashes($text) : $text );
+ }
+
+ /*
+ * for displaying data in html textbox forms
+ *
+ * @param string $text
+ *
+ * @return string
+ */
+ function htmlSpecialChars( $text )
+ {
+ //return preg_replace("/&/i", '&', htmlspecialchars($text, ENT_QUOTES));
+ return preg_replace(array("/&/i", "/ /i"), array('&', ' '), htmlspecialchars($text, ENT_QUOTES));
+ }
+
+ /**
+ * Reverses {@link htmlSpecialChars()}
+ *
+ * @param string $text
+ * @return string
+ **/
+ function undoHtmlSpecialChars( $text )
+ {
+ return preg_replace(array("/>/i", "/</i", "/"/i", "/'/i"), array(">", "<", "\"", "'"), $text);
+ }
+
+ /**
+ * Filters textarea form data in DB for display
+ *
+ * @param string $text
+ * @param bool $html allow html?
+ * @param bool $smiley allow smileys?
+ * @param bool $xcode allow xoopscode?
+ * @param bool $image allow inline images?
+ * @param bool $br convert linebreaks?
+ * @return string
+ **/
+ function &displayTarea(&$text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1)
+ {
+ if ($html != 1) {
+ // html not allowed
+ $text =& $this->htmlSpecialChars($text);
+ }
+ $text =& $this->codePreConv($text, $xcode); // Ryuji_edit(2003-11-18)
+ $text =& $this->makeClickable($text);
+ if ($smiley != 0) {
+ // process smiley
+ $text =& $this->smiley($text);
+ }
+ if ($xcode != 0) {
+ // decode xcode
+ if ($image != 0) {
+ // image allowed
+ $text =& $this->xoopsCodeDecode($text);
+ } else {
+ // image not allowed
+ $text =& $this->xoopsCodeDecode($text, 0);
+ }
+ }
+ if ($br != 0) {
+ $text =& $this->nl2Br($text);
+ }
+ $text =& $this->codeConv($text, $xcode, $image); // Ryuji_edit(2003-11-18)
+ return $text;
+ }
+
+ /**
+ * Filters textarea form data submitted for preview
+ *
+ * @param string $text
+ * @param bool $html allow html?
+ * @param bool $smiley allow smileys?
+ * @param bool $xcode allow xoopscode?
+ * @param bool $image allow inline images?
+ * @param bool $br convert linebreaks?
+ * @return string
+ **/
+ function &previewTarea(&$text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1)
+ {
+ $text =& $this->stripSlashesGPC($text);
+ if ($html != 1) {
+ // html not allowed
+ $text =& $this->htmlSpecialChars($text);
+ }
+ $text =& $this->codePreConv($text, $xcode); // Ryuji_edit(2003-11-18)
+ $text =& $this->makeClickable($text);
+ if ($smiley != 0) {
+ // process smiley
+ $text =& $this->smiley($text);
+ }
+ if ($xcode != 0) {
+ // decode xcode
+ if ($image != 0) {
+ // image allowed
+ $text =& $this->xoopsCodeDecode($text);
+ } else {
+ // image not allowed
+ $text =& $this->xoopsCodeDecode($text, 0);
+ }
+ }
+ if ($br != 0) {
+ $text =& $this->nl2Br($text);
+ }
+ $text =& $this->codeConv($text, $xcode, $image); // Ryuji_edit(2003-11-18)
+ return $text;
+ }
+
+ /**
+ * Replaces banned words in a string with their replacements
+ *
+ * @param string $text
+ * @return string
+ *
+ * @deprecated
+ **/
+ function &censorString(&$text)
+ {
+ if (!isset($this->censorConf)) {
+ $config_handler =& xoops_gethandler('config');
+ $this->censorConf =& $config_handler->getConfigsByCat(XOOPS_CONF_CENSOR);
+ }
+ if ($this->censorConf['censor_enable'] == 1) {
+ $replacement = $this->censorConf['censor_replace'];
+ foreach ($this->censorConf['censor_words'] as $bad) {
+ if ( !empty($bad) && $bad != null && $bad != "" && $bad != " ") {//$bad must not be an empty string or everything will be censored. Spaces not allowed as bad strings either
+ $bad = quotemeta($bad);
+ $patterns[] = "/(\s)".$bad."/siU";
+ $replacements[] = "\\1".$replacement;
+ $patterns[] = "/^".$bad."/siU";
+ $replacements[] = $replacement;
+ $patterns[] = "/(\n)".$bad."/siU";
+ $replacements[] = "\\1".$replacement;
+ $patterns[] = "/]".$bad."/siU";
+ $replacements[] = "]".$replacement;
+ $text = preg_replace($patterns, $replacements, $text);
+ }
+ }
+ }
+ return $text;
+ }
+
+
+ /**#@+
+ * Sanitizing of [code] tag
+ */
+ function codePreConv($text, $xcode = 1) {
+ if($xcode != 0){
+ $patterns = "/\[code](.*)\[\/code\]/esU";
+ $replacements = "'[code]'.base64_encode('$1').'[/code]'";
+ $text = preg_replace($patterns, $replacements, $text);
+ }
+ return $text;
+ }
+
+ function codeConv($text, $xcode = 1, $image = 1){
+ if($xcode != 0){
+ $patterns = "/\[code](.*)\[\/code\]/esU";
+ if ($image != 0) {
+ // image allowed
+ $replacements = "'<div class=\"xoopsCode\"><code><pre>'.MyTextSanitizer::codeSanitizer('$1').'</pre></code></div>'";
+ //$text =& $this->xoopsCodeDecode($text);
+ } else {
+ // image not allowed
+ $replacements = "'<div class=\"xoopsCode\"><code><pre>'.MyTextSanitizer::codeSanitizer('$1', 0).'</pre></code></div>'";
+ //$text =& $this->xoopsCodeDecode($text, 0);
+ }
+ $text = preg_replace($patterns, $replacements, $text);
+ }
+ return $text;
+ }
+
+ function codeSanitizer($str, $image = 1){
+ if($image != 0){
+ $str = $this->xoopsCodeDecode(
+ $this->htmlSpecialChars(str_replace('\"', '"', base64_decode($str)))
+ );
+ }else{
+ $str = $this->xoopsCodeDecode(
+ $this->htmlSpecialChars(str_replace('\"', '"', base64_decode($str))),0
+ );
+ }
+ return $str;
+ }
+
+
+ /**#@-*/
+
+
+##################### Deprecated Methods ######################
+
+ /**#@+
+ * @deprecated
+ */
+ function sanitizeForDisplay($text, $allowhtml = 0, $smiley = 1, $bbcode = 1)
+ {
+ if ( $allowhtml == 0 ) {
+ $text = $this->htmlSpecialChars($text);
+ } else {
+ //$config =& $GLOBALS['xoopsConfig'];
+ //$allowed = $config['allowed_html'];
+ //$text = strip_tags($text, $allowed);
+ $text = $this->makeClickable($text);
+ }
+ if ( $smiley == 1 ) {
+ $text = $this->smiley($text);
+ }
+ if ( $bbcode == 1 ) {
+ $text = $this->xoopsCodeDecode($text);
+ }
+ $text = $this->nl2Br($text);
+ return $text;
+ }
+
+ function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1)
+ {
+ $text = $this->oopsStripSlashesGPC($text);
+ if ( $allowhtml == 0 ) {
+ $text = $this->htmlSpecialChars($text);
+ } else {
+ //$config =& $GLOBALS['xoopsConfig'];
+ //$allowed = $config['allowed_html'];
+ //$text = strip_tags($text, $allowed);
+ $text = $this->makeClickable($text);
+ }
+ if ( $smiley == 1 ) {
+ $text = $this->smiley($text);
+ }
+ if ( $bbcode == 1 ) {
+ $text = $this->xoopsCodeDecode($text);
+ }
+ $text = $this->nl2Br($text);
+ return $text;
+ }
+
+ function makeTboxData4Save($text)
+ {
+ //$text = $this->undoHtmlSpecialChars($text);
+ return $this->addSlashes($text);
+ }
+
+ function makeTboxData4Show($text, $smiley=0)
+ {
+ $text = $this->htmlSpecialChars($text);
+ return $text;
+ }
+
+ function makeTboxData4Edit($text)
+ {
+ return $this->htmlSpecialChars($text);
+ }
+
+ function makeTboxData4Preview($text, $smiley=0)
+ {
+ $text = $this->stripSlashesGPC($text);
+ $text = $this->htmlSpecialChars($text);
+ return $text;
+ }
+
+ function makeTboxData4PreviewInForm($text)
+ {
+ $text = $this->stripSlashesGPC($text);
+ return $this->htmlSpecialChars($text);
+ }
+
+ function makeTareaData4Save($text)
+ {
+ return $this->addSlashes($text);
+ }
+
+ function &makeTareaData4Show(&$text, $html=1, $smiley=1, $xcode=1)
+ {
+ $return = $this->displayTarea($text, $html, $smiley, $xcode);
+ return $return;
+ }
+
+ function makeTareaData4Edit($text)
+ {
+ return $this->htmlSpecialChars($text);
+ }
+
+ function &makeTareaData4Preview(&$text, $html=1, $smiley=1, $xcode=1)
+ {
+ $return = $this->previewTarea($text, $html, $smiley, $xcode);
+ return $return;
+ }
+
+ function makeTareaData4PreviewInForm($text)
+ {
+ //if magic_quotes_gpc is on, do stipslashes
+ $text = $this->stripSlashesGPC($text);
+ return $this->htmlSpecialChars($text);
+ }
+
+ function makeTareaData4InsideQuotes($text)
+ {
+ return $this->htmlSpecialChars($text);
+ }
+
+ function &oopsStripSlashesGPC($text)
+ {
+ $return = $this->stripSlashesGPC($text);
+ return $return;
+ }
+
+ function &oopsStripSlashesRT($text)
+ {
+ if (get_magic_quotes_runtime()) {
+ $text =& stripslashes($text);
+ }
+ return $text;
+ }
+
+ function &oopsAddSlashes($text)
+ {
+ $return = $this->addSlashes($text);
+ return $return;
+ }
+
+ function &oopsHtmlSpecialChars($text)
+ {
+ $return = $this->htmlSpecialChars($text);
+ return $return;
+ }
+
+ function &oopsNl2Br($text)
+ {
+ $return = $this->nl2br($text);
+ return $return;
+ }
+ /**#@-*/
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/module.textsanitizer.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/pagenav.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/pagenav.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/pagenav.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,200 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+/**
+ * Class to facilitate navigation in a multi page document/list
+ *
+ * @package kernel
+ * @subpackage util
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright (c) 2000-2003 The Xoops Project - www.xoops.org
+ */
+class XoopsPageNav
+{
+ /**#@+
+ * @access private
+ */
+ var $total;
+ var $perpage;
+ var $current;
+ var $url;
+ /**#@-*/
+
+ /**
+ * Constructor
+ *
+ * @param int $total_items Total number of items
+ * @param int $items_perpage Number of items per page
+ * @param int $current_start First item on the current page
+ * @param string $start_name Name for "start" or "offset"
+ * @param string $extra_arg Additional arguments to pass in the URL
+ **/
+ function XoopsPageNav($total_items, $items_perpage, $current_start, $start_name="start", $extra_arg="")
+ {
+ $this->total = intval($total_items);
+ $this->perpage = intval($items_perpage);
+ $this->current = intval($current_start);
+ if ( $extra_arg != '' && ( substr($extra_arg, -5) != '&' || substr($extra_arg, -1) != '&' ) ) {
+ $extra_arg .= '&';
+ }
+ $url = parse_url($_SERVER['REQUEST_URI']);
+ $this->url = $url['path'].'?'.$extra_arg.trim($start_name).'=';
+ }
+
+ /**
+ * Create text navigation
+ *
+ * @param integer $offset
+ * @return string
+ **/
+ function renderNav($offset = 4)
+ {
+ $ret = '';
+ if ( $this->total <= $this->perpage ) {
+ return $ret;
+ }
+ $total_pages = ceil($this->total / $this->perpage);
+ if ( $total_pages > 1 ) {
+ $prev = $this->current - $this->perpage;
+ if ( $prev >= 0 ) {
+ $ret .= '<a href="'.$this->url.$prev.'">«</a> ';
+ }
+ $counter = 1;
+ $current_page = intval(floor(($this->current + $this->perpage) / $this->perpage));
+ while ( $counter <= $total_pages ) {
+ if ( $counter == $current_page ) {
+ $ret .= '<b>('.$counter.')</b> ';
+ } elseif ( ($counter > $current_page-$offset && $counter < $current_page + $offset ) || $counter == 1 || $counter == $total_pages ) {
+ if ( $counter == $total_pages && $current_page < $total_pages - $offset ) {
+ $ret .= '... ';
+ }
+ $ret .= '<a href="'.$this->url.(($counter - 1) * $this->perpage).'">'.$counter.'</a> ';
+ if ( $counter == 1 && $current_page > 1 + $offset ) {
+ $ret .= '... ';
+ }
+ }
+ $counter++;
+ }
+ $next = $this->current + $this->perpage;
+ if ( $this->total > $next ) {
+ $ret .= '<a href="'.$this->url.$next.'">»</a> ';
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * Create a navigational dropdown list
+ *
+ * @param boolean $showbutton Show the "Go" button?
+ * @return string
+ **/
+ function renderSelect($showbutton = false)
+ {
+ if ( $this->total < $this->perpage ) {
+ return;
+ }
+ $total_pages = ceil($this->total / $this->perpage);
+ $ret = '';
+ if ( $total_pages > 1 ) {
+ $ret = '<form name="pagenavform">';
+ $ret .= '<select name="pagenavselect" onchange="location=this.options[this.options.selectedIndex].value;">';
+ $counter = 1;
+ $current_page = intval(floor(($this->current + $this->perpage) / $this->perpage));
+ while ( $counter <= $total_pages ) {
+ if ( $counter == $current_page ) {
+ $ret .= '<option value="'.$this->url.(($counter - 1) * $this->perpage).'" selected="selected">'.$counter.'</option>';
+ } else {
+ $ret .= '<option value="'.$this->url.(($counter - 1) * $this->perpage).'">'.$counter.'</option>';
+ }
+ $counter++;
+ }
+ $ret .= '</select>';
+ if ($showbutton) {
+ $ret .= ' <input type="submit" value="'._GO.'" />';
+ }
+ $ret .= '</form>';
+ }
+ return $ret;
+ }
+
+ /**
+ * Create navigation with images
+ *
+ * @param integer $offset
+ * @return string
+ **/
+ function renderImageNav($offset = 4)
+ {
+ if ( $this->total < $this->perpage ) {
+ return;
+ }
+ $total_pages = ceil($this->total / $this->perpage);
+ $ret = '';
+ if ( $total_pages > 1 ) {
+ $prev = $this->current - $this->perpage;
+ if ( $prev >= 0 ) {
+ $ret .= '<div class="pagneutral" style="float: left;"><a href="'.$this->url.$prev.'"><</a></div>';
+ }
+ $ret .= '<div style="float: left;"><img src="'.XOOPS_URL.'/images/blank.gif" width="6" alt="" /></div>';
+ $counter = 1;
+ $current_page = intval(floor(($this->current + $this->perpage) / $this->perpage));
+ while ( $counter <= $total_pages ) {
+ if ( $counter == $current_page ) {
+ $ret .= '<div style="float:left;" class="pagact"><b>'.$counter.'</b></div>';
+ } elseif ( ($counter > $current_page-$offset && $counter < $current_page + $offset ) || $counter == 1 || $counter == $total_pages ) {
+ if ( $counter == $total_pages && $current_page < $total_pages - $offset ) {
+ $ret .= '<div style="float: left;" class="paginact">...</div>';
+ }
+ $ret .= '<div style="float: left;" class="paginact"><a href="'.$this->url.(($counter - 1) * $this->perpage).'">'.$counter.'</a></div>';
+ if ( $counter == 1 && $current_page > 1 + $offset ) {
+ $ret .= '<div style="float: left;" class="paginact">...</div>';
+ }
+ }
+ $counter++;
+ }
+ $ret .= '<div style="float: left;"><img src="'.XOOPS_URL.'/images/blank.gif" width="6" alt="" /></div>';
+ $next = $this->current + $this->perpage;
+ if ( $this->total > $next ) {
+ $ret .= '<div style="float: left;" class="pagneutral"><a href="'.$this->url.$next.'">></a></div>';
+ }
+ else {
+ $ret .= '<div style="float: left;"> </div>';
+
+ }
+ }
+ $ret .= '<br style="clear: both;" />';
+ return $ret;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/pagenav.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/Config_File.class.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/Config_File.class.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/Config_File.class.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,389 @@
+<?php
+
+/**
+ * Config_File class.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * @link http://smarty.php.net/
+ * @version 2.6.5-dev
+ * @copyright Copyright: 2001-2004 ispi of Lincoln, Inc.
+ * @author Andrei Zmievski <andrei at php.net>
+ * @access public
+ * @package Smarty
+ */
+
+/* $Id$ */
+
+/**
+ * Config file reading class
+ * @package Smarty
+ */
+class Config_File {
+ /**#@+
+ * Options
+ * @var boolean
+ */
+ /**
+ * Controls whether variables with the same name overwrite each other.
+ */
+ var $overwrite = true;
+
+ /**
+ * Controls whether config values of on/true/yes and off/false/no get
+ * converted to boolean values automatically.
+ */
+ var $booleanize = true;
+
+ /**
+ * Controls whether hidden config sections/vars are read from the file.
+ */
+ var $read_hidden = true;
+
+ /**
+ * Controls whether or not to fix mac or dos formatted newlines.
+ * If set to true, \r or \r\n will be changed to \n.
+ */
+ var $fix_newlines = true;
+ /**#@-*/
+
+ /** @access private */
+ var $_config_path = "";
+ var $_config_data = array();
+ /**#@-*/
+
+ /**
+ * Constructs a new config file class.
+ *
+ * @param string $config_path (optional) path to the config files
+ */
+ function Config_File($config_path = NULL)
+ {
+ if (isset($config_path))
+ $this->set_path($config_path);
+ }
+
+
+ /**
+ * Set the path where configuration files can be found.
+ *
+ * @param string $config_path path to the config files
+ */
+ function set_path($config_path)
+ {
+ if (!empty($config_path)) {
+ if (!is_string($config_path) || !file_exists($config_path) || !is_dir($config_path)) {
+ $this->_trigger_error_msg("Bad config file path '$config_path'");
+ return;
+ }
+ if(substr($config_path, -1) != DIRECTORY_SEPARATOR) {
+ $config_path .= DIRECTORY_SEPARATOR;
+ }
+
+ $this->_config_path = $config_path;
+ }
+ }
+
+
+ /**
+ * Retrieves config info based on the file, section, and variable name.
+ *
+ * @param string $file_name config file to get info for
+ * @param string $section_name (optional) section to get info for
+ * @param string $var_name (optional) variable to get info for
+ * @return string|array a value or array of values
+ */
+ function &get($file_name, $section_name = NULL, $var_name = NULL)
+ {
+ if (empty($file_name)) {
+ $this->_trigger_error_msg('Empty config file name');
+ return;
+ } else {
+ $file_name = $this->_config_path . $file_name;
+ if (!isset($this->_config_data[$file_name]))
+ $this->load_file($file_name, false);
+ }
+
+ if (!empty($var_name)) {
+ if (empty($section_name)) {
+ return $this->_config_data[$file_name]["vars"][$var_name];
+ } else {
+ if(isset($this->_config_data[$file_name]["sections"][$section_name]["vars"][$var_name]))
+ return $this->_config_data[$file_name]["sections"][$section_name]["vars"][$var_name];
+ else
+ return array();
+ }
+ } else {
+ if (empty($section_name)) {
+ return (array)$this->_config_data[$file_name]["vars"];
+ } else {
+ if(isset($this->_config_data[$file_name]["sections"][$section_name]["vars"]))
+ return (array)$this->_config_data[$file_name]["sections"][$section_name]["vars"];
+ else
+ return array();
+ }
+ }
+ }
+
+
+ /**
+ * Retrieves config info based on the key.
+ *
+ * @param $file_name string config key (filename/section/var)
+ * @return string|array same as get()
+ * @uses get() retrieves information from config file and returns it
+ */
+ function &get_key($config_key)
+ {
+ list($file_name, $section_name, $var_name) = explode('/', $config_key, 3);
+ $result = &$this->get($file_name, $section_name, $var_name);
+ return $result;
+ }
+
+ /**
+ * Get all loaded config file names.
+ *
+ * @return array an array of loaded config file names
+ */
+ function get_file_names()
+ {
+ return array_keys($this->_config_data);
+ }
+
+
+ /**
+ * Get all section names from a loaded file.
+ *
+ * @param string $file_name config file to get section names from
+ * @return array an array of section names from the specified file
+ */
+ function get_section_names($file_name)
+ {
+ $file_name = $this->_config_path . $file_name;
+ if (!isset($this->_config_data[$file_name])) {
+ $this->_trigger_error_msg("Unknown config file '$file_name'");
+ return;
+ }
+
+ return array_keys($this->_config_data[$file_name]["sections"]);
+ }
+
+
+ /**
+ * Get all global or section variable names.
+ *
+ * @param string $file_name config file to get info for
+ * @param string $section_name (optional) section to get info for
+ * @return array an array of variables names from the specified file/section
+ */
+ function get_var_names($file_name, $section = NULL)
+ {
+ if (empty($file_name)) {
+ $this->_trigger_error_msg('Empty config file name');
+ return;
+ } else if (!isset($this->_config_data[$file_name])) {
+ $this->_trigger_error_msg("Unknown config file '$file_name'");
+ return;
+ }
+
+ if (empty($section))
+ return array_keys($this->_config_data[$file_name]["vars"]);
+ else
+ return array_keys($this->_config_data[$file_name]["sections"][$section]["vars"]);
+ }
+
+
+ /**
+ * Clear loaded config data for a certain file or all files.
+ *
+ * @param string $file_name file to clear config data for
+ */
+ function clear($file_name = NULL)
+ {
+ if ($file_name === NULL)
+ $this->_config_data = array();
+ else if (isset($this->_config_data[$file_name]))
+ $this->_config_data[$file_name] = array();
+ }
+
+
+ /**
+ * Load a configuration file manually.
+ *
+ * @param string $file_name file name to load
+ * @param boolean $prepend_path whether current config path should be
+ * prepended to the filename
+ */
+ function load_file($file_name, $prepend_path = true)
+ {
+ if ($prepend_path && $this->_config_path != "")
+ $config_file = $this->_config_path . $file_name;
+ else
+ $config_file = $file_name;
+
+ ini_set('track_errors', true);
+ $fp = @fopen($config_file, "r");
+ if (!is_resource($fp)) {
+ $this->_trigger_error_msg("Could not open config file '$config_file'");
+ return false;
+ }
+
+ $contents = ($size = filesize($config_file)) ? fread($fp, $size) : '';
+ fclose($fp);
+
+ $this->_config_data[$config_file] = $this->parse_contents($contents);
+ return true;
+ }
+
+ /**
+ * Store the contents of a file manually.
+ *
+ * @param string $config_file file name of the related contents
+ * @param string $contents the file-contents to parse
+ */
+ function set_file_contents($config_file, $contents)
+ {
+ $this->_config_data[$config_file] = $this->parse_contents($contents);
+ return true;
+ }
+
+ /**
+ * parse the source of a configuration file manually.
+ *
+ * @param string $contents the file-contents to parse
+ */
+ function parse_contents($contents)
+ {
+ if($this->fix_newlines) {
+ // fix mac/dos formatted newlines
+ $contents = preg_replace('!\r\n?!', "\n", $contents);
+ }
+
+ $config_data = array();
+ $config_data['sections'] = array();
+ $config_data['vars'] = array();
+
+ /* reference to fill with data */
+ $vars =& $config_data['vars'];
+
+ /* parse file line by line */
+ preg_match_all('!^.*\r?\n?!m', $contents, $match);
+ $lines = $match[0];
+ for ($i=0, $count=count($lines); $i<$count; $i++) {
+ $line = $lines[$i];
+ if (empty($line)) continue;
+
+ if ( $line{0} == '[' && preg_match('!^\[(.*?)\]!', $line, $match) ) {
+ /* section found */
+ if ($match[1]{0} == '.') {
+ /* hidden section */
+ if ($this->read_hidden) {
+ $section_name = substr($match[1], 1);
+ } else {
+ /* break reference to $vars to ignore hidden section */
+ unset($vars);
+ $vars = array();
+ continue;
+ }
+ } else {
+ $section_name = $match[1];
+ }
+ if (!isset($config_data['sections'][$section_name]))
+ $config_data['sections'][$section_name] = array('vars' => array());
+ $vars =& $config_data['sections'][$section_name]['vars'];
+ continue;
+ }
+
+ if (preg_match('/^\s*(\.?\w+)\s*=\s*(.*)/s', $line, $match)) {
+ /* variable found */
+ $var_name = rtrim($match[1]);
+ if (strpos($match[2], '"""') === 0) {
+ /* handle multiline-value */
+ $lines[$i] = substr($match[2], 3);
+ $var_value = '';
+ while ($i<$count) {
+ if (($pos = strpos($lines[$i], '"""')) === false) {
+ $var_value .= $lines[$i++];
+ } else {
+ /* end of multiline-value */
+ $var_value .= substr($lines[$i], 0, $pos);
+ break;
+ }
+ }
+ $booleanize = false;
+
+ } else {
+ /* handle simple value */
+ $var_value = preg_replace('/^([\'"])(.*)\1$/', '\2', rtrim($match[2]));
+ $booleanize = $this->booleanize;
+
+ }
+ $this->_set_config_var($vars, $var_name, $var_value, $booleanize);
+ }
+ /* else unparsable line / means it is a comment / means ignore it */
+ }
+ return $config_data;
+ }
+
+ /**#@+ @access private */
+ /**
+ * @param array &$container
+ * @param string $var_name
+ * @param mixed $var_value
+ * @param boolean $booleanize determines whether $var_value is converted to
+ * to true/false
+ */
+ function _set_config_var(&$container, $var_name, $var_value, $booleanize)
+ {
+ if ($var_name{0} == '.') {
+ if (!$this->read_hidden)
+ return;
+ else
+ $var_name = substr($var_name, 1);
+ }
+
+ if (!preg_match("/^[a-zA-Z_]\w*$/", $var_name)) {
+ $this->_trigger_error_msg("Bad variable name '$var_name'");
+ return;
+ }
+
+ if ($booleanize) {
+ if (preg_match("/^(on|true|yes)$/i", $var_value))
+ $var_value = true;
+ else if (preg_match("/^(off|false|no)$/i", $var_value))
+ $var_value = false;
+ }
+
+ if (!isset($container[$var_name]) || $this->overwrite)
+ $container[$var_name] = $var_value;
+ else {
+ settype($container[$var_name], 'array');
+ $container[$var_name][] = $var_value;
+ }
+ }
+
+ /**
+ * @uses trigger_error() creates a PHP warning/error
+ * @param string $error_msg
+ * @param integer $error_type one of
+ */
+ function _trigger_error_msg($error_msg, $error_type = E_USER_WARNING)
+ {
+ trigger_error("Config_File error: $error_msg", $error_type);
+ }
+ /**#@-*/
+}
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/Config_File.class.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/Smarty.class.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/Smarty.class.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/Smarty.class.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,1932 @@
+<?php
+
+/**
+ * Project: Smarty: the PHP compiling template engine
+ * File: Smarty.class.php
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * For questions, help, comments, discussion, etc., please join the
+ * Smarty mailing list. Send a blank e-mail to
+ * smarty-general-subscribe at lists.php.net
+ *
+ * @link http://smarty.php.net/
+ * @copyright 2001-2004 ispi of Lincoln, Inc.
+ * @author Monte Ohrt <monte at ispi.net>
+ * @author Andrei Zmievski <andrei at php.net>
+ * @package Smarty
+ * @version 2.6.5-dev
+ */
+
+/* $Id$ */
+
+/**
+ * DIR_SEP isn't used anymore, but third party apps might
+ */
+if(!defined('DIR_SEP')) {
+ define('DIR_SEP', DIRECTORY_SEPARATOR);
+}
+
+/**
+ * set SMARTY_DIR to absolute path to Smarty library files.
+ * if not defined, include_path will be used. Sets SMARTY_DIR only if user
+ * application has not already defined it.
+ */
+
+if (!defined('SMARTY_DIR')) {
+ define('SMARTY_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+}
+
+define('SMARTY_PHP_PASSTHRU', 0);
+define('SMARTY_PHP_QUOTE', 1);
+define('SMARTY_PHP_REMOVE', 2);
+define('SMARTY_PHP_ALLOW', 3);
+
+/**
+ * @package Smarty
+ */
+class Smarty
+{
+ /**#@+
+ * Smarty Configuration Section
+ */
+
+ /**
+ * The name of the directory where templates are located.
+ *
+ * @var string
+ */
+ var $template_dir = 'templates';
+
+ /**
+ * The directory where compiled templates are located.
+ *
+ * @var string
+ */
+ var $compile_dir = 'templates_c';
+
+ /**
+ * The directory where config files are located.
+ *
+ * @var string
+ */
+ var $config_dir = 'configs';
+
+ /**
+ * An array of directories searched for plugins.
+ *
+ * @var array
+ */
+ var $plugins_dir = array('plugins');
+
+ /**
+ * If debugging is enabled, a debug console window will display
+ * when the page loads (make sure your browser allows unrequested
+ * popup windows)
+ *
+ * @var boolean
+ */
+ var $debugging = false;
+
+ /**
+ * When set, smarty does uses this value as error_reporting-level.
+ *
+ * @var boolean
+ */
+ var $error_reporting = null;
+
+ /**
+ * This is the path to the debug console template. If not set,
+ * the default one will be used.
+ *
+ * @var string
+ */
+ var $debug_tpl = '';
+
+ /**
+ * This determines if debugging is enable-able from the browser.
+ * <ul>
+ * <li>NONE => no debugging control allowed</li>
+ * <li>URL => enable debugging when SMARTY_DEBUG is found in the URL.</li>
+ * </ul>
+ * @link http://www.foo.dom/index.php?SMARTY_DEBUG
+ * @var string
+ */
+ var $debugging_ctrl = 'NONE';
+
+ /**
+ * This tells Smarty whether to check for recompiling or not. Recompiling
+ * does not need to happen unless a template or config file is changed.
+ * Typically you enable this during development, and disable for
+ * production.
+ *
+ * @var boolean
+ */
+ var $compile_check = true;
+
+ /**
+ * This forces templates to compile every time. Useful for development
+ * or debugging.
+ *
+ * @var boolean
+ */
+ var $force_compile = false;
+
+ /**
+ * This enables template caching.
+ * <ul>
+ * <li>0 = no caching</li>
+ * <li>1 = use class cache_lifetime value</li>
+ * <li>2 = use cache_lifetime in cache file</li>
+ * </ul>
+ * @var integer
+ */
+ var $caching = 0;
+
+ /**
+ * The name of the directory for cache files.
+ *
+ * @var string
+ */
+ var $cache_dir = 'cache';
+
+ /**
+ * This is the number of seconds cached content will persist.
+ * <ul>
+ * <li>0 = always regenerate cache</li>
+ * <li>-1 = never expires</li>
+ * </ul>
+ *
+ * @var integer
+ */
+ var $cache_lifetime = 3600;
+
+ /**
+ * Only used when $caching is enabled. If true, then If-Modified-Since headers
+ * are respected with cached content, and appropriate HTTP headers are sent.
+ * This way repeated hits to a cached page do not send the entire page to the
+ * client every time.
+ *
+ * @var boolean
+ */
+ var $cache_modified_check = false;
+
+ /**
+ * This determines how Smarty handles "<?php ... ?>" tags in templates.
+ * possible values:
+ * <ul>
+ * <li>SMARTY_PHP_PASSTHRU -> print tags as plain text</li>
+ * <li>SMARTY_PHP_QUOTE -> escape tags as entities</li>
+ * <li>SMARTY_PHP_REMOVE -> remove php tags</li>
+ * <li>SMARTY_PHP_ALLOW -> execute php tags</li>
+ * </ul>
+ *
+ * @var integer
+ */
+ var $php_handling = SMARTY_PHP_PASSTHRU;
+
+ /**
+ * This enables template security. When enabled, many things are restricted
+ * in the templates that normally would go unchecked. This is useful when
+ * untrusted parties are editing templates and you want a reasonable level
+ * of security. (no direct execution of PHP in templates for example)
+ *
+ * @var boolean
+ */
+ var $security = false;
+
+ /**
+ * This is the list of template directories that are considered secure. This
+ * is used only if {@link $security} is enabled. One directory per array
+ * element. {@link $template_dir} is in this list implicitly.
+ *
+ * @var array
+ */
+ var $secure_dir = array();
+
+ /**
+ * These are the security settings for Smarty. They are used only when
+ * {@link $security} is enabled.
+ *
+ * @var array
+ */
+ var $security_settings = array(
+ 'PHP_HANDLING' => false,
+ 'IF_FUNCS' => array('array', 'list',
+ 'isset', 'empty',
+ 'count', 'sizeof',
+ 'in_array', 'is_array',
+ 'true','false'),
+ 'INCLUDE_ANY' => false,
+ 'PHP_TAGS' => false,
+ 'MODIFIER_FUNCS' => array('count'),
+ 'ALLOW_CONSTANTS' => false
+ );
+
+ /**
+ * This is an array of directories where trusted php scripts reside.
+ * {@link $security} is disabled during their inclusion/execution.
+ *
+ * @var array
+ */
+ var $trusted_dir = array();
+
+ /**
+ * The left delimiter used for the template tags.
+ *
+ * @var string
+ */
+ var $left_delimiter = '{';
+
+ /**
+ * The right delimiter used for the template tags.
+ *
+ * @var string
+ */
+ var $right_delimiter = '}';
+
+ /**
+ * The order in which request variables are registered, similar to
+ * variables_order in php.ini E = Environment, G = GET, P = POST,
+ * C = Cookies, S = Server
+ *
+ * @var string
+ */
+ var $request_vars_order = 'EGPCS';
+
+ /**
+ * Indicates wether $HTTP_*_VARS[] (request_use_auto_globals=false)
+ * are uses as request-vars or $_*[]-vars. note: if
+ * request_use_auto_globals is true, then $request_vars_order has
+ * no effect, but the php-ini-value "gpc_order"
+ *
+ * @var boolean
+ */
+ var $request_use_auto_globals = true;
+
+ /**
+ * Set this if you want different sets of compiled files for the same
+ * templates. This is useful for things like different languages.
+ * Instead of creating separate sets of templates per language, you
+ * set different compile_ids like 'en' and 'de'.
+ *
+ * @var string
+ */
+ var $compile_id = null;
+
+ /**
+ * This tells Smarty whether or not to use sub dirs in the cache/ and
+ * templates_c/ directories. sub directories better organized, but
+ * may not work well with PHP safe mode enabled.
+ *
+ * @var boolean
+ *
+ */
+ var $use_sub_dirs = false;
+
+ /**
+ * This is a list of the modifiers to apply to all template variables.
+ * Put each modifier in a separate array element in the order you want
+ * them applied. example: <code>array('escape:"htmlall"');</code>
+ *
+ * @var array
+ */
+ var $default_modifiers = array();
+
+ /**
+ * This is the resource type to be used when not specified
+ * at the beginning of the resource path. examples:
+ * $smarty->display('file:index.tpl');
+ * $smarty->display('db:index.tpl');
+ * $smarty->display('index.tpl'); // will use default resource type
+ * {include file="file:index.tpl"}
+ * {include file="db:index.tpl"}
+ * {include file="index.tpl"} {* will use default resource type *}
+ *
+ * @var array
+ */
+ var $default_resource_type = 'file';
+
+ /**
+ * The function used for cache file handling. If not set, built-in caching is used.
+ *
+ * @var null|string function name
+ */
+ var $cache_handler_func = null;
+
+ /**
+ * This indicates which filters are automatically loaded into Smarty.
+ *
+ * @var array array of filter names
+ */
+ var $autoload_filters = array();
+
+ /**#@+
+ * @var boolean
+ */
+ /**
+ * This tells if config file vars of the same name overwrite each other or not.
+ * if disabled, same name variables are accumulated in an array.
+ */
+ var $config_overwrite = true;
+
+ /**
+ * This tells whether or not to automatically booleanize config file variables.
+ * If enabled, then the strings "on", "true", and "yes" are treated as boolean
+ * true, and "off", "false" and "no" are treated as boolean false.
+ */
+ var $config_booleanize = true;
+
+ /**
+ * This tells whether hidden sections [.foobar] are readable from the
+ * tempalates or not. Normally you would never allow this since that is
+ * the point behind hidden sections: the application can access them, but
+ * the templates cannot.
+ */
+ var $config_read_hidden = false;
+
+ /**
+ * This tells whether or not automatically fix newlines in config files.
+ * It basically converts \r (mac) or \r\n (dos) to \n
+ */
+ var $config_fix_newlines = true;
+ /**#@-*/
+
+ /**
+ * If a template cannot be found, this PHP function will be executed.
+ * Useful for creating templates on-the-fly or other special action.
+ *
+ * @var string function name
+ */
+ var $default_template_handler_func = '';
+
+ /**
+ * The file that contains the compiler class. This can a full
+ * pathname, or relative to the php_include path.
+ *
+ * @var string
+ */
+ var $compiler_file = 'Smarty_Compiler.class.php';
+
+ /**
+ * The class used for compiling templates.
+ *
+ * @var string
+ */
+ var $compiler_class = 'Smarty_Compiler';
+
+ /**
+ * The class used to load config vars.
+ *
+ * @var string
+ */
+ var $config_class = 'Config_File';
+
+/**#@+
+ * END Smarty Configuration Section
+ * There should be no need to touch anything below this line.
+ * @access private
+ */
+ /**
+ * where assigned template vars are kept
+ *
+ * @var array
+ */
+ var $_tpl_vars = array();
+
+ /**
+ * stores run-time $smarty.* vars
+ *
+ * @var null|array
+ */
+ var $_smarty_vars = null;
+
+ /**
+ * keeps track of sections
+ *
+ * @var array
+ */
+ var $_sections = array();
+
+ /**
+ * keeps track of foreach blocks
+ *
+ * @var array
+ */
+ var $_foreach = array();
+
+ /**
+ * keeps track of tag hierarchy
+ *
+ * @var array
+ */
+ var $_tag_stack = array();
+
+ /**
+ * configuration object
+ *
+ * @var Config_file
+ */
+ var $_conf_obj = null;
+
+ /**
+ * loaded configuration settings
+ *
+ * @var array
+ */
+ var $_config = array(array('vars' => array(), 'files' => array()));
+
+ /**
+ * md5 checksum of the string 'Smarty'
+ *
+ * @var string
+ */
+ var $_smarty_md5 = 'f8d698aea36fcbead2b9d5359ffca76f';
+
+ /**
+ * Smarty version number
+ *
+ * @var string
+ */
+ var $_version = '2.6.5-dev';
+
+ /**
+ * current template inclusion depth
+ *
+ * @var integer
+ */
+ var $_inclusion_depth = 0;
+
+ /**
+ * for different compiled templates
+ *
+ * @var string
+ */
+ var $_compile_id = null;
+
+ /**
+ * text in URL to enable debug mode
+ *
+ * @var string
+ */
+ var $_smarty_debug_id = 'SMARTY_DEBUG';
+
+ /**
+ * debugging information for debug console
+ *
+ * @var array
+ */
+ var $_smarty_debug_info = array();
+
+ /**
+ * info that makes up a cache file
+ *
+ * @var array
+ */
+ var $_cache_info = array();
+
+ /**
+ * default file permissions
+ *
+ * @var integer
+ */
+ var $_file_perms = 0644;
+
+ /**
+ * default dir permissions
+ *
+ * @var integer
+ */
+ var $_dir_perms = 0771;
+
+ /**
+ * registered objects
+ *
+ * @var array
+ */
+ var $_reg_objects = array();
+
+ /**
+ * table keeping track of plugins
+ *
+ * @var array
+ */
+ var $_plugins = array(
+ 'modifier' => array(),
+ 'function' => array(),
+ 'block' => array(),
+ 'compiler' => array(),
+ 'prefilter' => array(),
+ 'postfilter' => array(),
+ 'outputfilter' => array(),
+ 'resource' => array(),
+ 'insert' => array());
+
+
+ /**
+ * cache serials
+ *
+ * @var array
+ */
+ var $_cache_serials = array();
+
+ /**
+ * name of optional cache include file
+ *
+ * @var string
+ */
+ var $_cache_include = null;
+
+ /**
+ * indicate if the current code is used in a compiled
+ * include
+ *
+ * @var string
+ */
+ var $_cache_including = false;
+
+ /**#@-*/
+ /**
+ * The class constructor.
+ */
+ function Smarty()
+ {
+ $this->assign('SCRIPT_NAME', isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME']
+ : @$GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']);
+ }
+
+ /**
+ * assigns values to template variables
+ *
+ * @param array|string $tpl_var the template variable name(s)
+ * @param mixed $value the value to assign
+ */
+ function assign($tpl_var, $value = null)
+ {
+ if (is_array($tpl_var)){
+ foreach ($tpl_var as $key => $val) {
+ if ($key != '') {
+ $this->_tpl_vars[$key] = $val;
+ }
+ }
+ } else {
+ if ($tpl_var != '')
+ $this->_tpl_vars[$tpl_var] = $value;
+ }
+ }
+
+ /**
+ * assigns values to template variables by reference
+ *
+ * @param string $tpl_var the template variable name
+ * @param mixed $value the referenced value to assign
+ */
+ function assign_by_ref($tpl_var, &$value)
+ {
+ if ($tpl_var != '')
+ $this->_tpl_vars[$tpl_var] = &$value;
+ }
+
+ /**
+ * appends values to template variables
+ *
+ * @param array|string $tpl_var the template variable name(s)
+ * @param mixed $value the value to append
+ */
+ function append($tpl_var, $value=null, $merge=false)
+ {
+ if (is_array($tpl_var)) {
+ // $tpl_var is an array, ignore $value
+ foreach ($tpl_var as $_key => $_val) {
+ if ($_key != '') {
+ if(!@is_array($this->_tpl_vars[$_key])) {
+ settype($this->_tpl_vars[$_key],'array');
+ }
+ if($merge && is_array($_val)) {
+ foreach($_val as $_mkey => $_mval) {
+ $this->_tpl_vars[$_key][$_mkey] = $_mval;
+ }
+ } else {
+ $this->_tpl_vars[$_key][] = $_val;
+ }
+ }
+ }
+ } else {
+ if ($tpl_var != '' && isset($value)) {
+ if(!@is_array($this->_tpl_vars[$tpl_var])) {
+ settype($this->_tpl_vars[$tpl_var],'array');
+ }
+ if($merge && is_array($value)) {
+ foreach($value as $_mkey => $_mval) {
+ $this->_tpl_vars[$tpl_var][$_mkey] = $_mval;
+ }
+ } else {
+ $this->_tpl_vars[$tpl_var][] = $value;
+ }
+ }
+ }
+ }
+
+ /**
+ * appends values to template variables by reference
+ *
+ * @param string $tpl_var the template variable name
+ * @param mixed $value the referenced value to append
+ */
+ function append_by_ref($tpl_var, &$value, $merge=false)
+ {
+ if ($tpl_var != '' && isset($value)) {
+ if(!@is_array($this->_tpl_vars[$tpl_var])) {
+ settype($this->_tpl_vars[$tpl_var],'array');
+ }
+ if ($merge && is_array($value)) {
+ foreach($value as $_key => $_val) {
+ $this->_tpl_vars[$tpl_var][$_key] = &$value[$_key];
+ }
+ } else {
+ $this->_tpl_vars[$tpl_var][] = &$value;
+ }
+ }
+ }
+
+
+ /**
+ * clear the given assigned template variable.
+ *
+ * @param string $tpl_var the template variable to clear
+ */
+ function clear_assign($tpl_var)
+ {
+ if (is_array($tpl_var))
+ foreach ($tpl_var as $curr_var)
+ unset($this->_tpl_vars[$curr_var]);
+ else
+ unset($this->_tpl_vars[$tpl_var]);
+ }
+
+
+ /**
+ * Registers custom function to be used in templates
+ *
+ * @param string $function the name of the template function
+ * @param string $function_impl the name of the PHP function to register
+ */
+ function register_function($function, $function_impl, $cacheable=true, $cache_attrs=null)
+ {
+ $this->_plugins['function'][$function] =
+ array($function_impl, null, null, false, $cacheable, $cache_attrs);
+
+ }
+
+ /**
+ * Unregisters custom function
+ *
+ * @param string $function name of template function
+ */
+ function unregister_function($function)
+ {
+ unset($this->_plugins['function'][$function]);
+ }
+
+ /**
+ * Registers object to be used in templates
+ *
+ * @param string $object name of template object
+ * @param object &$object_impl the referenced PHP object to register
+ * @param null|array $allowed list of allowed methods (empty = all)
+ * @param boolean $smarty_args smarty argument format, else traditional
+ * @param null|array $block_functs list of methods that are block format
+ */
+ function register_object($object, &$object_impl, $allowed = array(), $smarty_args = true, $block_methods = array())
+ {
+ settype($allowed, 'array');
+ settype($smarty_args, 'boolean');
+ $this->_reg_objects[$object] =
+ array(&$object_impl, $allowed, $smarty_args, $block_methods);
+ }
+
+ /**
+ * Unregisters object
+ *
+ * @param string $object name of template object
+ */
+ function unregister_object($object)
+ {
+ unset($this->_reg_objects[$object]);
+ }
+
+
+ /**
+ * Registers block function to be used in templates
+ *
+ * @param string $block name of template block
+ * @param string $block_impl PHP function to register
+ */
+ function register_block($block, $block_impl, $cacheable=true, $cache_attrs=null)
+ {
+ $this->_plugins['block'][$block] =
+ array($block_impl, null, null, false, $cacheable, $cache_attrs);
+ }
+
+ /**
+ * Unregisters block function
+ *
+ * @param string $block name of template function
+ */
+ function unregister_block($block)
+ {
+ unset($this->_plugins['block'][$block]);
+ }
+
+ /**
+ * Registers compiler function
+ *
+ * @param string $function name of template function
+ * @param string $function_impl name of PHP function to register
+ */
+ function register_compiler_function($function, $function_impl, $cacheable=true)
+ {
+ $this->_plugins['compiler'][$function] =
+ array($function_impl, null, null, false, $cacheable);
+ }
+
+ /**
+ * Unregisters compiler function
+ *
+ * @param string $function name of template function
+ */
+ function unregister_compiler_function($function)
+ {
+ unset($this->_plugins['compiler'][$function]);
+ }
+
+ /**
+ * Registers modifier to be used in templates
+ *
+ * @param string $modifier name of template modifier
+ * @param string $modifier_impl name of PHP function to register
+ */
+ function register_modifier($modifier, $modifier_impl)
+ {
+ $this->_plugins['modifier'][$modifier] =
+ array($modifier_impl, null, null, false);
+ }
+
+ /**
+ * Unregisters modifier
+ *
+ * @param string $modifier name of template modifier
+ */
+ function unregister_modifier($modifier)
+ {
+ unset($this->_plugins['modifier'][$modifier]);
+ }
+
+ /**
+ * Registers a resource to fetch a template
+ *
+ * @param string $type name of resource
+ * @param array $functions array of functions to handle resource
+ */
+ function register_resource($type, $functions)
+ {
+ if (count($functions)==4) {
+ $this->_plugins['resource'][$type] =
+ array($functions, false);
+
+ } elseif (count($functions)==5) {
+ $this->_plugins['resource'][$type] =
+ array(array(array(&$functions[0], $functions[1])
+ ,array(&$functions[0], $functions[2])
+ ,array(&$functions[0], $functions[3])
+ ,array(&$functions[0], $functions[4]))
+ ,false);
+
+ } else {
+ $this->trigger_error("malformed function-list for '$type' in register_resource");
+
+ }
+ }
+
+ /**
+ * Unregisters a resource
+ *
+ * @param string $type name of resource
+ */
+ function unregister_resource($type)
+ {
+ unset($this->_plugins['resource'][$type]);
+ }
+
+ /**
+ * Registers a prefilter function to apply
+ * to a template before compiling
+ *
+ * @param string $function name of PHP function to register
+ */
+ function register_prefilter($function)
+ {
+ $_name = (is_array($function)) ? $function[1] : $function;
+ $this->_plugins['prefilter'][$_name]
+ = array($function, null, null, false);
+ }
+
+ /**
+ * Unregisters a prefilter function
+ *
+ * @param string $function name of PHP function
+ */
+ function unregister_prefilter($function)
+ {
+ unset($this->_plugins['prefilter'][$function]);
+ }
+
+ /**
+ * Registers a postfilter function to apply
+ * to a compiled template after compilation
+ *
+ * @param string $function name of PHP function to register
+ */
+ function register_postfilter($function)
+ {
+ $_name = (is_array($function)) ? $function[1] : $function;
+ $this->_plugins['postfilter'][$_name]
+ = array($function, null, null, false);
+ }
+
+ /**
+ * Unregisters a postfilter function
+ *
+ * @param string $function name of PHP function
+ */
+ function unregister_postfilter($function)
+ {
+ unset($this->_plugins['postfilter'][$function]);
+ }
+
+ /**
+ * Registers an output filter function to apply
+ * to a template output
+ *
+ * @param string $function name of PHP function
+ */
+ function register_outputfilter($function)
+ {
+ $_name = (is_array($function)) ? $function[1] : $function;
+ $this->_plugins['outputfilter'][$_name]
+ = array($function, null, null, false);
+ }
+
+ /**
+ * Unregisters an outputfilter function
+ *
+ * @param string $function name of PHP function
+ */
+ function unregister_outputfilter($function)
+ {
+ unset($this->_plugins['outputfilter'][$function]);
+ }
+
+ /**
+ * load a filter of specified type and name
+ *
+ * @param string $type filter type
+ * @param string $name filter name
+ */
+ function load_filter($type, $name)
+ {
+ switch ($type) {
+ case 'output':
+ $_params = array('plugins' => array(array($type . 'filter', $name, null, null, false)));
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.load_plugins.php');
+ smarty_core_load_plugins($_params, $this);
+ break;
+
+ case 'pre':
+ case 'post':
+ if (!isset($this->_plugins[$type . 'filter'][$name]))
+ $this->_plugins[$type . 'filter'][$name] = false;
+ break;
+ }
+ }
+
+ /**
+ * clear cached content for the given template and cache id
+ *
+ * @param string $tpl_file name of template file
+ * @param string $cache_id name of cache_id
+ * @param string $compile_id name of compile_id
+ * @param string $exp_time expiration time
+ * @return boolean
+ */
+ function clear_cache($tpl_file = null, $cache_id = null, $compile_id = null, $exp_time = null)
+ {
+
+ if (!isset($compile_id))
+ $compile_id = $this->compile_id;
+
+ if (!isset($tpl_file))
+ $compile_id = null;
+
+ $_auto_id = $this->_get_auto_id($cache_id, $compile_id);
+
+ if (!empty($this->cache_handler_func)) {
+ return call_user_func_array($this->cache_handler_func,
+ array('clear', &$this, &$dummy, $tpl_file, $cache_id, $compile_id, $exp_time));
+ } else {
+ $_params = array('auto_base' => $this->cache_dir,
+ 'auto_source' => $tpl_file,
+ 'auto_id' => $_auto_id,
+ 'exp_time' => $exp_time);
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.rm_auto.php');
+ return smarty_core_rm_auto($_params, $this);
+ }
+
+ }
+
+
+ /**
+ * clear the entire contents of cache (all templates)
+ *
+ * @param string $exp_time expire time
+ * @return boolean results of {@link smarty_core_rm_auto()}
+ */
+ function clear_all_cache($exp_time = null)
+ {
+ return $this->clear_cache(null, null, null, $exp_time);
+ }
+
+
+ /**
+ * test to see if valid cache exists for this template
+ *
+ * @param string $tpl_file name of template file
+ * @param string $cache_id
+ * @param string $compile_id
+ * @return string|false results of {@link _read_cache_file()}
+ */
+ function is_cached($tpl_file, $cache_id = null, $compile_id = null)
+ {
+ if (!$this->caching)
+ return false;
+
+ if (!isset($compile_id))
+ $compile_id = $this->compile_id;
+
+ $_params = array(
+ 'tpl_file' => $tpl_file,
+ 'cache_id' => $cache_id,
+ 'compile_id' => $compile_id
+ );
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.read_cache_file.php');
+ return smarty_core_read_cache_file($_params, $this);
+ }
+
+
+ /**
+ * clear all the assigned template variables.
+ *
+ */
+ function clear_all_assign()
+ {
+ $this->_tpl_vars = array();
+ }
+
+ /**
+ * clears compiled version of specified template resource,
+ * or all compiled template files if one is not specified.
+ * This function is for advanced use only, not normally needed.
+ *
+ * @param string $tpl_file
+ * @param string $compile_id
+ * @param string $exp_time
+ * @return boolean results of {@link smarty_core_rm_auto()}
+ */
+ function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_time = null)
+ {
+ if (!isset($compile_id)) {
+ $compile_id = $this->compile_id;
+ }
+ $_params = array('auto_base' => $this->compile_dir,
+ 'auto_source' => $tpl_file,
+ 'auto_id' => $compile_id,
+ 'exp_time' => $exp_time,
+ 'extensions' => array('.inc', '.php'));
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.rm_auto.php');
+ return smarty_core_rm_auto($_params, $this);
+ }
+
+ /**
+ * Checks whether requested template exists.
+ *
+ * @param string $tpl_file
+ * @return boolean
+ */
+ function template_exists($tpl_file)
+ {
+ $_params = array('resource_name' => $tpl_file, 'quiet'=>true, 'get_source'=>false);
+ return $this->_fetch_resource_info($_params);
+ }
+
+ /**
+ * Returns an array containing template variables
+ *
+ * @param string $name
+ * @param string $type
+ * @return array
+ */
+ function &get_template_vars($name=null)
+ {
+ if(!isset($name)) {
+ return $this->_tpl_vars;
+ }
+ if(isset($this->_tpl_vars[$name])) {
+ return $this->_tpl_vars[$name];
+ }
+ }
+
+ /**
+ * Returns an array containing config variables
+ *
+ * @param string $name
+ * @param string $type
+ * @return array
+ */
+ function &get_config_vars($name=null)
+ {
+ if(!isset($name) && is_array($this->_config[0])) {
+ return $this->_config[0]['vars'];
+ } else if(isset($this->_config[0]['vars'][$name])) {
+ return $this->_config[0]['vars'][$name];
+ }
+ }
+
+ /**
+ * trigger Smarty error
+ *
+ * @param string $error_msg
+ * @param integer $error_type
+ */
+ function trigger_error($error_msg, $error_type = E_USER_WARNING)
+ {
+ trigger_error("Smarty error: $error_msg", $error_type);
+ }
+
+
+ /**
+ * executes & displays the template results
+ *
+ * @param string $resource_name
+ * @param string $cache_id
+ * @param string $compile_id
+ */
+ function display($resource_name, $cache_id = null, $compile_id = null)
+ {
+ $this->fetch($resource_name, $cache_id, $compile_id, true);
+ }
+
+ /**
+ * executes & returns or displays the template results
+ *
+ * @param string $resource_name
+ * @param string $cache_id
+ * @param string $compile_id
+ * @param boolean $display
+ */
+ function fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)
+ {
+ static $_cache_info = array();
+
+ $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(isset($this->error_reporting)
+ ? $this->error_reporting : error_reporting() & ~E_NOTICE);
+
+ if (!$this->debugging && $this->debugging_ctrl == 'URL') {
+ $_query_string = $this->request_use_auto_globals ? $_SERVER['QUERY_STRING'] : $GLOBALS['HTTP_SERVER_VARS']['QUERY_STRING'];
+ if (@strstr($_query_string, $this->_smarty_debug_id)) {
+ if (@strstr($_query_string, $this->_smarty_debug_id . '=on')) {
+ // enable debugging for this browser session
+ @setcookie('SMARTY_DEBUG', true);
+ $this->debugging = true;
+ } elseif (@strstr($_query_string, $this->_smarty_debug_id . '=off')) {
+ // disable debugging for this browser session
+ @setcookie('SMARTY_DEBUG', false);
+ $this->debugging = false;
+ } else {
+ // enable debugging for this page
+ $this->debugging = true;
+ }
+ } else {
+ $_cookie_var = $this->request_use_auto_globals ? $_COOKIE['SMARTY_DEBUG'] : $GLOBALS['HTTP_COOKIE_VARS']['SMARTY_DEBUG'];
+ $this->debugging = $_cookie_var ? true : false;
+ }
+ }
+
+ if ($this->debugging) {
+ // capture time for debugging info
+ $_params = array();
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php');
+ $_debug_start_time = smarty_core_get_microtime($_params, $this);
+ $this->_smarty_debug_info[] = array('type' => 'template',
+ 'filename' => $resource_name,
+ 'depth' => 0);
+ $_included_tpls_idx = count($this->_smarty_debug_info) - 1;
+ }
+
+ if (!isset($compile_id)) {
+ $compile_id = $this->compile_id;
+ }
+
+ $this->_compile_id = $compile_id;
+ $this->_inclusion_depth = 0;
+
+ if ($this->caching) {
+ // save old cache_info, initialize cache_info
+ array_push($_cache_info, $this->_cache_info);
+ $this->_cache_info = array();
+ $_params = array(
+ 'tpl_file' => $resource_name,
+ 'cache_id' => $cache_id,
+ 'compile_id' => $compile_id,
+ 'results' => null
+ );
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.read_cache_file.php');
+ if (smarty_core_read_cache_file($_params, $this)) {
+ $_smarty_results = $_params['results'];
+ if (@count($this->_cache_info['insert_tags'])) {
+ $_params = array('plugins' => $this->_cache_info['insert_tags']);
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.load_plugins.php');
+ smarty_core_load_plugins($_params, $this);
+ $_params = array('results' => $_smarty_results);
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.process_cached_inserts.php');
+ $_smarty_results = smarty_core_process_cached_inserts($_params, $this);
+ }
+ if (@count($this->_cache_info['cache_serials'])) {
+ $_params = array('results' => $_smarty_results);
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.process_compiled_include.php');
+ $_smarty_results = smarty_core_process_compiled_include($_params, $this);
+ }
+
+
+ if ($display) {
+ if ($this->debugging)
+ {
+ // capture time for debugging info
+ $_params = array();
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php');
+ $this->_smarty_debug_info[$_included_tpls_idx]['exec_time'] = smarty_core_get_microtime($_params, $this) - $_debug_start_time;
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.display_debug_console.php');
+ $_smarty_results .= smarty_core_display_debug_console($_params, $this);
+ }
+ if ($this->cache_modified_check) {
+ $_server_vars = ($this->request_use_auto_globals) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS'];
+ $_last_modified_date = @substr($_server_vars['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_server_vars['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3);
+ $_gmt_mtime = gmdate('D, d M Y H:i:s', $this->_cache_info['timestamp']).' GMT';
+ if (@count($this->_cache_info['insert_tags']) == 0
+ && !$this->_cache_serials
+ && $_gmt_mtime == $_last_modified_date) {
+ if (php_sapi_name()=='cgi')
+ header('Status: 304 Not Modified');
+ else
+ header('HTTP/1.1 304 Not Modified');
+
+ } else {
+ header('Last-Modified: '.$_gmt_mtime);
+ echo $_smarty_results;
+ }
+ } else {
+ echo $_smarty_results;
+ }
+ error_reporting($_smarty_old_error_level);
+ // restore initial cache_info
+ $this->_cache_info = array_pop($_cache_info);
+ return true;
+ } else {
+ error_reporting($_smarty_old_error_level);
+ // restore initial cache_info
+ $this->_cache_info = array_pop($_cache_info);
+ return $_smarty_results;
+ }
+ } else {
+ $this->_cache_info['template'][$resource_name] = true;
+ if ($this->cache_modified_check && $display) {
+ header('Last-Modified: '.gmdate('D, d M Y H:i:s', time()).' GMT');
+ }
+ }
+ }
+
+ // load filters that are marked as autoload
+ if (count($this->autoload_filters)) {
+ foreach ($this->autoload_filters as $_filter_type => $_filters) {
+ foreach ($_filters as $_filter) {
+ $this->load_filter($_filter_type, $_filter);
+ }
+ }
+ }
+
+ $_smarty_compile_path = $this->_get_compile_path($resource_name);
+
+ // if we just need to display the results, don't perform output
+ // buffering - for speed
+ $_cache_including = $this->_cache_including;
+ $this->_cache_including = false;
+ if ($display && !$this->caching && count($this->_plugins['outputfilter']) == 0) {
+ if ($this->_is_compiled($resource_name, $_smarty_compile_path)
+ || $this->_compile_resource($resource_name, $_smarty_compile_path))
+ {
+ include($_smarty_compile_path);
+ }
+ } else {
+ ob_start();
+ if ($this->_is_compiled($resource_name, $_smarty_compile_path)
+ || $this->_compile_resource($resource_name, $_smarty_compile_path))
+ {
+ include($_smarty_compile_path);
+ }
+ $_smarty_results = ob_get_contents();
+ ob_end_clean();
+
+ foreach ((array)$this->_plugins['outputfilter'] as $_output_filter) {
+ $_smarty_results = call_user_func_array($_output_filter[0], array($_smarty_results, &$this));
+ }
+ }
+
+ if ($this->caching) {
+ $_params = array('tpl_file' => $resource_name,
+ 'cache_id' => $cache_id,
+ 'compile_id' => $compile_id,
+ 'results' => $_smarty_results);
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_cache_file.php');
+ smarty_core_write_cache_file($_params, $this);
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.process_cached_inserts.php');
+ $_smarty_results = smarty_core_process_cached_inserts($_params, $this);
+
+ if ($this->_cache_serials) {
+ // strip nocache-tags from output
+ $_smarty_results = preg_replace('!(\{/?nocache\:[0-9a-f]{32}#\d+\})!s'
+ ,''
+ ,$_smarty_results);
+ }
+ // restore initial cache_info
+ $this->_cache_info = array_pop($_cache_info);
+ }
+ $this->_cache_including = $_cache_including;
+
+ if ($display) {
+ if (isset($_smarty_results)) { echo $_smarty_results; }
+ if ($this->debugging) {
+ // capture time for debugging info
+ $_params = array();
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php');
+ $this->_smarty_debug_info[$_included_tpls_idx]['exec_time'] = (smarty_core_get_microtime($_params, $this) - $_debug_start_time);
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.display_debug_console.php');
+ echo smarty_core_display_debug_console($_params, $this);
+ }
+ error_reporting($_smarty_old_error_level);
+ return;
+ } else {
+ error_reporting($_smarty_old_error_level);
+ if (isset($_smarty_results)) { return $_smarty_results; }
+ }
+ }
+
+ /**
+ * load configuration values
+ *
+ * @param string $file
+ * @param string $section
+ * @param string $scope
+ */
+ function config_load($file, $section = null, $scope = 'global')
+ {
+ require_once($this->_get_plugin_filepath('function', 'config_load'));
+ smarty_function_config_load(array('file' => $file, 'section' => $section, 'scope' => $scope), $this);
+ }
+
+ /**
+ * return a reference to a registered object
+ *
+ * @param string $name
+ * @return object
+ */
+ function &get_registered_object($name) {
+ if (!isset($this->_reg_objects[$name]))
+ $this->_trigger_fatal_error("'$name' is not a registered object");
+
+ if (!is_object($this->_reg_objects[$name][0]))
+ $this->_trigger_fatal_error("registered '$name' is not an object");
+
+ return $this->_reg_objects[$name][0];
+ }
+
+ /**
+ * clear configuration values
+ *
+ * @param string $var
+ */
+ function clear_config($var = null)
+ {
+ if(!isset($var)) {
+ // clear all values
+ $this->_config = array(array('vars' => array(),
+ 'files' => array()));
+ } else {
+ unset($this->_config[0]['vars'][$var]);
+ }
+ }
+
+ /**
+ * get filepath of requested plugin
+ *
+ * @param string $type
+ * @param string $name
+ * @return string|false
+ */
+ function _get_plugin_filepath($type, $name)
+ {
+ $_params = array('type' => $type, 'name' => $name);
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.assemble_plugin_filepath.php');
+ return smarty_core_assemble_plugin_filepath($_params, $this);
+ }
+
+ /**
+ * test if resource needs compiling
+ *
+ * @param string $resource_name
+ * @param string $compile_path
+ * @return boolean
+ */
+ function _is_compiled($resource_name, $compile_path)
+ {
+ if (!$this->force_compile && file_exists($compile_path)) {
+ if (!$this->compile_check) {
+ // no need to check compiled file
+ return true;
+ } else {
+ // get file source and timestamp
+ $_params = array('resource_name' => $resource_name, 'get_source'=>false);
+ if (!$this->_fetch_resource_info($_params)) {
+ return false;
+ }
+ if ($_params['resource_timestamp'] <= filemtime($compile_path)) {
+ // template not expired, no recompile
+ return true;
+ } else {
+ // compile template
+ return false;
+ }
+ }
+ } else {
+ // compiled template does not exist, or forced compile
+ return false;
+ }
+ }
+
+ /**
+ * compile the template
+ *
+ * @param string $resource_name
+ * @param string $compile_path
+ * @return boolean
+ */
+ function _compile_resource($resource_name, $compile_path)
+ {
+
+ $_params = array('resource_name' => $resource_name);
+ if (!$this->_fetch_resource_info($_params)) {
+ return false;
+ }
+
+ $_source_content = $_params['source_content'];
+ $_cache_include = substr($compile_path, 0, -4).'.inc';
+
+ if ($this->_compile_source($resource_name, $_source_content, $_compiled_content, $_cache_include)) {
+ // if a _cache_serial was set, we also have to write an include-file:
+ if ($this->_cache_include_info) {
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_compiled_include.php');
+ smarty_core_write_compiled_include(array_merge($this->_cache_include_info, array('compiled_content'=>$_compiled_content)), $this);
+ }
+
+ $_params = array('compile_path'=>$compile_path, 'compiled_content' => $_compiled_content);
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_compiled_resource.php');
+ smarty_core_write_compiled_resource($_params, $this);
+
+ return true;
+ } else {
+ return false;
+ }
+
+ }
+
+ /**
+ * compile the given source
+ *
+ * @param string $resource_name
+ * @param string $source_content
+ * @param string $compiled_content
+ * @return boolean
+ */
+ function _compile_source($resource_name, &$source_content, &$compiled_content, $cache_include_path=null)
+ {
+ if (file_exists(SMARTY_DIR . $this->compiler_file)) {
+ require_once(SMARTY_DIR . $this->compiler_file);
+ } else {
+ // use include_path
+ require_once($this->compiler_file);
+ }
+
+
+ $smarty_compiler = new $this->compiler_class;
+
+ $smarty_compiler->template_dir = $this->template_dir;
+ $smarty_compiler->compile_dir = $this->compile_dir;
+ $smarty_compiler->plugins_dir = $this->plugins_dir;
+ $smarty_compiler->config_dir = $this->config_dir;
+ $smarty_compiler->force_compile = $this->force_compile;
+ $smarty_compiler->caching = $this->caching;
+ $smarty_compiler->php_handling = $this->php_handling;
+ $smarty_compiler->left_delimiter = $this->left_delimiter;
+ $smarty_compiler->right_delimiter = $this->right_delimiter;
+ $smarty_compiler->_version = $this->_version;
+ $smarty_compiler->security = $this->security;
+ $smarty_compiler->secure_dir = $this->secure_dir;
+ $smarty_compiler->security_settings = $this->security_settings;
+ $smarty_compiler->trusted_dir = $this->trusted_dir;
+ $smarty_compiler->use_sub_dirs = $this->use_sub_dirs;
+ $smarty_compiler->_reg_objects = &$this->_reg_objects;
+ $smarty_compiler->_plugins = &$this->_plugins;
+ $smarty_compiler->_tpl_vars = &$this->_tpl_vars;
+ $smarty_compiler->default_modifiers = $this->default_modifiers;
+ $smarty_compiler->compile_id = $this->_compile_id;
+ $smarty_compiler->_config = $this->_config;
+ $smarty_compiler->request_use_auto_globals = $this->request_use_auto_globals;
+
+ $smarty_compiler->_cache_serial = null;
+ $smarty_compiler->_cache_include = $cache_include_path;
+
+
+ $_results = $smarty_compiler->_compile_file($resource_name, $source_content, $compiled_content);
+
+ if ($smarty_compiler->_cache_serial) {
+ $this->_cache_include_info = array(
+ 'cache_serial'=>$smarty_compiler->_cache_serial
+ ,'plugins_code'=>$smarty_compiler->_plugins_code
+ ,'include_file_path' => $cache_include_path);
+
+ } else {
+ $this->_cache_include_info = null;
+
+ }
+
+ return $_results;
+ }
+
+ /**
+ * Get the compile path for this resource
+ *
+ * @param string $resource_name
+ * @return string results of {@link _get_auto_filename()}
+ */
+ function _get_compile_path($resource_name)
+ {
+ return $this->_get_auto_filename($this->compile_dir, $resource_name,
+ $this->_compile_id) . '.php';
+ }
+
+ /**
+ * fetch the template info. Gets timestamp, and source
+ * if get_source is true
+ *
+ * sets $source_content to the source of the template, and
+ * $resource_timestamp to its time stamp
+ * @param string $resource_name
+ * @param string $source_content
+ * @param integer $resource_timestamp
+ * @param boolean $get_source
+ * @param boolean $quiet
+ * @return boolean
+ */
+
+ function _fetch_resource_info(&$params)
+ {
+ if(!isset($params['get_source'])) { $params['get_source'] = true; }
+ if(!isset($params['quiet'])) { $params['quiet'] = false; }
+
+ $_return = false;
+ $_params = array('resource_name' => $params['resource_name']) ;
+ if (isset($params['resource_base_path']))
+ $_params['resource_base_path'] = $params['resource_base_path'];
+ else
+ $_params['resource_base_path'] = $this->template_dir;
+
+ if ($this->_parse_resource_name($_params)) {
+ $_resource_type = $_params['resource_type'];
+ $_resource_name = $_params['resource_name'];
+ switch ($_resource_type) {
+ case 'file':
+ if ($params['get_source']) {
+ $params['source_content'] = $this->_read_file($_resource_name);
+ }
+ $params['resource_timestamp'] = filemtime($_resource_name);
+ $_return = is_file($_resource_name);
+ break;
+
+ default:
+ // call resource functions to fetch the template source and timestamp
+ if ($params['get_source']) {
+ $_source_return = isset($this->_plugins['resource'][$_resource_type]) &&
+ call_user_func_array($this->_plugins['resource'][$_resource_type][0][0],
+ array($_resource_name, &$params['source_content'], &$this));
+ } else {
+ $_source_return = true;
+ }
+
+ $_timestamp_return = isset($this->_plugins['resource'][$_resource_type]) &&
+ call_user_func_array($this->_plugins['resource'][$_resource_type][0][1],
+ array($_resource_name, &$params['resource_timestamp'], &$this));
+
+ $_return = $_source_return && $_timestamp_return;
+ break;
+ }
+ }
+
+ if (!$_return) {
+ // see if we can get a template with the default template handler
+ if (!empty($this->default_template_handler_func)) {
+ if (!is_callable($this->default_template_handler_func)) {
+ $this->trigger_error("default template handler function \"$this->default_template_handler_func\" doesn't exist.");
+ } else {
+ $_return = call_user_func_array(
+ $this->default_template_handler_func,
+ array($_params['resource_type'], $_params['resource_name'], &$params['source_content'], &$params['resource_timestamp'], &$this));
+ }
+ }
+ }
+
+ if (!$_return) {
+ if (!$params['quiet']) {
+ $this->trigger_error('unable to read resource: "' . $params['resource_name'] . '"');
+ }
+ } else if ($_return && $this->security) {
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.is_secure.php');
+ if (!smarty_core_is_secure($_params, $this)) {
+ if (!$params['quiet'])
+ $this->trigger_error('(secure mode) accessing "' . $params['resource_name'] . '" is not allowed');
+ $params['source_content'] = null;
+ $params['resource_timestamp'] = null;
+ return false;
+ }
+ }
+ return $_return;
+ }
+
+
+ /**
+ * parse out the type and name from the resource
+ *
+ * @param string $resource_base_path
+ * @param string $resource_name
+ * @param string $resource_type
+ * @param string $resource_name
+ * @return boolean
+ */
+
+ function _parse_resource_name(&$params)
+ {
+
+ // split tpl_path by the first colon
+ $_resource_name_parts = explode(':', $params['resource_name'], 2);
+
+ if (count($_resource_name_parts) == 1) {
+ // no resource type given
+ $params['resource_type'] = $this->default_resource_type;
+ $params['resource_name'] = $_resource_name_parts[0];
+ } else {
+ if(strlen($_resource_name_parts[0]) == 1) {
+ // 1 char is not resource type, but part of filepath
+ $params['resource_type'] = $this->default_resource_type;
+ $params['resource_name'] = $params['resource_name'];
+ } else {
+ $params['resource_type'] = $_resource_name_parts[0];
+ $params['resource_name'] = $_resource_name_parts[1];
+ }
+ }
+
+ if ($params['resource_type'] == 'file') {
+ if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $params['resource_name'])) {
+ // relative pathname to $params['resource_base_path']
+ // use the first directory where the file is found
+ foreach ((array)$params['resource_base_path'] as $_curr_path) {
+ $_fullpath = $_curr_path . DIRECTORY_SEPARATOR . $params['resource_name'];
+ if (file_exists($_fullpath) && is_file($_fullpath)) {
+ $params['resource_name'] = $_fullpath;
+ return true;
+ }
+ // didn't find the file, try include_path
+ $_params = array('file_path' => $_fullpath);
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_include_path.php');
+ if(smarty_core_get_include_path($_params, $this)) {
+ $params['resource_name'] = $_params['new_file_path'];
+ return true;
+ }
+ }
+ return false;
+ } else {
+ /* absolute path */
+ return file_exists($params['resource_name']);
+ }
+ } elseif (empty($this->_plugins['resource'][$params['resource_type']])) {
+ $_params = array('type' => $params['resource_type']);
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.load_resource_plugin.php');
+ smarty_core_load_resource_plugin($_params, $this);
+ }
+
+ return true;
+ }
+
+
+ /**
+ * Handle modifiers
+ *
+ * @param string|null $modifier_name
+ * @param array|null $map_array
+ * @return string result of modifiers
+ */
+ function _run_mod_handler()
+ {
+ $_args = func_get_args();
+ list($_modifier_name, $_map_array) = array_splice($_args, 0, 2);
+ list($_func_name, $_tpl_file, $_tpl_line) =
+ $this->_plugins['modifier'][$_modifier_name];
+
+ $_var = $_args[0];
+ foreach ($_var as $_key => $_val) {
+ $_args[0] = $_val;
+ $_var[$_key] = call_user_func_array($_func_name, $_args);
+ }
+ return $_var;
+ }
+
+ /**
+ * Remove starting and ending quotes from the string
+ *
+ * @param string $string
+ * @return string
+ */
+ function _dequote($string)
+ {
+ if (($string{0} == "'" || $string{0} == '"') &&
+ $string{strlen($string)-1} == $string{0})
+ return substr($string, 1, -1);
+ else
+ return $string;
+ }
+
+
+ /**
+ * read in a file from line $start for $lines.
+ * read the entire file if $start and $lines are null.
+ *
+ * @param string $filename
+ * @param integer $start
+ * @param integer $lines
+ * @return string
+ */
+ function _read_file($filename)
+ {
+ if ( file_exists($filename) && ($fd = @fopen($filename, 'rb')) ) {
+ $contents = ($size = filesize($filename)) ? fread($fd, $size) : '';
+ fclose($fd);
+ return $contents;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * get a concrete filename for automagically created content
+ *
+ * @param string $auto_base
+ * @param string $auto_source
+ * @param string $auto_id
+ * @return string
+ * @staticvar string|null
+ * @staticvar string|null
+ */
+ function _get_auto_filename($auto_base, $auto_source = null, $auto_id = null)
+ {
+ $_compile_dir_sep = $this->use_sub_dirs ? DIRECTORY_SEPARATOR : '^';
+ $_return = $auto_base . DIRECTORY_SEPARATOR;
+
+ if(isset($auto_id)) {
+ // make auto_id safe for directory names
+ $auto_id = str_replace('%7C',$_compile_dir_sep,(urlencode($auto_id)));
+ // split into separate directories
+ $_return .= $auto_id . $_compile_dir_sep;
+ }
+
+ if(isset($auto_source)) {
+ // make source name safe for filename
+ $_filename = urlencode(basename($auto_source));
+ $_crc32 = sprintf('%08X', crc32($auto_source));
+ // prepend %% to avoid name conflicts with
+ // with $params['auto_id'] names
+ $_crc32 = substr($_crc32, 0, 2) . $_compile_dir_sep .
+ substr($_crc32, 0, 3) . $_compile_dir_sep . $_crc32;
+ $_return .= '%%' . $_crc32 . '%%' . $_filename;
+ }
+
+ return $_return;
+ }
+
+ /**
+ * unlink a file, possibly using expiration time
+ *
+ * @param string $resource
+ * @param integer $exp_time
+ */
+ function _unlink($resource, $exp_time = null)
+ {
+ if(isset($exp_time)) {
+ if(time() - @filemtime($resource) >= $exp_time) {
+ return @unlink($resource);
+ }
+ } else {
+ return @unlink($resource);
+ }
+ }
+
+ /**
+ * returns an auto_id for auto-file-functions
+ *
+ * @param string $cache_id
+ * @param string $compile_id
+ * @return string|null
+ */
+ function _get_auto_id($cache_id=null, $compile_id=null) {
+ if (isset($cache_id))
+ return (isset($compile_id)) ? $cache_id . '|' . $compile_id : $cache_id;
+ elseif(isset($compile_id))
+ return $compile_id;
+ else
+ return null;
+ }
+
+ /**
+ * trigger Smarty plugin error
+ *
+ * @param string $error_msg
+ * @param string $tpl_file
+ * @param integer $tpl_line
+ * @param string $file
+ * @param integer $line
+ * @param integer $error_type
+ */
+ function _trigger_fatal_error($error_msg, $tpl_file = null, $tpl_line = null,
+ $file = null, $line = null, $error_type = E_USER_ERROR)
+ {
+ if(isset($file) && isset($line)) {
+ $info = ' ('.basename($file).", line $line)";
+ } else {
+ $info = '';
+ }
+ if (isset($tpl_line) && isset($tpl_file)) {
+ $this->trigger_error('[in ' . $tpl_file . ' line ' . $tpl_line . "]: $error_msg$info", $error_type);
+ } else {
+ $this->trigger_error($error_msg . $info, $error_type);
+ }
+ }
+
+
+ /**
+ * callback function for preg_replace, to call a non-cacheable block
+ * @return string
+ */
+ function _process_compiled_include_callback($match) {
+ $_func = '_smarty_tplfunc_'.$match[2].'_'.$match[3];
+ ob_start();
+ $_func($this);
+ $_ret = ob_get_contents();
+ ob_end_clean();
+ return $_ret;
+ }
+
+
+ /**
+ * called for included templates
+ *
+ * @param string $_smarty_include_tpl_file
+ * @param string $_smarty_include_vars
+ */
+
+ // $_smarty_include_tpl_file, $_smarty_include_vars
+
+ function _smarty_include($params)
+ {
+ if ($this->debugging) {
+ $_params = array();
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php');
+ $debug_start_time = smarty_core_get_microtime($_params, $this);
+ $this->_smarty_debug_info[] = array('type' => 'template',
+ 'filename' => $params['smarty_include_tpl_file'],
+ 'depth' => ++$this->_inclusion_depth);
+ $included_tpls_idx = count($this->_smarty_debug_info) - 1;
+ }
+
+ $this->_tpl_vars = array_merge($this->_tpl_vars, $params['smarty_include_vars']);
+
+ // config vars are treated as local, so push a copy of the
+ // current ones onto the front of the stack
+ array_unshift($this->_config, $this->_config[0]);
+
+ $_smarty_compile_path = $this->_get_compile_path($params['smarty_include_tpl_file']);
+
+
+ if ($this->_is_compiled($params['smarty_include_tpl_file'], $_smarty_compile_path)
+ || $this->_compile_resource($params['smarty_include_tpl_file'], $_smarty_compile_path))
+ {
+ include($_smarty_compile_path);
+ }
+
+ // pop the local vars off the front of the stack
+ array_shift($this->_config);
+
+ $this->_inclusion_depth--;
+
+ if ($this->debugging) {
+ // capture time for debugging info
+ $_params = array();
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php');
+ $this->_smarty_debug_info[$included_tpls_idx]['exec_time'] = smarty_core_get_microtime($_params, $this) - $debug_start_time;
+ }
+
+ if ($this->caching) {
+ $this->_cache_info['template'][$params['smarty_include_tpl_file']] = true;
+ }
+ }
+
+
+ /**
+ * get or set an array of cached attributes for function that is
+ * not cacheable
+ * @return array
+ */
+ function &_smarty_cache_attrs($cache_serial, $count) {
+ $_cache_attrs =& $this->_cache_info['cache_attrs'][$cache_serial][$count];
+
+ if ($this->_cache_including) {
+ /* return next set of cache_attrs */
+ $_return =& current($_cache_attrs);
+ next($_cache_attrs);
+ return $_return;
+
+ } else {
+ /* add a reference to a new set of cache_attrs */
+ $_cache_attrs[] = array();
+ return $_cache_attrs[count($_cache_attrs)-1];
+
+ }
+
+ }
+
+
+ /**
+ * wrapper for include() retaining $this
+ * @return mixed
+ */
+ function _include($filename, $once=false, $params=null)
+ {
+ if ($once) {
+ return include_once($filename);
+ } else {
+ return include($filename);
+ }
+ }
+
+
+ /**
+ * wrapper for eval() retaining $this
+ * @return mixed
+ */
+ function _eval($code, $params=null)
+ {
+ return eval($code);
+ }
+ /**#@-*/
+
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/Smarty.class.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/Smarty_Compiler.class.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/Smarty_Compiler.class.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/Smarty_Compiler.class.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,2259 @@
+<?php
+
+if (!defined('SMARTY_DIR')) {
+ exit();
+}
+/**
+ * Project: Smarty: the PHP compiling template engine
+ * File: Smarty_Compiler.class.php
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * @link http://smarty.php.net/
+ * @author Monte Ohrt <monte at ispi.net>
+ * @author Andrei Zmievski <andrei at php.net>
+ * @version 2.6.5-dev
+ * @copyright 2001-2004 ispi of Lincoln, Inc.
+ * @package Smarty
+ */
+
+/* $Id$ */
+
+/**
+ * Template compiling class
+ * @package Smarty
+ */
+class Smarty_Compiler extends Smarty {
+
+ // internal vars
+ /**#@+
+ * @access private
+ */
+ var $_folded_blocks = array(); // keeps folded template blocks
+ var $_current_file = null; // the current template being compiled
+ var $_current_line_no = 1; // line number for error messages
+ var $_capture_stack = array(); // keeps track of nested capture buffers
+ var $_plugin_info = array(); // keeps track of plugins to load
+ var $_init_smarty_vars = false;
+ var $_permitted_tokens = array('true','false','yes','no','on','off','null');
+ var $_db_qstr_regexp = null; // regexps are setup in the constructor
+ var $_si_qstr_regexp = null;
+ var $_qstr_regexp = null;
+ var $_func_regexp = null;
+ var $_var_bracket_regexp = null;
+ var $_dvar_guts_regexp = null;
+ var $_dvar_regexp = null;
+ var $_cvar_regexp = null;
+ var $_svar_regexp = null;
+ var $_avar_regexp = null;
+ var $_mod_regexp = null;
+ var $_var_regexp = null;
+ var $_parenth_param_regexp = null;
+ var $_func_call_regexp = null;
+ var $_obj_ext_regexp = null;
+ var $_obj_start_regexp = null;
+ var $_obj_params_regexp = null;
+ var $_obj_call_regexp = null;
+ var $_cacheable_state = 0;
+ var $_cache_attrs_count = 0;
+ var $_nocache_count = 0;
+ var $_cache_serial = null;
+ var $_cache_include = null;
+
+ var $_strip_depth = 0;
+ var $_additional_newline = "\n";
+
+ /**#@-*/
+ /**
+ * The class constructor.
+ */
+ function Smarty_Compiler()
+ {
+ // matches double quoted strings:
+ // "foobar"
+ // "foo\"bar"
+ $this->_db_qstr_regexp = '"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"';
+
+ // matches single quoted strings:
+ // 'foobar'
+ // 'foo\'bar'
+ $this->_si_qstr_regexp = '\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'';
+
+ // matches single or double quoted strings
+ $this->_qstr_regexp = '(?:' . $this->_db_qstr_regexp . '|' . $this->_si_qstr_regexp . ')';
+
+ // matches bracket portion of vars
+ // [0]
+ // [foo]
+ // [$bar]
+ $this->_var_bracket_regexp = '\[\$?[\w\.]+\]';
+
+ // matches numerical constants
+ // 30
+ // -12
+ // 13.22
+ $this->_num_const_regexp = '\-?\d+(?:\.\d+)?';
+
+ // matches $ vars (not objects):
+ // $foo
+ // $foo.bar
+ // $foo.bar.foobar
+ // $foo[0]
+ // $foo[$bar]
+ // $foo[5][blah]
+ // $foo[5].bar[$foobar][4]
+ $this->_dvar_math_regexp = '(?:[\+\*\/\%]|(?:-(?!>)))';
+ $this->_dvar_math_var_regexp = '[\$\w\.\+\-\*\/\%\d\>\[\]]';
+ $this->_dvar_guts_regexp = '\w+(?:' . $this->_var_bracket_regexp
+ . ')*(?:\.\$?\w+(?:' . $this->_var_bracket_regexp . ')*)*(?:' . $this->_dvar_math_regexp . '(?:' . $this->_num_const_regexp . '|' . $this->_dvar_math_var_regexp . ')*)?';
+ $this->_dvar_regexp = '\$' . $this->_dvar_guts_regexp;
+
+ // matches config vars:
+ // #foo#
+ // #foobar123_foo#
+ $this->_cvar_regexp = '\#\w+\#';
+
+ // matches section vars:
+ // %foo.bar%
+ $this->_svar_regexp = '\%\w+\.\w+\%';
+
+ // matches all valid variables (no quotes, no modifiers)
+ $this->_avar_regexp = '(?:' . $this->_dvar_regexp . '|'
+ . $this->_cvar_regexp . '|' . $this->_svar_regexp . ')';
+
+ // matches valid variable syntax:
+ // $foo
+ // $foo
+ // #foo#
+ // #foo#
+ // "text"
+ // "text"
+ $this->_var_regexp = '(?:' . $this->_avar_regexp . '|' . $this->_num_const_regexp . '|' . $this->_qstr_regexp . ')';
+
+ // matches valid object call (one level of object nesting allowed in parameters):
+ // $foo->bar
+ // $foo->bar()
+ // $foo->bar("text")
+ // $foo->bar($foo, $bar, "text")
+ // $foo->bar($foo, "foo")
+ // $foo->bar->foo()
+ // $foo->bar->foo->bar()
+ // $foo->bar($foo->bar)
+ // $foo->bar($foo->bar())
+ // $foo->bar($foo->bar($blah,$foo,44,"foo",$foo[0].bar))
+ $this->_obj_ext_regexp = '\->(?:\$?' . $this->_dvar_guts_regexp . ')';
+ $this->_obj_restricted_param_regexp = '(?:'
+ . $this->_var_regexp . '(?:' . $this->_obj_ext_regexp . '(?:\((?:' . $this->_var_regexp
+ . '(?:\s*,\s*' . $this->_var_regexp . ')*)?\))?)*)';
+ $this->_obj_single_param_regexp = '(?:\w+|' . $this->_obj_restricted_param_regexp . '(?:\s*,\s*(?:(?:\w+|'
+ . $this->_var_regexp . $this->_obj_restricted_param_regexp . ')))*)';
+ $this->_obj_params_regexp = '\((?:' . $this->_obj_single_param_regexp
+ . '(?:\s*,\s*' . $this->_obj_single_param_regexp . ')*)?\)';
+ $this->_obj_start_regexp = '(?:' . $this->_dvar_regexp . '(?:' . $this->_obj_ext_regexp . ')+)';
+ $this->_obj_call_regexp = '(?:' . $this->_obj_start_regexp . '(?:' . $this->_obj_params_regexp . ')?(?:' . $this->_dvar_math_regexp . '(?:' . $this->_num_const_regexp . '|' . $this->_dvar_math_var_regexp . ')*)?)';
+
+ // matches valid modifier syntax:
+ // |foo
+ // |@foo
+ // |foo:"bar"
+ // |foo:$bar
+ // |foo:"bar":$foobar
+ // |foo|bar
+ // |foo:$foo->bar
+ $this->_mod_regexp = '(?:\|@?\w+(?::(?>-?\w+|'
+ . $this->_obj_call_regexp . '|' . $this->_avar_regexp . '|' . $this->_qstr_regexp .'))*)';
+
+ // matches valid function name:
+ // foo123
+ // _foo_bar
+ $this->_func_regexp = '[a-zA-Z_]\w*';
+
+ // matches valid registered object:
+ // foo->bar
+ $this->_reg_obj_regexp = '[a-zA-Z_]\w*->[a-zA-Z_]\w*';
+
+ // matches valid parameter values:
+ // true
+ // $foo
+ // $foo|bar
+ // #foo#
+ // #foo#|bar
+ // "text"
+ // "text"|bar
+ // $foo->bar
+ $this->_param_regexp = '(?:\s*(?:' . $this->_obj_call_regexp . '|'
+ . $this->_var_regexp . '|\w+)(?>' . $this->_mod_regexp . '*)\s*)';
+
+ // matches valid parenthesised function parameters:
+ //
+ // "text"
+ // $foo, $bar, "text"
+ // $foo|bar, "foo"|bar, $foo->bar($foo)|bar
+ $this->_parenth_param_regexp = '(?:\((?:\w+|'
+ . $this->_param_regexp . '(?:\s*,\s*(?:(?:\w+|'
+ . $this->_param_regexp . ')))*)?\))';
+
+ // matches valid function call:
+ // foo()
+ // foo_bar($foo)
+ // _foo_bar($foo,"bar")
+ // foo123($foo,$foo->bar(),"foo")
+ $this->_func_call_regexp = '(?:' . $this->_func_regexp . '\s*(?:'
+ . $this->_parenth_param_regexp . '))';
+ }
+
+ /**
+ * compile a resource
+ *
+ * sets $compiled_content to the compiled source
+ * @param string $resource_name
+ * @param string $source_content
+ * @param string $compiled_content
+ * @return true
+ */
+ function _compile_file($resource_name, $source_content, &$compiled_content)
+ {
+
+ if ($this->security) {
+ // do not allow php syntax to be executed unless specified
+ if ($this->php_handling == SMARTY_PHP_ALLOW &&
+ !$this->security_settings['PHP_HANDLING']) {
+ $this->php_handling = SMARTY_PHP_PASSTHRU;
+ }
+ }
+
+ $this->_load_filters();
+
+ $this->_current_file = $resource_name;
+ $this->_current_line_no = 1;
+ $ldq = preg_quote($this->left_delimiter, '~');
+ $rdq = preg_quote($this->right_delimiter, '~');
+
+ // run template source through prefilter functions
+ if (count($this->_plugins['prefilter']) > 0) {
+ foreach ($this->_plugins['prefilter'] as $filter_name => $prefilter) {
+ if ($prefilter === false) continue;
+ if ($prefilter[3] || is_callable($prefilter[0])) {
+ $source_content = call_user_func_array($prefilter[0],
+ array($source_content, &$this));
+ $this->_plugins['prefilter'][$filter_name][3] = true;
+ } else {
+ $this->_trigger_fatal_error("[plugin] prefilter '$filter_name' is not implemented");
+ }
+ }
+ }
+
+ /* fetch all special blocks */
+ $search = "~{$ldq}\*(.*?)\*{$rdq}|{$ldq}\s*literal\s*{$rdq}(.*?){$ldq}\s*/literal\s*{$rdq}|{$ldq}\s*php\s*{$rdq}(.*?){$ldq}\s*/php\s*{$rdq}~s";
+
+ preg_match_all($search, $source_content, $match, PREG_SET_ORDER);
+ $this->_folded_blocks = $match;
+ reset($this->_folded_blocks);
+
+ /* replace special blocks by "{php}" */
+ $source_content = preg_replace($search.'e', "'"
+ . $this->_quote_replace($this->left_delimiter) . 'php'
+ . "' . str_repeat(\"\n\", substr_count('\\0', \"\n\")) .'"
+ . $this->_quote_replace($this->right_delimiter)
+ . "'"
+ , $source_content);
+
+ /* Gather all template tags. */
+ preg_match_all("~{$ldq}\s*(.*?)\s*{$rdq}~s", $source_content, $_match);
+ $template_tags = $_match[1];
+ /* Split content by template tags to obtain non-template content. */
+ $text_blocks = preg_split("~{$ldq}.*?{$rdq}~s", $source_content);
+
+ /* loop through text blocks */
+ for ($curr_tb = 0, $for_max = count($text_blocks); $curr_tb < $for_max; $curr_tb++) {
+ /* match anything resembling php tags */
+ if (preg_match_all('~(<\?(?:\w+|=)?|\?>|language\s*=\s*[\"\']?php[\"\']?)~is', $text_blocks[$curr_tb], $sp_match)) {
+ /* replace tags with placeholders to prevent recursive replacements */
+ $sp_match[1] = array_unique($sp_match[1]);
+ usort($sp_match[1], '_smarty_sort_length');
+ for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; $curr_sp++) {
+ $text_blocks[$curr_tb] = str_replace($sp_match[1][$curr_sp],'%%%SMARTYSP'.$curr_sp.'%%%',$text_blocks[$curr_tb]);
+ }
+ /* process each one */
+ for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; $curr_sp++) {
+ if ($this->php_handling == SMARTY_PHP_PASSTHRU) {
+ /* echo php contents */
+ $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', '<?php echo \''.str_replace("'", "\'", $sp_match[1][$curr_sp]).'\'; ?>'."\n", $text_blocks[$curr_tb]);
+ } else if ($this->php_handling == SMARTY_PHP_QUOTE) {
+ /* quote php tags */
+ $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', htmlspecialchars($sp_match[1][$curr_sp]), $text_blocks[$curr_tb]);
+ } else if ($this->php_handling == SMARTY_PHP_REMOVE) {
+ /* remove php tags */
+ $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', '', $text_blocks[$curr_tb]);
+ } else {
+ /* SMARTY_PHP_ALLOW, but echo non php starting tags */
+ $sp_match[1][$curr_sp] = preg_replace('~(<\?(?!php|=|$))~i', '<?php echo \'\\1\'?>'."\n", $sp_match[1][$curr_sp]);
+ $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', $sp_match[1][$curr_sp], $text_blocks[$curr_tb]);
+ }
+ }
+ }
+ }
+
+ /* Compile the template tags into PHP code. */
+ $compiled_tags = array();
+ for ($i = 0, $for_max = count($template_tags); $i < $for_max; $i++) {
+ $this->_current_line_no += substr_count($text_blocks[$i], "\n");
+ $compiled_tags[] = $this->_compile_tag($template_tags[$i]);
+ $this->_current_line_no += substr_count($template_tags[$i], "\n");
+ }
+ if (count($this->_tag_stack)>0) {
+ list($_open_tag, $_line_no) = end($this->_tag_stack);
+ $this->_syntax_error("unclosed tag \{$_open_tag} (opened line $_line_no).", E_USER_ERROR, __FILE__, __LINE__);
+ return;
+ }
+
+ $compiled_content = '';
+
+ /* Interleave the compiled contents and text blocks to get the final result. */
+ for ($i = 0, $for_max = count($compiled_tags); $i < $for_max; $i++) {
+ if ($compiled_tags[$i] == '') {
+ // tag result empty, remove first newline from following text block
+ $text_blocks[$i+1] = preg_replace('~^(\r\n|\r|\n)~', '', $text_blocks[$i+1]);
+ }
+ $compiled_content .= $text_blocks[$i].$compiled_tags[$i];
+ }
+ $compiled_content .= $text_blocks[$i];
+
+ /* Reformat data between 'strip' and '/strip' tags, removing spaces, tabs and newlines. */
+ if (preg_match_all("~{$ldq}strip{$rdq}.*?{$ldq}/strip{$rdq}~s", $compiled_content, $_match)) {
+ $strip_tags = $_match[0];
+ $strip_tags_modified = preg_replace("~{$ldq}/?strip{$rdq}|[\t ]+$|^[\t ]+~m", '', $strip_tags);
+ $strip_tags_modified = preg_replace('~[\r\n]+~m', '', $strip_tags_modified);
+ for ($i = 0, $for_max = count($strip_tags); $i < $for_max; $i++)
+ $compiled_content = preg_replace("~{$ldq}strip{$rdq}.*?{$ldq}/strip{$rdq}~s",
+ $this->_quote_replace($strip_tags_modified[$i]),
+ $compiled_content, 1);
+ }
+
+ // remove \n from the end of the file, if any
+ if (($_len=strlen($compiled_content)) && ($compiled_content{$_len - 1} == "\n" )) {
+ $compiled_content = substr($compiled_content, 0, -1);
+ }
+
+ if (!empty($this->_cache_serial)) {
+ $compiled_content = "<?php \$this->_cache_serials['".$this->_cache_include."'] = '".$this->_cache_serial."'; ?>" . $compiled_content;
+ }
+
+ // remove unnecessary close/open tags
+ $compiled_content = preg_replace('~\?>\n?<\?php~', '', $compiled_content);
+
+ // run compiled template through postfilter functions
+ if (count($this->_plugins['postfilter']) > 0) {
+ foreach ($this->_plugins['postfilter'] as $filter_name => $postfilter) {
+ if ($postfilter === false) continue;
+ if ($postfilter[3] || is_callable($postfilter[0])) {
+ $compiled_content = call_user_func_array($postfilter[0],
+ array($compiled_content, &$this));
+ $this->_plugins['postfilter'][$filter_name][3] = true;
+ } else {
+ $this->_trigger_fatal_error("Smarty plugin error: postfilter '$filter_name' is not implemented");
+ }
+ }
+ }
+
+ // put header at the top of the compiled template
+ $template_header = "<?php /* Smarty version ".$this->_version.", created on ".strftime("%Y-%m-%d %H:%M:%S")."\n";
+ $template_header .= " compiled from ".strtr(urlencode($resource_name), array('%2F'=>'/', '%3A'=>':'))." */ ?>\n";
+
+ /* Emit code to load needed plugins. */
+ $this->_plugins_code = '';
+ if (count($this->_plugin_info)) {
+ $_plugins_params = "array('plugins' => array(";
+ foreach ($this->_plugin_info as $plugin_type => $plugins) {
+ foreach ($plugins as $plugin_name => $plugin_info) {
+ $_plugins_params .= "array('$plugin_type', '$plugin_name', '$plugin_info[0]', $plugin_info[1], ";
+ $_plugins_params .= $plugin_info[2] ? 'true),' : 'false),';
+ }
+ }
+ $_plugins_params .= '))';
+ $plugins_code = "<?php require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.load_plugins.php');\nsmarty_core_load_plugins($_plugins_params, \$this); ?>\n";
+ $template_header .= $plugins_code;
+ $this->_plugin_info = array();
+ $this->_plugins_code = $plugins_code;
+ }
+
+ if ($this->_init_smarty_vars) {
+ $template_header .= "<?php require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.assign_smarty_interface.php');\nsmarty_core_assign_smarty_interface(null, \$this); ?>\n";
+ $this->_init_smarty_vars = false;
+ }
+
+ $compiled_content = $template_header . $compiled_content;
+ return true;
+ }
+
+ /**
+ * Compile a template tag
+ *
+ * @param string $template_tag
+ * @return string
+ */
+ function _compile_tag($template_tag)
+ {
+ /* Matched comment. */
+ if ($template_tag{0} == '*' && $template_tag{strlen($template_tag) - 1} == '*')
+ return '';
+
+ /* Split tag into two three parts: command, command modifiers and the arguments. */
+ if(! preg_match('~^(?:(' . $this->_num_const_regexp . '|' . $this->_obj_call_regexp . '|' . $this->_var_regexp
+ . '|\/?' . $this->_reg_obj_regexp . '|\/?' . $this->_func_regexp . ')(' . $this->_mod_regexp . '*))
+ (?:\s+(.*))?$
+ ~xs', $template_tag, $match)) {
+ $this->_syntax_error("unrecognized tag: $template_tag", E_USER_ERROR, __FILE__, __LINE__);
+ }
+
+ $tag_command = $match[1];
+ $tag_modifier = isset($match[2]) ? $match[2] : null;
+ $tag_args = isset($match[3]) ? $match[3] : null;
+
+ if (preg_match('~^' . $this->_num_const_regexp . '|' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '$~', $tag_command)) {
+ /* tag name is a variable or object */
+ $_return = $this->_parse_var_props($tag_command . $tag_modifier, $this->_parse_attrs($tag_args));
+ if(isset($_tag_attrs['assign'])) {
+ return "<?php \$this->assign('" . $this->_dequote($_tag_attrs['assign']) . "', $_return ); ?>\n";
+ } else {
+ return "<?php echo $_return; ?>" . $this->_additional_newline;
+ }
+ }
+
+ /* If the tag name is a registered object, we process it. */
+ if (preg_match('~^\/?' . $this->_reg_obj_regexp . '$~', $tag_command)) {
+ return $this->_compile_registered_object_tag($tag_command, $this->_parse_attrs($tag_args), $tag_modifier);
+ }
+
+ switch ($tag_command) {
+ case 'include':
+ return $this->_compile_include_tag($tag_args);
+
+ case 'include_php':
+ return $this->_compile_include_php_tag($tag_args);
+
+ case 'if':
+ $this->_push_tag('if');
+ return $this->_compile_if_tag($tag_args);
+
+ case 'else':
+ list($_open_tag) = end($this->_tag_stack);
+ if ($_open_tag != 'if' && $_open_tag != 'elseif')
+ $this->_syntax_error('unexpected {else}', E_USER_ERROR, __FILE__, __LINE__);
+ else
+ $this->_push_tag('else');
+ return '<?php else: ?>';
+
+ case 'elseif':
+ list($_open_tag) = end($this->_tag_stack);
+ if ($_open_tag != 'if' && $_open_tag != 'elseif')
+ $this->_syntax_error('unexpected {elseif}', E_USER_ERROR, __FILE__, __LINE__);
+ if ($_open_tag == 'if')
+ $this->_push_tag('elseif');
+ return $this->_compile_if_tag($tag_args, true);
+
+ case '/if':
+ $this->_pop_tag('if');
+ return '<?php endif; ?>';
+
+ case 'capture':
+ return $this->_compile_capture_tag(true, $tag_args);
+
+ case '/capture':
+ return $this->_compile_capture_tag(false);
+
+ case 'ldelim':
+ return $this->left_delimiter;
+
+ case 'rdelim':
+ return $this->right_delimiter;
+
+ case 'section':
+ $this->_push_tag('section');
+ return $this->_compile_section_start($tag_args);
+
+ case 'sectionelse':
+ $this->_push_tag('sectionelse');
+ return "<?php endfor; else: ?>";
+ break;
+
+ case '/section':
+ $_open_tag = $this->_pop_tag('section');
+ if ($_open_tag == 'sectionelse')
+ return "<?php endif; ?>";
+ else
+ return "<?php endfor; endif; ?>";
+
+ case 'foreach':
+ $this->_push_tag('foreach');
+ return $this->_compile_foreach_start($tag_args);
+ break;
+
+ case 'foreachelse':
+ $this->_push_tag('foreachelse');
+ return "<?php endforeach; unset(\$_from); else: ?>";
+
+ case '/foreach':
+ $_open_tag = $this->_pop_tag('foreach');
+ if ($_open_tag == 'foreachelse')
+ return "<?php endif; ?>";
+ else
+ return "<?php endforeach; unset(\$_from); endif; ?>";
+ break;
+
+ case 'strip':
+ case '/strip':
+ if ($tag_command{0}=='/') {
+ $this->_pop_tag('strip');
+ if (--$this->_strip_depth==0) { /* outermost closing {/strip} */
+ $this->_additional_newline = "\n";
+ return $this->left_delimiter.$tag_command.$this->right_delimiter;
+ }
+ } else {
+ $this->_push_tag('strip');
+ if ($this->_strip_depth++==0) { /* outermost opening {strip} */
+ $this->_additional_newline = "";
+ return $this->left_delimiter.$tag_command.$this->right_delimiter;
+ }
+ }
+ return '';
+
+ case 'php':
+ /* handle folded tags replaced by {php} */
+ list(, $block) = each($this->_folded_blocks);
+ $this->_current_line_no += substr_count($block[0], "\n");
+ /* the number of matched elements in the regexp in _compile_file()
+ determins the type of folded tag that was found */
+ switch (count($block)) {
+ case 2: /* comment */
+ return '';
+
+ case 3: /* literal */
+ return "<?php echo '" . strtr($block[2], array("'"=>"\'", "\\"=>"\\\\")) . "'; ?>" . $this->_additional_newline;
+
+ case 4: /* php */
+ if ($this->security && !$this->security_settings['PHP_TAGS']) {
+ $this->_syntax_error("(secure mode) php tags not permitted", E_USER_WARNING, __FILE__, __LINE__);
+ return;
+ }
+ return '<?php ' . $block[3] .' ?>';
+ }
+ break;
+
+ case 'insert':
+ return $this->_compile_insert_tag($tag_args);
+
+ default:
+ if ($this->_compile_compiler_tag($tag_command, $tag_args, $output)) {
+ return $output;
+ } else if ($this->_compile_block_tag($tag_command, $tag_args, $tag_modifier, $output)) {
+ return $output;
+ } else if ($this->_compile_custom_tag($tag_command, $tag_args, $tag_modifier, $output)) {
+ return $output;
+ } else {
+ $this->_syntax_error("unrecognized tag '$tag_command'", E_USER_ERROR, __FILE__, __LINE__);
+ }
+
+ }
+ }
+
+
+ /**
+ * compile the custom compiler tag
+ *
+ * sets $output to the compiled custom compiler tag
+ * @param string $tag_command
+ * @param string $tag_args
+ * @param string $output
+ * @return boolean
+ */
+ function _compile_compiler_tag($tag_command, $tag_args, &$output)
+ {
+ $found = false;
+ $have_function = true;
+
+ /*
+ * First we check if the compiler function has already been registered
+ * or loaded from a plugin file.
+ */
+ if (isset($this->_plugins['compiler'][$tag_command])) {
+ $found = true;
+ $plugin_func = $this->_plugins['compiler'][$tag_command][0];
+ if (!is_callable($plugin_func)) {
+ $message = "compiler function '$tag_command' is not implemented";
+ $have_function = false;
+ }
+ }
+ /*
+ * Otherwise we need to load plugin file and look for the function
+ * inside it.
+ */
+ else if ($plugin_file = $this->_get_plugin_filepath('compiler', $tag_command)) {
+ $found = true;
+
+ include_once $plugin_file;
+
+ $plugin_func = 'smarty_compiler_' . $tag_command;
+ if (!is_callable($plugin_func)) {
+ $message = "plugin function $plugin_func() not found in $plugin_file\n";
+ $have_function = false;
+ } else {
+ $this->_plugins['compiler'][$tag_command] = array($plugin_func, null, null, null, true);
+ }
+ }
+
+ /*
+ * True return value means that we either found a plugin or a
+ * dynamically registered function. False means that we didn't and the
+ * compiler should now emit code to load custom function plugin for this
+ * tag.
+ */
+ if ($found) {
+ if ($have_function) {
+ $output = call_user_func_array($plugin_func, array($tag_args, &$this));
+ if($output != '') {
+ $output = '<?php ' . $this->_push_cacheable_state('compiler', $tag_command)
+ . $output
+ . $this->_pop_cacheable_state('compiler', $tag_command) . ' ?>';
+ }
+ } else {
+ $this->_syntax_error($message, E_USER_WARNING, __FILE__, __LINE__);
+ }
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+
+ /**
+ * compile block function tag
+ *
+ * sets $output to compiled block function tag
+ * @param string $tag_command
+ * @param string $tag_args
+ * @param string $tag_modifier
+ * @param string $output
+ * @return boolean
+ */
+ function _compile_block_tag($tag_command, $tag_args, $tag_modifier, &$output)
+ {
+ if ($tag_command{0} == '/') {
+ $start_tag = false;
+ $tag_command = substr($tag_command, 1);
+ } else
+ $start_tag = true;
+
+ $found = false;
+ $have_function = true;
+
+ /*
+ * First we check if the block function has already been registered
+ * or loaded from a plugin file.
+ */
+ if (isset($this->_plugins['block'][$tag_command])) {
+ $found = true;
+ $plugin_func = $this->_plugins['block'][$tag_command][0];
+ if (!is_callable($plugin_func)) {
+ $message = "block function '$tag_command' is not implemented";
+ $have_function = false;
+ }
+ }
+ /*
+ * Otherwise we need to load plugin file and look for the function
+ * inside it.
+ */
+ else if ($plugin_file = $this->_get_plugin_filepath('block', $tag_command)) {
+ $found = true;
+
+ include_once $plugin_file;
+
+ $plugin_func = 'smarty_block_' . $tag_command;
+ if (!function_exists($plugin_func)) {
+ $message = "plugin function $plugin_func() not found in $plugin_file\n";
+ $have_function = false;
+ } else {
+ $this->_plugins['block'][$tag_command] = array($plugin_func, null, null, null, true);
+
+ }
+ }
+
+ if (!$found) {
+ return false;
+ } else if (!$have_function) {
+ $this->_syntax_error($message, E_USER_WARNING, __FILE__, __LINE__);
+ return true;
+ }
+
+ /*
+ * Even though we've located the plugin function, compilation
+ * happens only once, so the plugin will still need to be loaded
+ * at runtime for future requests.
+ */
+ $this->_add_plugin('block', $tag_command);
+
+ if ($start_tag)
+ $this->_push_tag($tag_command);
+ else
+ $this->_pop_tag($tag_command);
+
+ if ($start_tag) {
+ $output = '<?php ' . $this->_push_cacheable_state('block', $tag_command);
+ $attrs = $this->_parse_attrs($tag_args);
+ $arg_list = $this->_compile_arg_list('block', $tag_command, $attrs, $_cache_attrs='');
+ $output .= "$_cache_attrs\$this->_tag_stack[] = array('$tag_command', array(".implode(',', $arg_list).')); ';
+ $output .= $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat=true);';
+ $output .= 'while ($_block_repeat) { ob_start(); ?>';
+ } else {
+ $output = '<?php $this->_block_content = ob_get_contents(); ob_end_clean(); ';
+ $_out_tag_text = $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], $this->_block_content, $this, $_block_repeat=false)';
+ if ($tag_modifier != '') {
+ $this->_parse_modifiers($_out_tag_text, $tag_modifier);
+ }
+ $output .= 'echo '.$_out_tag_text.'; } ';
+ $output .= " array_pop(\$this->_tag_stack); " . $this->_pop_cacheable_state('block', $tag_command) . '?>';
+ }
+
+ return true;
+ }
+
+
+ /**
+ * compile custom function tag
+ *
+ * @param string $tag_command
+ * @param string $tag_args
+ * @param string $tag_modifier
+ * @return string
+ */
+ function _compile_custom_tag($tag_command, $tag_args, $tag_modifier, &$output)
+ {
+ $found = false;
+ $have_function = true;
+
+ /*
+ * First we check if the custom function has already been registered
+ * or loaded from a plugin file.
+ */
+ if (isset($this->_plugins['function'][$tag_command])) {
+ $found = true;
+ $plugin_func = $this->_plugins['function'][$tag_command][0];
+ if (!is_callable($plugin_func)) {
+ $message = "custom function '$tag_command' is not implemented";
+ $have_function = false;
+ }
+ }
+ /*
+ * Otherwise we need to load plugin file and look for the function
+ * inside it.
+ */
+ else if ($plugin_file = $this->_get_plugin_filepath('function', $tag_command)) {
+ $found = true;
+
+ include_once $plugin_file;
+
+ $plugin_func = 'smarty_function_' . $tag_command;
+ if (!function_exists($plugin_func)) {
+ $message = "plugin function $plugin_func() not found in $plugin_file\n";
+ $have_function = false;
+ } else {
+ $this->_plugins['function'][$tag_command] = array($plugin_func, null, null, null, true);
+
+ }
+ }
+
+ if (!$found) {
+ return false;
+ } else if (!$have_function) {
+ $this->_syntax_error($message, E_USER_WARNING, __FILE__, __LINE__);
+ return true;
+ }
+
+ /* declare plugin to be loaded on display of the template that
+ we compile right now */
+ $this->_add_plugin('function', $tag_command);
+
+ $_cacheable_state = $this->_push_cacheable_state('function', $tag_command);
+ $attrs = $this->_parse_attrs($tag_args);
+ $arg_list = $this->_compile_arg_list('function', $tag_command, $attrs, $_cache_attrs='');
+
+ $output = $this->_compile_plugin_call('function', $tag_command).'(array('.implode(',', $arg_list)."), \$this)";
+ if($tag_modifier != '') {
+ $this->_parse_modifiers($output, $tag_modifier);
+ }
+
+ if($output != '') {
+ $output = '<?php ' . $_cacheable_state . $_cache_attrs . 'echo ' . $output . ';'
+ . $this->_pop_cacheable_state('function', $tag_command) . "?>" . $this->_additional_newline;
+ }
+
+ return true;
+ }
+
+ /**
+ * compile a registered object tag
+ *
+ * @param string $tag_command
+ * @param array $attrs
+ * @param string $tag_modifier
+ * @return string
+ */
+ function _compile_registered_object_tag($tag_command, $attrs, $tag_modifier)
+ {
+ if ($tag_command{0} == '/') {
+ $start_tag = false;
+ $tag_command = substr($tag_command, 1);
+ } else {
+ $start_tag = true;
+ }
+
+ list($object, $obj_comp) = explode('->', $tag_command);
+
+ $arg_list = array();
+ if(count($attrs)) {
+ $_assign_var = false;
+ foreach ($attrs as $arg_name => $arg_value) {
+ if($arg_name == 'assign') {
+ $_assign_var = $arg_value;
+ unset($attrs['assign']);
+ continue;
+ }
+ if (is_bool($arg_value))
+ $arg_value = $arg_value ? 'true' : 'false';
+ $arg_list[] = "'$arg_name' => $arg_value";
+ }
+ }
+
+ if($this->_reg_objects[$object][2]) {
+ // smarty object argument format
+ $args = "array(".implode(',', (array)$arg_list)."), \$this";
+ } else {
+ // traditional argument format
+ $args = implode(',', array_values($attrs));
+ if (empty($args)) {
+ $args = 'null';
+ }
+ }
+
+ $prefix = '';
+ $postfix = '';
+ $newline = '';
+ if(!is_object($this->_reg_objects[$object][0])) {
+ $this->_trigger_fatal_error("registered '$object' is not an object" , $this->_current_file, $this->_current_line_no, __FILE__, __LINE__);
+ } elseif(!empty($this->_reg_objects[$object][1]) && !in_array($obj_comp, $this->_reg_objects[$object][1])) {
+ $this->_trigger_fatal_error("'$obj_comp' is not a registered component of object '$object'", $this->_current_file, $this->_current_line_no, __FILE__, __LINE__);
+ } elseif(method_exists($this->_reg_objects[$object][0], $obj_comp)) {
+ // method
+ if(in_array($obj_comp, $this->_reg_objects[$object][3])) {
+ // block method
+ if ($start_tag) {
+ $prefix = "\$this->_tag_stack[] = array('$obj_comp', $args); ";
+ $prefix .= "\$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], null, \$this, \$_block_repeat=true); ";
+ $prefix .= "while (\$_block_repeat) { ob_start();";
+ $return = null;
+ $postfix = '';
+ } else {
+ $prefix = "\$this->_obj_block_content = ob_get_contents(); ob_end_clean(); ";
+ $return = "\$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$this->_obj_block_content, \$this, \$_block_repeat=false)";
+ $postfix = "} array_pop(\$this->_tag_stack);";
+ }
+ } else {
+ // non-block method
+ $return = "\$this->_reg_objects['$object'][0]->$obj_comp($args)";
+ }
+ } else {
+ // property
+ $return = "\$this->_reg_objects['$object'][0]->$obj_comp";
+ }
+
+ if($return != null) {
+ if($tag_modifier != '') {
+ $this->_parse_modifiers($return, $tag_modifier);
+ }
+
+ if(!empty($_assign_var)) {
+ $output = "\$this->assign('" . $this->_dequote($_assign_var) ."', $return);";
+ } else {
+ $output = 'echo ' . $return . ';';
+ $newline = $this->_additional_newline;
+ }
+ } else {
+ $output = '';
+ }
+
+ return '<?php ' . $prefix . $output . $postfix . "?>" . $newline;
+ }
+
+ /**
+ * Compile {insert ...} tag
+ *
+ * @param string $tag_args
+ * @return string
+ */
+ function _compile_insert_tag($tag_args)
+ {
+ $attrs = $this->_parse_attrs($tag_args);
+ $name = $this->_dequote($attrs['name']);
+
+ if (empty($name)) {
+ $this->_syntax_error("missing insert name", E_USER_ERROR, __FILE__, __LINE__);
+ }
+
+ if (!empty($attrs['script'])) {
+ $delayed_loading = true;
+ } else {
+ $delayed_loading = false;
+ }
+
+ foreach ($attrs as $arg_name => $arg_value) {
+ if (is_bool($arg_value))
+ $arg_value = $arg_value ? 'true' : 'false';
+ $arg_list[] = "'$arg_name' => $arg_value";
+ }
+
+ $this->_add_plugin('insert', $name, $delayed_loading);
+
+ $_params = "array('args' => array(".implode(', ', (array)$arg_list)."))";
+
+ return "<?php require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.run_insert_handler.php');\necho smarty_core_run_insert_handler($_params, \$this); ?>" . $this->_additional_newline;
+ }
+
+ /**
+ * Compile {include ...} tag
+ *
+ * @param string $tag_args
+ * @return string
+ */
+ function _compile_include_tag($tag_args)
+ {
+ $attrs = $this->_parse_attrs($tag_args);
+ $arg_list = array();
+
+ if (empty($attrs['file'])) {
+ $this->_syntax_error("missing 'file' attribute in include tag", E_USER_ERROR, __FILE__, __LINE__);
+ }
+
+ foreach ($attrs as $arg_name => $arg_value) {
+ if ($arg_name == 'file') {
+ $include_file = $arg_value;
+ continue;
+ } else if ($arg_name == 'assign') {
+ $assign_var = $arg_value;
+ continue;
+ }
+ if (is_bool($arg_value))
+ $arg_value = $arg_value ? 'true' : 'false';
+ $arg_list[] = "'$arg_name' => $arg_value";
+ }
+
+ $output = '<?php ';
+
+ if (isset($assign_var)) {
+ $output .= "ob_start();\n";
+ }
+
+ $output .=
+ "\$_smarty_tpl_vars = \$this->_tpl_vars;\n";
+
+
+ $_params = "array('smarty_include_tpl_file' => " . $include_file . ", 'smarty_include_vars' => array(".implode(',', (array)$arg_list)."))";
+ $output .= "\$this->_smarty_include($_params);\n" .
+ "\$this->_tpl_vars = \$_smarty_tpl_vars;\n" .
+ "unset(\$_smarty_tpl_vars);\n";
+
+ if (isset($assign_var)) {
+ $output .= "\$this->assign(" . $assign_var . ", ob_get_contents()); ob_end_clean();\n";
+ }
+
+ $output .= ' ?>';
+
+ return $output;
+
+ }
+
+ /**
+ * Compile {include ...} tag
+ *
+ * @param string $tag_args
+ * @return string
+ */
+ function _compile_include_php_tag($tag_args)
+ {
+ $attrs = $this->_parse_attrs($tag_args);
+
+ if (empty($attrs['file'])) {
+ $this->_syntax_error("missing 'file' attribute in include_php tag", E_USER_ERROR, __FILE__, __LINE__);
+ }
+
+ $assign_var = (empty($attrs['assign'])) ? '' : $this->_dequote($attrs['assign']);
+ $once_var = (empty($attrs['once']) || $attrs['once']=='false') ? 'false' : 'true';
+
+ $arg_list = array();
+ foreach($attrs as $arg_name => $arg_value) {
+ if($arg_name != 'file' AND $arg_name != 'once' AND $arg_name != 'assign') {
+ if(is_bool($arg_value))
+ $arg_value = $arg_value ? 'true' : 'false';
+ $arg_list[] = "'$arg_name' => $arg_value";
+ }
+ }
+
+ $_params = "array('smarty_file' => " . $attrs['file'] . ", 'smarty_assign' => '$assign_var', 'smarty_once' => $once_var, 'smarty_include_vars' => array(".implode(',', $arg_list)."))";
+
+ return "<?php require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.smarty_include_php.php');\nsmarty_core_smarty_include_php($_params, \$this); ?>" . $this->_additional_newline;
+ }
+
+
+ /**
+ * Compile {section ...} tag
+ *
+ * @param string $tag_args
+ * @return string
+ */
+ function _compile_section_start($tag_args)
+ {
+ $attrs = $this->_parse_attrs($tag_args);
+ $arg_list = array();
+
+ $output = '<?php ';
+ $section_name = $attrs['name'];
+ if (empty($section_name)) {
+ $this->_syntax_error("missing section name", E_USER_ERROR, __FILE__, __LINE__);
+ }
+
+ $output .= "unset(\$this->_sections[$section_name]);\n";
+ $section_props = "\$this->_sections[$section_name]";
+
+ foreach ($attrs as $attr_name => $attr_value) {
+ switch ($attr_name) {
+ case 'loop':
+ $output .= "{$section_props}['loop'] = is_array(\$_loop=$attr_value) ? count(\$_loop) : max(0, (int)\$_loop); unset(\$_loop);\n";
+ break;
+
+ case 'show':
+ if (is_bool($attr_value))
+ $show_attr_value = $attr_value ? 'true' : 'false';
+ else
+ $show_attr_value = "(bool)$attr_value";
+ $output .= "{$section_props}['show'] = $show_attr_value;\n";
+ break;
+
+ case 'name':
+ $output .= "{$section_props}['$attr_name'] = $attr_value;\n";
+ break;
+
+ case 'max':
+ case 'start':
+ $output .= "{$section_props}['$attr_name'] = (int)$attr_value;\n";
+ break;
+
+ case 'step':
+ $output .= "{$section_props}['$attr_name'] = ((int)$attr_value) == 0 ? 1 : (int)$attr_value;\n";
+ break;
+
+ default:
+ $this->_syntax_error("unknown section attribute - '$attr_name'", E_USER_ERROR, __FILE__, __LINE__);
+ break;
+ }
+ }
+
+ if (!isset($attrs['show']))
+ $output .= "{$section_props}['show'] = true;\n";
+
+ if (!isset($attrs['loop']))
+ $output .= "{$section_props}['loop'] = 1;\n";
+
+ if (!isset($attrs['max']))
+ $output .= "{$section_props}['max'] = {$section_props}['loop'];\n";
+ else
+ $output .= "if ({$section_props}['max'] < 0)\n" .
+ " {$section_props}['max'] = {$section_props}['loop'];\n";
+
+ if (!isset($attrs['step']))
+ $output .= "{$section_props}['step'] = 1;\n";
+
+ if (!isset($attrs['start']))
+ $output .= "{$section_props}['start'] = {$section_props}['step'] > 0 ? 0 : {$section_props}['loop']-1;\n";
+ else {
+ $output .= "if ({$section_props}['start'] < 0)\n" .
+ " {$section_props}['start'] = max({$section_props}['step'] > 0 ? 0 : -1, {$section_props}['loop'] + {$section_props}['start']);\n" .
+ "else\n" .
+ " {$section_props}['start'] = min({$section_props}['start'], {$section_props}['step'] > 0 ? {$section_props}['loop'] : {$section_props}['loop']-1);\n";
+ }
+
+ $output .= "if ({$section_props}['show']) {\n";
+ if (!isset($attrs['start']) && !isset($attrs['step']) && !isset($attrs['max'])) {
+ $output .= " {$section_props}['total'] = {$section_props}['loop'];\n";
+ } else {
+ $output .= " {$section_props}['total'] = min(ceil(({$section_props}['step'] > 0 ? {$section_props}['loop'] - {$section_props}['start'] : {$section_props}['start']+1)/abs({$section_props}['step'])), {$section_props}['max']);\n";
+ }
+ $output .= " if ({$section_props}['total'] == 0)\n" .
+ " {$section_props}['show'] = false;\n" .
+ "} else\n" .
+ " {$section_props}['total'] = 0;\n";
+
+ $output .= "if ({$section_props}['show']):\n";
+ $output .= "
+ for ({$section_props}['index'] = {$section_props}['start'], {$section_props}['iteration'] = 1;
+ {$section_props}['iteration'] <= {$section_props}['total'];
+ {$section_props}['index'] += {$section_props}['step'], {$section_props}['iteration']++):\n";
+ $output .= "{$section_props}['rownum'] = {$section_props}['iteration'];\n";
+ $output .= "{$section_props}['index_prev'] = {$section_props}['index'] - {$section_props}['step'];\n";
+ $output .= "{$section_props}['index_next'] = {$section_props}['index'] + {$section_props}['step'];\n";
+ $output .= "{$section_props}['first'] = ({$section_props}['iteration'] == 1);\n";
+ $output .= "{$section_props}['last'] = ({$section_props}['iteration'] == {$section_props}['total']);\n";
+
+ $output .= "?>";
+
+ return $output;
+ }
+
+
+ /**
+ * Compile {foreach ...} tag.
+ *
+ * @param string $tag_args
+ * @return string
+ */
+ function _compile_foreach_start($tag_args)
+ {
+ $attrs = $this->_parse_attrs($tag_args);
+ $arg_list = array();
+
+ if (empty($attrs['from'])) {
+ return $this->_syntax_error("foreach: missing 'from' attribute", E_USER_ERROR, __FILE__, __LINE__);
+ }
+ $from = $attrs['from'];
+
+ if (empty($attrs['item'])) {
+ return $this->_syntax_error("foreach: missing 'item' attribute", E_USER_ERROR, __FILE__, __LINE__);
+ }
+ $item = $this->_dequote($attrs['item']);
+ if (!preg_match('~^\w+$~', $item)) {
+ return $this->_syntax_error("'foreach: item' must be a variable name (literal string)", E_USER_ERROR, __FILE__, __LINE__);
+ }
+
+ if (isset($attrs['key'])) {
+ $key = $this->_dequote($attrs['key']);
+ if (!preg_match('~^\w+$~', $key)) {
+ return $this->_syntax_error("foreach: 'key' must to be a variable name (literal string)", E_USER_ERROR, __FILE__, __LINE__);
+ }
+ $key_part = "\$this->_tpl_vars['$key'] => ";
+ } else {
+ $key = null;
+ $key_part = '';
+ }
+
+ if (isset($attrs['name'])) {
+ $name = $attrs['name'];
+ } else {
+ $name = null;
+ }
+
+ $output = '<?php ';
+ if (isset($name)) {
+ $foreach_props = "\$this->_foreach[$name]";
+ $output .= "if (isset(\$this->_foreach[$name])) unset(\$this->_foreach[$name]);\n";
+ $output .= "{$foreach_props}['total'] = count(\$_from = (array)$from);\n";
+ $output .= "{$foreach_props}['show'] = {$foreach_props}['total'] > 0;\n";
+ $output .= "if ({$foreach_props}['show']):\n";
+ $output .= "{$foreach_props}['iteration'] = 0;\n";
+ $output .= " foreach (\$_from as $key_part\$this->_tpl_vars['$item']):\n";
+ $output .= " {$foreach_props}['iteration']++;\n";
+ $output .= " {$foreach_props}['first'] = ({$foreach_props}['iteration'] == 1);\n";
+ $output .= " {$foreach_props}['last'] = ({$foreach_props}['iteration'] == {$foreach_props}['total']);\n";
+ } else {
+ $output .= "if (count(\$_from = (array)$from)):\n";
+ $output .= " foreach (\$_from as $key_part\$this->_tpl_vars['$item']):\n";
+ }
+ $output .= '?>';
+
+ return $output;
+ }
+
+
+ /**
+ * Compile {capture} .. {/capture} tags
+ *
+ * @param boolean $start true if this is the {capture} tag
+ * @param string $tag_args
+ * @return string
+ */
+
+ function _compile_capture_tag($start, $tag_args = '')
+ {
+ $attrs = $this->_parse_attrs($tag_args);
+
+ if ($start) {
+ if (isset($attrs['name']))
+ $buffer = $attrs['name'];
+ else
+ $buffer = "'default'";
+
+ if (isset($attrs['assign']))
+ $assign = $attrs['assign'];
+ else
+ $assign = null;
+ $output = "<?php ob_start(); ?>";
+ $this->_capture_stack[] = array($buffer, $assign);
+ } else {
+ list($buffer, $assign) = array_pop($this->_capture_stack);
+ $output = "<?php \$this->_smarty_vars['capture'][$buffer] = ob_get_contents(); ";
+ if (isset($assign)) {
+ $output .= " \$this->assign($assign, ob_get_contents());";
+ }
+ $output .= "ob_end_clean(); ?>";
+ }
+
+ return $output;
+ }
+
+ /**
+ * Compile {if ...} tag
+ *
+ * @param string $tag_args
+ * @param boolean $elseif if true, uses elseif instead of if
+ * @return string
+ */
+ function _compile_if_tag($tag_args, $elseif = false)
+ {
+
+ /* Tokenize args for 'if' tag. */
+ preg_match_all('~(?>
+ ' . $this->_obj_call_regexp . '(?:' . $this->_mod_regexp . '*)? | # valid object call
+ ' . $this->_var_regexp . '(?:' . $this->_mod_regexp . '*)? | # var or quoted string
+ \-?0[xX][0-9a-fA-F]+|\-?\d+(?:\.\d+)?|\.\d+|!==|===|==|!=|<>|<<|>>|<=|>=|\&\&|\|\||\(|\)|,|\!|\^|=|\&|\~|<|>|\||\%|\+|\-|\/|\*|\@ | # valid non-word token
+ \b\w+\b | # valid word token
+ \S+ # anything else
+ )~x', $tag_args, $match);
+
+ $tokens = $match[0];
+
+ // make sure we have balanced parenthesis
+ $token_count = array_count_values($tokens);
+ if(isset($token_count['(']) && $token_count['('] != $token_count[')']) {
+ $this->_syntax_error("unbalanced parenthesis in if statement", E_USER_ERROR, __FILE__, __LINE__);
+ }
+
+ $is_arg_stack = array();
+
+ for ($i = 0; $i < count($tokens); $i++) {
+
+ $token = &$tokens[$i];
+
+ switch (strtolower($token)) {
+ case '!':
+ case '%':
+ case '!==':
+ case '==':
+ case '===':
+ case '>':
+ case '<':
+ case '!=':
+ case '<>':
+ case '<<':
+ case '>>':
+ case '<=':
+ case '>=':
+ case '&&':
+ case '||':
+ case '|':
+ case '^':
+ case '&':
+ case '~':
+ case ')':
+ case ',':
+ case '+':
+ case '-':
+ case '*':
+ case '/':
+ case '@':
+ break;
+
+ case 'eq':
+ $token = '==';
+ break;
+
+ case 'ne':
+ case 'neq':
+ $token = '!=';
+ break;
+
+ case 'lt':
+ $token = '<';
+ break;
+
+ case 'le':
+ case 'lte':
+ $token = '<=';
+ break;
+
+ case 'gt':
+ $token = '>';
+ break;
+
+ case 'ge':
+ case 'gte':
+ $token = '>=';
+ break;
+
+ case 'and':
+ $token = '&&';
+ break;
+
+ case 'or':
+ $token = '||';
+ break;
+
+ case 'not':
+ $token = '!';
+ break;
+
+ case 'mod':
+ $token = '%';
+ break;
+
+ case '(':
+ array_push($is_arg_stack, $i);
+ break;
+
+ case 'is':
+ /* If last token was a ')', we operate on the parenthesized
+ expression. The start of the expression is on the stack.
+ Otherwise, we operate on the last encountered token. */
+ if ($tokens[$i-1] == ')')
+ $is_arg_start = array_pop($is_arg_stack);
+ else
+ $is_arg_start = $i-1;
+ /* Construct the argument for 'is' expression, so it knows
+ what to operate on. */
+ $is_arg = implode(' ', array_slice($tokens, $is_arg_start, $i - $is_arg_start));
+
+ /* Pass all tokens from next one until the end to the
+ 'is' expression parsing function. The function will
+ return modified tokens, where the first one is the result
+ of the 'is' expression and the rest are the tokens it
+ didn't touch. */
+ $new_tokens = $this->_parse_is_expr($is_arg, array_slice($tokens, $i+1));
+
+ /* Replace the old tokens with the new ones. */
+ array_splice($tokens, $is_arg_start, count($tokens), $new_tokens);
+
+ /* Adjust argument start so that it won't change from the
+ current position for the next iteration. */
+ $i = $is_arg_start;
+ break;
+
+ default:
+ if(preg_match('~^' . $this->_func_regexp . '$~', $token) ) {
+ // function call
+ if($this->security &&
+ !in_array($token, $this->security_settings['IF_FUNCS'])) {
+ $this->_syntax_error("(secure mode) '$token' not allowed in if statement", E_USER_ERROR, __FILE__, __LINE__);
+ }
+ } elseif(preg_match('~^' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '(?:' . $this->_mod_regexp . '*)$~', $token)) {
+ // object or variable
+ $token = $this->_parse_var_props($token);
+ } elseif(is_numeric($token)) {
+ // number, skip it
+ } else {
+ $this->_syntax_error("unidentified token '$token'", E_USER_ERROR, __FILE__, __LINE__);
+ }
+ break;
+ }
+ }
+
+ if ($elseif)
+ return '<?php elseif ('.implode(' ', $tokens).'): ?>';
+ else
+ return '<?php if ('.implode(' ', $tokens).'): ?>';
+ }
+
+
+ function _compile_arg_list($type, $name, $attrs, &$cache_code) {
+ $arg_list = array();
+
+ if (isset($type) && isset($name)
+ && isset($this->_plugins[$type])
+ && isset($this->_plugins[$type][$name])
+ && empty($this->_plugins[$type][$name][4])
+ && is_array($this->_plugins[$type][$name][5])
+ ) {
+ /* we have a list of parameters that should be cached */
+ $_cache_attrs = $this->_plugins[$type][$name][5];
+ $_count = $this->_cache_attrs_count++;
+ $cache_code = "\$_cache_attrs =& \$this->_smarty_cache_attrs('$this->_cache_serial','$_count');";
+
+ } else {
+ /* no parameters are cached */
+ $_cache_attrs = null;
+ }
+
+ foreach ($attrs as $arg_name => $arg_value) {
+ if (is_bool($arg_value))
+ $arg_value = $arg_value ? 'true' : 'false';
+ if (is_null($arg_value))
+ $arg_value = 'null';
+ if ($_cache_attrs && in_array($arg_name, $_cache_attrs)) {
+ $arg_list[] = "'$arg_name' => (\$this->_cache_including) ? \$_cache_attrs['$arg_name'] : (\$_cache_attrs['$arg_name']=$arg_value)";
+ } else {
+ $arg_list[] = "'$arg_name' => $arg_value";
+ }
+ }
+ return $arg_list;
+ }
+
+ /**
+ * Parse is expression
+ *
+ * @param string $is_arg
+ * @param array $tokens
+ * @return array
+ */
+ function _parse_is_expr($is_arg, $tokens)
+ {
+ $expr_end = 0;
+ $negate_expr = false;
+
+ if (($first_token = array_shift($tokens)) == 'not') {
+ $negate_expr = true;
+ $expr_type = array_shift($tokens);
+ } else
+ $expr_type = $first_token;
+
+ switch ($expr_type) {
+ case 'even':
+ if (isset($tokens[$expr_end]) && $tokens[$expr_end] == 'by') {
+ $expr_end++;
+ $expr_arg = $tokens[$expr_end++];
+ $expr = "!(1 & ($is_arg / " . $this->_parse_var_props($expr_arg) . "))";
+ } else
+ $expr = "!(1 & $is_arg)";
+ break;
+
+ case 'odd':
+ if (isset($tokens[$expr_end]) && $tokens[$expr_end] == 'by') {
+ $expr_end++;
+ $expr_arg = $tokens[$expr_end++];
+ $expr = "(1 & ($is_arg / " . $this->_parse_var_props($expr_arg) . "))";
+ } else
+ $expr = "(1 & $is_arg)";
+ break;
+
+ case 'div':
+ if (@$tokens[$expr_end] == 'by') {
+ $expr_end++;
+ $expr_arg = $tokens[$expr_end++];
+ $expr = "!($is_arg % " . $this->_parse_var_props($expr_arg) . ")";
+ } else {
+ $this->_syntax_error("expecting 'by' after 'div'", E_USER_ERROR, __FILE__, __LINE__);
+ }
+ break;
+
+ default:
+ $this->_syntax_error("unknown 'is' expression - '$expr_type'", E_USER_ERROR, __FILE__, __LINE__);
+ break;
+ }
+
+ if ($negate_expr) {
+ $expr = "!($expr)";
+ }
+
+ array_splice($tokens, 0, $expr_end, $expr);
+
+ return $tokens;
+ }
+
+
+ /**
+ * Parse attribute string
+ *
+ * @param string $tag_args
+ * @return array
+ */
+ function _parse_attrs($tag_args)
+ {
+
+ /* Tokenize tag attributes. */
+ preg_match_all('~(?:' . $this->_obj_call_regexp . '|' . $this->_qstr_regexp . ' | (?>[^"\'=\s]+)
+ )+ |
+ [=]
+ ~x', $tag_args, $match);
+ $tokens = $match[0];
+
+ $attrs = array();
+ /* Parse state:
+ 0 - expecting attribute name
+ 1 - expecting '='
+ 2 - expecting attribute value (not '=') */
+ $state = 0;
+
+ foreach ($tokens as $token) {
+ switch ($state) {
+ case 0:
+ /* If the token is a valid identifier, we set attribute name
+ and go to state 1. */
+ if (preg_match('~^\w+$~', $token)) {
+ $attr_name = $token;
+ $state = 1;
+ } else
+ $this->_syntax_error("invalid attribute name: '$token'", E_USER_ERROR, __FILE__, __LINE__);
+ break;
+
+ case 1:
+ /* If the token is '=', then we go to state 2. */
+ if ($token == '=') {
+ $state = 2;
+ } else
+ $this->_syntax_error("expecting '=' after attribute name '$last_token'", E_USER_ERROR, __FILE__, __LINE__);
+ break;
+
+ case 2:
+ /* If token is not '=', we set the attribute value and go to
+ state 0. */
+ if ($token != '=') {
+ /* We booleanize the token if it's a non-quoted possible
+ boolean value. */
+ if (preg_match('~^(on|yes|true)$~', $token)) {
+ $token = 'true';
+ } else if (preg_match('~^(off|no|false)$~', $token)) {
+ $token = 'false';
+ } else if ($token == 'null') {
+ $token = 'null';
+ } else if (preg_match('~^-?([0-9]+|0[xX][0-9a-fA-F]+)$~', $token)) {
+ /* treat integer literally */
+ } else if (!preg_match('~^' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '(?:' . $this->_mod_regexp . ')*$~', $token)) {
+ /* treat as a string, double-quote it escaping quotes */
+ $token = '"'.addslashes($token).'"';
+ }
+
+ $attrs[$attr_name] = $token;
+ $state = 0;
+ } else
+ $this->_syntax_error("'=' cannot be an attribute value", E_USER_ERROR, __FILE__, __LINE__);
+ break;
+ }
+ $last_token = $token;
+ }
+
+ if($state != 0) {
+ if($state == 1) {
+ $this->_syntax_error("expecting '=' after attribute name '$last_token'", E_USER_ERROR, __FILE__, __LINE__);
+ } else {
+ $this->_syntax_error("missing attribute value", E_USER_ERROR, __FILE__, __LINE__);
+ }
+ }
+
+ $this->_parse_vars_props($attrs);
+
+ return $attrs;
+ }
+
+ /**
+ * compile multiple variables and section properties tokens into
+ * PHP code
+ *
+ * @param array $tokens
+ */
+ function _parse_vars_props(&$tokens)
+ {
+ foreach($tokens as $key => $val) {
+ $tokens[$key] = $this->_parse_var_props($val);
+ }
+ }
+
+ /**
+ * compile single variable and section properties token into
+ * PHP code
+ *
+ * @param string $val
+ * @param string $tag_attrs
+ * @return string
+ */
+ function _parse_var_props($val)
+ {
+ $val = trim($val);
+
+ if(preg_match('~^(' . $this->_obj_call_regexp . '|' . $this->_dvar_regexp . ')(' . $this->_mod_regexp . '*)$~', $val, $match)) {
+ // $ variable or object
+ $return = $this->_parse_var($match[1]);
+ $modifiers = $match[2];
+ if (!empty($this->default_modifiers) && !preg_match('~(^|\|)smarty:nodefaults($|\|)~',$modifiers)) {
+ $_default_mod_string = implode('|',(array)$this->default_modifiers);
+ $modifiers = empty($modifiers) ? $_default_mod_string : $_default_mod_string . '|' . $modifiers;
+ }
+ $this->_parse_modifiers($return, $modifiers);
+ return $return;
+ } elseif (preg_match('~^' . $this->_db_qstr_regexp . '(?:' . $this->_mod_regexp . '*)$~', $val)) {
+ // double quoted text
+ preg_match('~^(' . $this->_db_qstr_regexp . ')('. $this->_mod_regexp . '*)$~', $val, $match);
+ $return = $this->_expand_quoted_text($match[1]);
+ if($match[2] != '') {
+ $this->_parse_modifiers($return, $match[2]);
+ }
+ return $return;
+ }
+ elseif(preg_match('~^' . $this->_num_const_regexp . '(?:' . $this->_mod_regexp . '*)$~', $val)) {
+ // numerical constant
+ preg_match('~^(' . $this->_num_const_regexp . ')('. $this->_mod_regexp . '*)$~', $val, $match);
+ if($match[2] != '') {
+ $this->_parse_modifiers($match[1], $match[2]);
+ return $match[1];
+ }
+ }
+ elseif(preg_match('~^' . $this->_si_qstr_regexp . '(?:' . $this->_mod_regexp . '*)$~', $val)) {
+ // single quoted text
+ preg_match('~^(' . $this->_si_qstr_regexp . ')('. $this->_mod_regexp . '*)$~', $val, $match);
+ if($match[2] != '') {
+ $this->_parse_modifiers($match[1], $match[2]);
+ return $match[1];
+ }
+ }
+ elseif(preg_match('~^' . $this->_cvar_regexp . '(?:' . $this->_mod_regexp . '*)$~', $val)) {
+ // config var
+ return $this->_parse_conf_var($val);
+ }
+ elseif(preg_match('~^' . $this->_svar_regexp . '(?:' . $this->_mod_regexp . '*)$~', $val)) {
+ // section var
+ return $this->_parse_section_prop($val);
+ }
+ elseif(!in_array($val, $this->_permitted_tokens) && !is_numeric($val)) {
+ // literal string
+ return $this->_expand_quoted_text('"' . $val .'"');
+ }
+ return $val;
+ }
+
+ /**
+ * expand quoted text with embedded variables
+ *
+ * @param string $var_expr
+ * @return string
+ */
+ function _expand_quoted_text($var_expr)
+ {
+ // if contains unescaped $, expand it
+ if(preg_match_all('~(?:\`(?<!\\\\)\$' . $this->_dvar_guts_regexp . '\`)|(?:(?<!\\\\)\$\w+(\[[a-zA-Z0-9]+\])*)~', $var_expr, $_match)) {
+ $_match = $_match[0];
+ rsort($_match);
+ reset($_match);
+ foreach($_match as $_var) {
+ $var_expr = str_replace ($_var, '".(' . $this->_parse_var(str_replace('`','',$_var)) . ')."', $var_expr);
+ }
+ $_return = preg_replace('~\.""|(?<!\\\\)""\.~', '', $var_expr);
+ } else {
+ $_return = $var_expr;
+ }
+ // replace double quoted literal string with single quotes
+ $_return = preg_replace('~^"([\s\w]+)"$~',"'\\1'",$_return);
+ return $_return;
+ }
+
+ /**
+ * parse variable expression into PHP code
+ *
+ * @param string $var_expr
+ * @param string $output
+ * @return string
+ */
+ function _parse_var($var_expr)
+ {
+ $_has_math = false;
+ $_math_vars = preg_split('~('.$this->_dvar_math_regexp.'|'.$this->_qstr_regexp.')~', $var_expr, -1, PREG_SPLIT_DELIM_CAPTURE);
+
+ if(count($_math_vars) > 1) {
+ $_first_var = "";
+ $_complete_var = "";
+ $_output = "";
+ // simple check if there is any math, to stop recursion (due to modifiers with "xx % yy" as parameter)
+ foreach($_math_vars as $_k => $_math_var) {
+ $_math_var = $_math_vars[$_k];
+
+ if(!empty($_math_var) || is_numeric($_math_var)) {
+ // hit a math operator, so process the stuff which came before it
+ if(preg_match('~^' . $this->_dvar_math_regexp . '$~', $_math_var)) {
+ $_has_math = true;
+ if(!empty($_complete_var) || is_numeric($_complete_var)) {
+ $_output .= $this->_parse_var($_complete_var);
+ }
+
+ // just output the math operator to php
+ $_output .= $_math_var;
+
+ if(empty($_first_var))
+ $_first_var = $_complete_var;
+
+ $_complete_var = "";
+ } else {
+ $_complete_var .= $_math_var;
+ }
+ }
+ }
+ if($_has_math) {
+ if(!empty($_complete_var) || is_numeric($_complete_var))
+ $_output .= $this->_parse_var($_complete_var);
+
+ // get the modifiers working (only the last var from math + modifier is left)
+ $var_expr = $_complete_var;
+ }
+ }
+
+ // prevent cutting of first digit in the number (we _definitly_ got a number if the first char is a digit)
+ if(is_numeric($var_expr{0}))
+ $_var_ref = $var_expr;
+ else
+ $_var_ref = substr($var_expr, 1);
+
+ if(!$_has_math) {
+
+ // get [foo] and .foo and ->foo and (...) pieces
+ preg_match_all('~(?:^\w+)|' . $this->_obj_params_regexp . '|(?:' . $this->_var_bracket_regexp . ')|->\$?\w+|\.\$?\w+|\S+~', $_var_ref, $match);
+
+ $_indexes = $match[0];
+ $_var_name = array_shift($_indexes);
+
+ /* Handle $smarty.* variable references as a special case. */
+ if ($_var_name == 'smarty') {
+ /*
+ * If the reference could be compiled, use the compiled output;
+ * otherwise, fall back on the $smarty variable generated at
+ * run-time.
+ */
+ if (($smarty_ref = $this->_compile_smarty_ref($_indexes)) !== null) {
+ $_output = $smarty_ref;
+ } else {
+ $_var_name = substr(array_shift($_indexes), 1);
+ $_output = "\$this->_smarty_vars['$_var_name']";
+ }
+ } elseif(is_numeric($_var_name) && is_numeric($var_expr{0})) {
+ // because . is the operator for accessing arrays thru inidizes we need to put it together again for floating point numbers
+ if(count($_indexes) > 0)
+ {
+ $_var_name .= implode("", $_indexes);
+ $_indexes = array();
+ }
+ $_output = $_var_name;
+ } else {
+ $_output = "\$this->_tpl_vars['$_var_name']";
+ }
+
+ foreach ($_indexes as $_index) {
+ if ($_index{0} == '[') {
+ $_index = substr($_index, 1, -1);
+ if (is_numeric($_index)) {
+ $_output .= "[$_index]";
+ } elseif ($_index{0} == '$') {
+ if (strpos($_index, '.') !== false) {
+ $_output .= '[' . $this->_parse_var($_index) . ']';
+ } else {
+ $_output .= "[\$this->_tpl_vars['" . substr($_index, 1) . "']]";
+ }
+ } else {
+ $_var_parts = explode('.', $_index);
+ $_var_section = $_var_parts[0];
+ $_var_section_prop = isset($_var_parts[1]) ? $_var_parts[1] : 'index';
+ $_output .= "[\$this->_sections['$_var_section']['$_var_section_prop']]";
+ }
+ } else if ($_index{0} == '.') {
+ if ($_index{1} == '$')
+ $_output .= "[\$this->_tpl_vars['" . substr($_index, 2) . "']]";
+ else
+ $_output .= "['" . substr($_index, 1) . "']";
+ } else if (substr($_index,0,2) == '->') {
+ if(substr($_index,2,2) == '__') {
+ $this->_syntax_error('call to internal object members is not allowed', E_USER_ERROR, __FILE__, __LINE__);
+ } elseif($this->security && substr($_index, 2, 1) == '_') {
+ $this->_syntax_error('(secure) call to private object member is not allowed', E_USER_ERROR, __FILE__, __LINE__);
+ } elseif ($_index{2} == '$') {
+ if ($this->security) {
+ $this->_syntax_error('(secure) call to dynamic object member is not allowed', E_USER_ERROR, __FILE__, __LINE__);
+ } else {
+ $_output .= '->{(($_var=$this->_tpl_vars[\''.substr($_index,3).'\']) && substr($_var,0,2)!=\'__\') ? $_var : $this->trigger_error("cannot access property \\"$_var\\"")}';
+ }
+ } else {
+ $_output .= $_index;
+ }
+ } elseif ($_index{0} == '(') {
+ $_index = $this->_parse_parenth_args($_index);
+ $_output .= $_index;
+ } else {
+ $_output .= $_index;
+ }
+ }
+ }
+
+ return $_output;
+ }
+
+ /**
+ * parse arguments in function call parenthesis
+ *
+ * @param string $parenth_args
+ * @return string
+ */
+ function _parse_parenth_args($parenth_args)
+ {
+ preg_match_all('~' . $this->_param_regexp . '~',$parenth_args, $match);
+ $orig_vals = $match = $match[0];
+ $this->_parse_vars_props($match);
+ $replace = array();
+ for ($i = 0, $count = count($match); $i < $count; $i++) {
+ $replace[$orig_vals[$i]] = $match[$i];
+ }
+ return strtr($parenth_args, $replace);
+ }
+
+ /**
+ * parse configuration variable expression into PHP code
+ *
+ * @param string $conf_var_expr
+ */
+ function _parse_conf_var($conf_var_expr)
+ {
+ $parts = explode('|', $conf_var_expr, 2);
+ $var_ref = $parts[0];
+ $modifiers = isset($parts[1]) ? $parts[1] : '';
+
+ $var_name = substr($var_ref, 1, -1);
+
+ $output = "\$this->_config[0]['vars']['$var_name']";
+
+ $this->_parse_modifiers($output, $modifiers);
+
+ return $output;
+ }
+
+ /**
+ * parse section property expression into PHP code
+ *
+ * @param string $section_prop_expr
+ * @return string
+ */
+ function _parse_section_prop($section_prop_expr)
+ {
+ $parts = explode('|', $section_prop_expr, 2);
+ $var_ref = $parts[0];
+ $modifiers = isset($parts[1]) ? $parts[1] : '';
+
+ preg_match('!%(\w+)\.(\w+)%!', $var_ref, $match);
+ $section_name = $match[1];
+ $prop_name = $match[2];
+
+ $output = "\$this->_sections['$section_name']['$prop_name']";
+
+ $this->_parse_modifiers($output, $modifiers);
+
+ return $output;
+ }
+
+
+ /**
+ * parse modifier chain into PHP code
+ *
+ * sets $output to parsed modified chain
+ * @param string $output
+ * @param string $modifier_string
+ */
+ function _parse_modifiers(&$output, $modifier_string)
+ {
+ preg_match_all('~\|(@?\w+)((?>:(?:'. $this->_qstr_regexp . '|[^|]+))*)~', '|' . $modifier_string, $_match);
+ list(, $_modifiers, $modifier_arg_strings) = $_match;
+
+ for ($_i = 0, $_for_max = count($_modifiers); $_i < $_for_max; $_i++) {
+ $_modifier_name = $_modifiers[$_i];
+
+ if($_modifier_name == 'smarty') {
+ // skip smarty modifier
+ continue;
+ }
+
+ preg_match_all('~:(' . $this->_qstr_regexp . '|[^:]+)~', $modifier_arg_strings[$_i], $_match);
+ $_modifier_args = $_match[1];
+
+ if ($_modifier_name{0} == '@') {
+ $_map_array = false;
+ $_modifier_name = substr($_modifier_name, 1);
+ } else {
+ $_map_array = true;
+ }
+
+ if (empty($this->_plugins['modifier'][$_modifier_name])
+ && !$this->_get_plugin_filepath('modifier', $_modifier_name)
+ && function_exists($_modifier_name)) {
+ if ($this->security && !in_array($_modifier_name, $this->security_settings['MODIFIER_FUNCS'])) {
+ $this->_trigger_fatal_error("[plugin] (secure mode) modifier '$_modifier_name' is not allowed" , $this->_current_file, $this->_current_line_no, __FILE__, __LINE__);
+ } else {
+ $this->_plugins['modifier'][$_modifier_name] = array($_modifier_name, null, null, false);
+ }
+ }
+ $this->_add_plugin('modifier', $_modifier_name);
+
+ $this->_parse_vars_props($_modifier_args);
+
+ if($_modifier_name == 'default') {
+ // supress notifications of default modifier vars and args
+ if($output{0} == '$') {
+ $output = '@' . $output;
+ }
+ if(isset($_modifier_args[0]) && $_modifier_args[0]{0} == '$') {
+ $_modifier_args[0] = '@' . $_modifier_args[0];
+ }
+ }
+ if (count($_modifier_args) > 0)
+ $_modifier_args = ', '.implode(', ', $_modifier_args);
+ else
+ $_modifier_args = '';
+
+ if ($_map_array) {
+ $output = "((is_array(\$_tmp=$output)) ? \$this->_run_mod_handler('$_modifier_name', true, \$_tmp$_modifier_args) : " . $this->_compile_plugin_call('modifier', $_modifier_name) . "(\$_tmp$_modifier_args))";
+
+ } else {
+
+ $output = $this->_compile_plugin_call('modifier', $_modifier_name)."($output$_modifier_args)";
+
+ }
+ }
+ }
+
+
+ /**
+ * add plugin
+ *
+ * @param string $type
+ * @param string $name
+ * @param boolean? $delayed_loading
+ */
+ function _add_plugin($type, $name, $delayed_loading = null)
+ {
+ if (!isset($this->_plugin_info[$type])) {
+ $this->_plugin_info[$type] = array();
+ }
+ if (!isset($this->_plugin_info[$type][$name])) {
+ $this->_plugin_info[$type][$name] = array($this->_current_file,
+ $this->_current_line_no,
+ $delayed_loading);
+ }
+ }
+
+
+ /**
+ * Compiles references of type $smarty.foo
+ *
+ * @param string $indexes
+ * @return string
+ */
+ function _compile_smarty_ref(&$indexes)
+ {
+ /* Extract the reference name. */
+ $_ref = substr($indexes[0], 1);
+ foreach($indexes as $_index_no=>$_index) {
+ if ($_index{0} != '.' && $_index_no<2 || !preg_match('~^(\.|\[|->)~', $_index)) {
+ $this->_syntax_error('$smarty' . implode('', array_slice($indexes, 0, 2)) . ' is an invalid reference', E_USER_ERROR, __FILE__, __LINE__);
+ }
+ }
+
+ switch ($_ref) {
+ case 'now':
+ $compiled_ref = 'time()';
+ $_max_index = 1;
+ break;
+
+ case 'foreach':
+ case 'section':
+ array_shift($indexes);
+ $_var = $this->_parse_var_props(substr($indexes[0], 1));
+ if ($_ref == 'foreach')
+ $compiled_ref = "\$this->_foreach[$_var]";
+ else
+ $compiled_ref = "\$this->_sections[$_var]";
+ break;
+
+ case 'get':
+ $compiled_ref = ($this->request_use_auto_globals) ? '$_GET' : "\$GLOBALS['HTTP_GET_VARS']";
+ break;
+
+ case 'post':
+ $compiled_ref = ($this->request_use_auto_globals) ? '$_POST' : "\$GLOBALS['HTTP_POST_VARS']";
+ break;
+
+ case 'cookies':
+ $compiled_ref = ($this->request_use_auto_globals) ? '$_COOKIE' : "\$GLOBALS['HTTP_COOKIE_VARS']";
+ break;
+
+ case 'env':
+ $compiled_ref = ($this->request_use_auto_globals) ? '$_ENV' : "\$GLOBALS['HTTP_ENV_VARS']";
+ break;
+
+ case 'server':
+ $compiled_ref = ($this->request_use_auto_globals) ? '$_SERVER' : "\$GLOBALS['HTTP_SERVER_VARS']";
+ break;
+
+ case 'session':
+ $compiled_ref = ($this->request_use_auto_globals) ? '$_SESSION' : "\$GLOBALS['HTTP_SESSION_VARS']";
+ break;
+
+ /*
+ * These cases are handled either at run-time or elsewhere in the
+ * compiler.
+ */
+ case 'request':
+ if ($this->request_use_auto_globals) {
+ $compiled_ref = '$_REQUEST';
+ break;
+ } else {
+ $this->_init_smarty_vars = true;
+ }
+ return null;
+
+ case 'capture':
+ return null;
+
+ case 'template':
+ $compiled_ref = "'$this->_current_file'";
+ $_max_index = 1;
+ break;
+
+ case 'version':
+ $compiled_ref = "'$this->_version'";
+ $_max_index = 1;
+ break;
+
+ case 'const':
+ if ($this->security && !$this->security_settings['ALLOW_CONSTANTS']) {
+ $this->_syntax_error("(secure mode) constants not permitted",
+ E_USER_WARNING, __FILE__, __LINE__);
+ return;
+ }
+ array_shift($indexes);
+ $_val = $this->_parse_var_props(substr($indexes[0],1));
+ $compiled_ref = '@constant(' . $_val . ')';
+ $_max_index = 1;
+ break;
+
+ case 'config':
+ $compiled_ref = "\$this->_config[0]['vars']";
+ $_max_index = 3;
+ break;
+
+ case 'ldelim':
+ $compiled_ref = "'$this->left_delimiter'";
+ break;
+
+ case 'rdelim':
+ $compiled_ref = "'$this->right_delimiter'";
+ break;
+
+ default:
+ $this->_syntax_error('$smarty.' . $_ref . ' is an unknown reference', E_USER_ERROR, __FILE__, __LINE__);
+ break;
+ }
+
+ if (isset($_max_index) && count($indexes) > $_max_index) {
+ $this->_syntax_error('$smarty' . implode('', $indexes) .' is an invalid reference', E_USER_ERROR, __FILE__, __LINE__);
+ }
+
+ array_shift($indexes);
+ return $compiled_ref;
+ }
+
+ /**
+ * compiles call to plugin of type $type with name $name
+ * returns a string containing the function-name or method call
+ * without the paramter-list that would have follow to make the
+ * call valid php-syntax
+ *
+ * @param string $type
+ * @param string $name
+ * @return string
+ */
+ function _compile_plugin_call($type, $name) {
+ if (isset($this->_plugins[$type][$name])) {
+ /* plugin loaded */
+ if (is_array($this->_plugins[$type][$name][0])) {
+ return ((is_object($this->_plugins[$type][$name][0][0])) ?
+ "\$this->_plugins['$type']['$name'][0][0]->" /* method callback */
+ : (string)($this->_plugins[$type][$name][0][0]).'::' /* class callback */
+ ). $this->_plugins[$type][$name][0][1];
+
+ } else {
+ /* function callback */
+ return $this->_plugins[$type][$name][0];
+
+ }
+ } else {
+ /* plugin not loaded -> auto-loadable-plugin */
+ return 'smarty_'.$type.'_'.$name;
+
+ }
+ }
+
+ /**
+ * load pre- and post-filters
+ */
+ function _load_filters()
+ {
+ if (count($this->_plugins['prefilter']) > 0) {
+ foreach ($this->_plugins['prefilter'] as $filter_name => $prefilter) {
+ if ($prefilter === false) {
+ unset($this->_plugins['prefilter'][$filter_name]);
+ $_params = array('plugins' => array(array('prefilter', $filter_name, null, null, false)));
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.load_plugins.php');
+ smarty_core_load_plugins($_params, $this);
+ }
+ }
+ }
+ if (count($this->_plugins['postfilter']) > 0) {
+ foreach ($this->_plugins['postfilter'] as $filter_name => $postfilter) {
+ if ($postfilter === false) {
+ unset($this->_plugins['postfilter'][$filter_name]);
+ $_params = array('plugins' => array(array('postfilter', $filter_name, null, null, false)));
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.load_plugins.php');
+ smarty_core_load_plugins($_params, $this);
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Quote subpattern references
+ *
+ * @param string $string
+ * @return string
+ */
+ function _quote_replace($string)
+ {
+ return strtr($string, array('\\' => '\\\\', '$' => '\\$'));
+ }
+
+ /**
+ * display Smarty syntax error
+ *
+ * @param string $error_msg
+ * @param integer $error_type
+ * @param string $file
+ * @param integer $line
+ */
+ function _syntax_error($error_msg, $error_type = E_USER_ERROR, $file=null, $line=null)
+ {
+ $this->_trigger_fatal_error("syntax error: $error_msg", $this->_current_file, $this->_current_line_no, $file, $line, $error_type);
+ }
+
+
+ /**
+ * check if the compilation changes from cacheable to
+ * non-cacheable state with the beginning of the current
+ * plugin. return php-code to reflect the transition.
+ * @return string
+ */
+ function _push_cacheable_state($type, $name) {
+ $_cacheable = !isset($this->_plugins[$type][$name]) || $this->_plugins[$type][$name][4];
+ if ($_cacheable
+ || 0<$this->_cacheable_state++) return '';
+ if (!isset($this->_cache_serial)) $this->_cache_serial = md5(uniqid('Smarty'));
+ $_ret = 'if ($this->caching) { echo \'{nocache:'
+ . $this->_cache_serial . '#' . $this->_nocache_count
+ . '}\';}';
+ return $_ret;
+ }
+
+
+ /**
+ * check if the compilation changes from non-cacheable to
+ * cacheable state with the end of the current plugin return
+ * php-code to reflect the transition.
+ * @return string
+ */
+ function _pop_cacheable_state($type, $name) {
+ $_cacheable = !isset($this->_plugins[$type][$name]) || $this->_plugins[$type][$name][4];
+ if ($_cacheable
+ || --$this->_cacheable_state>0) return '';
+ return 'if ($this->caching) { echo \'{/nocache:'
+ . $this->_cache_serial . '#' . ($this->_nocache_count++)
+ . '}\';}';
+ }
+
+
+ /**
+ * push opening tag-name, file-name and line-number on the tag-stack
+ * @param string the opening tag's name
+ */
+ function _push_tag($open_tag)
+ {
+ array_push($this->_tag_stack, array($open_tag, $this->_current_line_no));
+ }
+
+ /**
+ * pop closing tag-name
+ * raise an error if this stack-top doesn't match with the closing tag
+ * @param string the closing tag's name
+ * @return string the opening tag's name
+ */
+ function _pop_tag($close_tag)
+ {
+ $message = '';
+ if (count($this->_tag_stack)>0) {
+ list($_open_tag, $_line_no) = array_pop($this->_tag_stack);
+ if ($close_tag == $_open_tag) {
+ return $_open_tag;
+ }
+ if ($close_tag == 'if' && ($_open_tag == 'else' || $_open_tag == 'elseif' )) {
+ return $this->_pop_tag($close_tag);
+ }
+ if ($close_tag == 'section' && $_open_tag == 'sectionelse') {
+ $this->_pop_tag($close_tag);
+ return $_open_tag;
+ }
+ if ($close_tag == 'foreach' && $_open_tag == 'foreachelse') {
+ $this->_pop_tag($close_tag);
+ return $_open_tag;
+ }
+ if ($_open_tag == 'else' || $_open_tag == 'elseif') {
+ $_open_tag = 'if';
+ } elseif ($_open_tag == 'sectionelse') {
+ $_open_tag = 'section';
+ } elseif ($_open_tag == 'foreachelse') {
+ $_open_tag = 'foreach';
+ }
+ $message = " expected {/$_open_tag} (opened line $_line_no).";
+ }
+ $this->_syntax_error("mismatched tag {/$close_tag}.$message",
+ E_USER_ERROR, __FILE__, __LINE__);
+ }
+
+}
+
+/**
+ * compare to values by their string length
+ *
+ * @access private
+ * @param string $a
+ * @param string $b
+ * @return 0|-1|1
+ */
+function _smarty_sort_length($a, $b)
+{
+ if($a == $b)
+ return 0;
+
+ if(strlen($a) == strlen($b))
+ return ($a > $b) ? -1 : 1;
+
+ return (strlen($a) > strlen($b)) ? -1 : 1;
+}
+
+
+/* vim: set et: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/Smarty_Compiler.class.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/configs/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/configs/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/configs/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/configs/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/configs/test.conf
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/configs/test.conf 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/configs/test.conf 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,5 @@
+title = Welcome to Smarty!
+cutoff_size = 40
+
+[setup]
+bold = true
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.assemble_plugin_filepath.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.assemble_plugin_filepath.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.assemble_plugin_filepath.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,67 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * assemble filepath of requested plugin
+ *
+ * @param string $type
+ * @param string $name
+ * @return string|false
+ */
+function smarty_core_assemble_plugin_filepath($params, &$smarty)
+{
+ static $_filepaths_cache = array();
+
+ $_plugin_filename = $params['type'] . '.' . $params['name'] . '.php';
+ if (isset($_filepaths_cache[$_plugin_filename])) {
+ return $_filepaths_cache[$_plugin_filename];
+ }
+ $_return = false;
+
+ foreach ((array)$smarty->plugins_dir as $_plugin_dir) {
+
+ $_plugin_filepath = $_plugin_dir . DIRECTORY_SEPARATOR . $_plugin_filename;
+
+ // see if path is relative
+ if (!preg_match("/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $_plugin_dir)) {
+ $_relative_paths[] = $_plugin_dir;
+ // relative path, see if it is in the SMARTY_DIR
+ if (@is_readable(SMARTY_DIR . $_plugin_filepath)) {
+ $_return = SMARTY_DIR . $_plugin_filepath;
+ break;
+ }
+ }
+ // try relative to cwd (or absolute)
+ if (@is_readable($_plugin_filepath)) {
+ $_return = $_plugin_filepath;
+ break;
+ }
+ }
+
+ if($_return === false) {
+ // still not found, try PHP include_path
+ if(isset($_relative_paths)) {
+ foreach ((array)$_relative_paths as $_plugin_dir) {
+
+ $_plugin_filepath = $_plugin_dir . DIRECTORY_SEPARATOR . $_plugin_filename;
+
+ $_params = array('file_path' => $_plugin_filepath);
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_include_path.php');
+ if(smarty_core_get_include_path($_params, $smarty)) {
+ $_return = $_params['new_file_path'];
+ break;
+ }
+ }
+ }
+ }
+ $_filepaths_cache[$_plugin_filename] = $_return;
+ return $_return;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.assemble_plugin_filepath.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.assign_smarty_interface.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.assign_smarty_interface.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.assign_smarty_interface.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Smarty assign_smarty_interface core plugin
+ *
+ * Type: core<br>
+ * Name: assign_smarty_interface<br>
+ * Purpose: assign the $smarty interface variable
+ * @param array Format: null
+ * @param Smarty
+ */
+function smarty_core_assign_smarty_interface($params, &$smarty)
+{
+ if (isset($smarty->_smarty_vars) && isset($smarty->_smarty_vars['request'])) {
+ return;
+ }
+
+ $_globals_map = array('g' => 'HTTP_GET_VARS',
+ 'p' => 'HTTP_POST_VARS',
+ 'c' => 'HTTP_COOKIE_VARS',
+ 's' => 'HTTP_SERVER_VARS',
+ 'e' => 'HTTP_ENV_VARS');
+
+ $_smarty_vars_request = array();
+
+ foreach (preg_split('!!', strtolower($smarty->request_vars_order)) as $_c) {
+ if (isset($_globals_map[$_c])) {
+ $_smarty_vars_request = array_merge($_smarty_vars_request, $GLOBALS[$_globals_map[$_c]]);
+ }
+ }
+ $_smarty_vars_request = @array_merge($_smarty_vars_request, $GLOBALS['HTTP_SESSION_VARS']);
+
+ $smarty->_smarty_vars['request'] = $_smarty_vars_request;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.assign_smarty_interface.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.create_dir_structure.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.create_dir_structure.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.create_dir_structure.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,79 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * create full directory structure
+ *
+ * @param string $dir
+ */
+
+// $dir
+
+function smarty_core_create_dir_structure($params, &$smarty)
+{
+ if (!file_exists($params['dir'])) {
+ $_open_basedir_ini = ini_get('open_basedir');
+
+ if (DIRECTORY_SEPARATOR=='/') {
+ /* unix-style paths */
+ $_dir = $params['dir'];
+ $_dir_parts = preg_split('!/+!', $_dir, -1, PREG_SPLIT_NO_EMPTY);
+ $_new_dir = ($_dir{0}=='/') ? '/' : getcwd().'/';
+ if($_use_open_basedir = !empty($_open_basedir_ini)) {
+ $_open_basedirs = explode(':', $_open_basedir_ini);
+ }
+
+ } else {
+ /* other-style paths */
+ $_dir = str_replace('\\','/', $params['dir']);
+ $_dir_parts = preg_split('!/+!', $_dir, -1, PREG_SPLIT_NO_EMPTY);
+ if (preg_match('!^((//)|([a-zA-Z]:/))!', $_dir, $_root_dir)) {
+ /* leading "//" for network volume, or "[letter]:/" for full path */
+ $_new_dir = $_root_dir[1];
+ /* remove drive-letter from _dir_parts */
+ if (isset($_root_dir[3])) array_shift($_dir_parts);
+
+ } else {
+ $_new_dir = str_replace('\\', '/', getcwd()).'/';
+
+ }
+
+ if($_use_open_basedir = !empty($_open_basedir_ini)) {
+ $_open_basedirs = explode(';', str_replace('\\', '/', $_open_basedir_ini));
+ }
+
+ }
+
+ /* all paths use "/" only from here */
+ foreach ($_dir_parts as $_dir_part) {
+ $_new_dir .= $_dir_part;
+
+ if ($_use_open_basedir) {
+ // do not attempt to test or make directories outside of open_basedir
+ $_make_new_dir = false;
+ foreach ($_open_basedirs as $_open_basedir) {
+ if (substr($_new_dir, 0, strlen($_open_basedir)) == $_open_basedir) {
+ $_make_new_dir = true;
+ break;
+ }
+ }
+ } else {
+ $_make_new_dir = true;
+ }
+
+ if ($_make_new_dir && !file_exists($_new_dir) && !@mkdir($_new_dir, $smarty->_dir_perms) && !is_dir($_new_dir)) {
+ $smarty->trigger_error("problem creating directory '" . $_new_dir . "'");
+ return false;
+ }
+ $_new_dir .= '/';
+ }
+ }
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.create_dir_structure.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.display_debug_console.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.display_debug_console.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.display_debug_console.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,61 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Smarty debug_console function plugin
+ *
+ * Type: core<br>
+ * Name: display_debug_console<br>
+ * Purpose: display the javascript debug console window
+ * @param array Format: null
+ * @param Smarty
+ */
+function smarty_core_display_debug_console($params, &$smarty)
+{
+ // we must force compile the debug template in case the environment
+ // changed between separate applications.
+
+ if(empty($smarty->debug_tpl)) {
+ // set path to debug template from SMARTY_DIR
+ $smarty->debug_tpl = SMARTY_DIR . 'debug.tpl';
+ if($smarty->security && is_file($smarty->debug_tpl)) {
+ $smarty->secure_dir[] = dirname(realpath($smarty->debug_tpl));
+ }
+ $smarty->debug_tpl = 'file:' . SMARTY_DIR . 'debug.tpl';
+ }
+
+ $_ldelim_orig = $smarty->left_delimiter;
+ $_rdelim_orig = $smarty->right_delimiter;
+
+ $smarty->left_delimiter = '{';
+ $smarty->right_delimiter = '}';
+
+ $_compile_id_orig = $smarty->_compile_id;
+ $smarty->_compile_id = null;
+
+ $_compile_path = $smarty->_get_compile_path($smarty->debug_tpl);
+ if ($smarty->_compile_resource($smarty->debug_tpl, $_compile_path))
+ {
+ ob_start();
+ $smarty->_include($_compile_path);
+ $_results = ob_get_contents();
+ ob_end_clean();
+ } else {
+ $_results = '';
+ }
+
+ $smarty->_compile_id = $_compile_id_orig;
+
+ $smarty->left_delimiter = $_ldelim_orig;
+ $smarty->right_delimiter = $_rdelim_orig;
+
+ return $_results;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.display_debug_console.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.get_include_path.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.get_include_path.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.get_include_path.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,44 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Get path to file from include_path
+ *
+ * @param string $file_path
+ * @param string $new_file_path
+ * @return boolean
+ * @staticvar array|null
+ */
+
+// $file_path, &$new_file_path
+
+function smarty_core_get_include_path(&$params, &$smarty)
+{
+ static $_path_array = null;
+
+ if(!isset($_path_array)) {
+ $_ini_include_path = ini_get('include_path');
+
+ if(strstr($_ini_include_path,';')) {
+ // windows pathnames
+ $_path_array = explode(';',$_ini_include_path);
+ } else {
+ $_path_array = explode(':',$_ini_include_path);
+ }
+ }
+ foreach ($_path_array as $_include_path) {
+ if (@is_readable($_include_path . DIRECTORY_SEPARATOR . $params['file_path'])) {
+ $params['new_file_path'] = $_include_path . DIRECTORY_SEPARATOR . $params['file_path'];
+ return true;
+ }
+ }
+ return false;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.get_include_path.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.get_microtime.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.get_microtime.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.get_microtime.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Get seconds and microseconds
+ * @return double
+ */
+function smarty_core_get_microtime($params, &$smarty)
+{
+ $mtime = microtime();
+ $mtime = explode(" ", $mtime);
+ $mtime = (double)($mtime[1]) + (double)($mtime[0]);
+ return ($mtime);
+}
+
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.get_microtime.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.get_php_resource.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.get_php_resource.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.get_php_resource.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,80 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Retrieves PHP script resource
+ *
+ * sets $php_resource to the returned resource
+ * @param string $resource
+ * @param string $resource_type
+ * @param $php_resource
+ * @return boolean
+ */
+
+function smarty_core_get_php_resource(&$params, &$smarty)
+{
+
+ $params['resource_base_path'] = $smarty->trusted_dir;
+ $smarty->_parse_resource_name($params, $smarty);
+
+ /*
+ * Find out if the resource exists.
+ */
+
+ if ($params['resource_type'] == 'file') {
+ $_readable = false;
+ if(file_exists($params['resource_name']) && is_readable($params['resource_name'])) {
+ $_readable = true;
+ } else {
+ // test for file in include_path
+ $_params = array('file_path' => $params['resource_name']);
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_include_path.php');
+ if(smarty_core_get_include_path($_params, $smarty)) {
+ $_include_path = $_params['new_file_path'];
+ $_readable = true;
+ }
+ }
+ } else if ($params['resource_type'] != 'file') {
+ $_template_source = null;
+ $_readable = is_callable($smarty->_plugins['resource'][$params['resource_type']][0][0])
+ && call_user_func_array($smarty->_plugins['resource'][$params['resource_type']][0][0],
+ array($params['resource_name'], &$_template_source, &$smarty));
+ }
+
+ /*
+ * Set the error function, depending on which class calls us.
+ */
+ if (method_exists($smarty, '_syntax_error')) {
+ $_error_funcc = '_syntax_error';
+ } else {
+ $_error_funcc = 'trigger_error';
+ }
+
+ if ($_readable) {
+ if ($smarty->security) {
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.is_trusted.php');
+ if (!smarty_core_is_trusted($params, $smarty)) {
+ $smarty->$_error_funcc('(secure mode) ' . $params['resource_type'] . ':' . $params['resource_name'] . ' is not trusted');
+ return false;
+ }
+ }
+ } else {
+ $smarty->$_error_funcc($params['resource_type'] . ':' . $params['resource_name'] . ' is not readable');
+ return false;
+ }
+
+ if ($params['resource_type'] == 'file') {
+ $params['php_resource'] = $params['resource_name'];
+ } else {
+ $params['php_resource'] = $_template_source;
+ }
+ return true;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.get_php_resource.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.is_secure.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.is_secure.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.is_secure.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,56 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * determines if a resource is secure or not.
+ *
+ * @param string $resource_type
+ * @param string $resource_name
+ * @return boolean
+ */
+
+// $resource_type, $resource_name
+
+function smarty_core_is_secure($params, &$smarty)
+{
+ if (!$smarty->security || $smarty->security_settings['INCLUDE_ANY']) {
+ return true;
+ }
+
+ if ($params['resource_type'] == 'file') {
+ $_rp = realpath($params['resource_name']);
+ if (isset($params['resource_base_path'])) {
+ foreach ((array)$params['resource_base_path'] as $curr_dir) {
+ if ( ($_cd = realpath($curr_dir)) !== false &&
+ strncmp($_rp, $_cd, strlen($_cd)) == 0 &&
+ $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR ) {
+ return true;
+ }
+ }
+ }
+ if (!empty($smarty->secure_dir)) {
+ foreach ((array)$smarty->secure_dir as $curr_dir) {
+ if ( ($_cd = realpath($curr_dir)) !== false &&
+ strncmp($_rp, $_cd, strlen($_cd)) == 0 &&
+ $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR ) {
+ return true;
+ }
+ }
+ }
+ } else {
+ // resource is not on local file system
+ return call_user_func_array(
+ $smarty->_plugins['resource'][$params['resource_type']][0][2],
+ array($params['resource_name'], &$smarty));
+ }
+
+ return false;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.is_secure.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.is_trusted.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.is_trusted.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.is_trusted.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,47 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * determines if a resource is trusted or not
+ *
+ * @param string $resource_type
+ * @param string $resource_name
+ * @return boolean
+ */
+
+ // $resource_type, $resource_name
+
+function smarty_core_is_trusted($params, &$smarty)
+{
+ $_smarty_trusted = false;
+ if ($params['resource_type'] == 'file') {
+ if (!empty($smarty->trusted_dir)) {
+ $_rp = realpath($params['resource_name']);
+ foreach ((array)$smarty->trusted_dir as $curr_dir) {
+ if (!empty($curr_dir) && is_readable ($curr_dir)) {
+ $_cd = realpath($curr_dir);
+ if (strncmp($_rp, $_cd, strlen($_cd)) == 0
+ && $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR ) {
+ $_smarty_trusted = true;
+ break;
+ }
+ }
+ }
+ }
+
+ } else {
+ // resource is not on local file system
+ $_smarty_trusted = call_user_func_array($smarty->_plugins['resource'][$params['resource_type']][0][3],
+ array($params['resource_name'], $smarty));
+ }
+
+ return $_smarty_trusted;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.is_trusted.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.load_plugins.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.load_plugins.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.load_plugins.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,125 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Load requested plugins
+ *
+ * @param array $plugins
+ */
+
+// $plugins
+
+function smarty_core_load_plugins($params, &$smarty)
+{
+
+ foreach ($params['plugins'] as $_plugin_info) {
+ list($_type, $_name, $_tpl_file, $_tpl_line, $_delayed_loading) = $_plugin_info;
+ $_plugin = &$smarty->_plugins[$_type][$_name];
+
+ /*
+ * We do not load plugin more than once for each instance of Smarty.
+ * The following code checks for that. The plugin can also be
+ * registered dynamically at runtime, in which case template file
+ * and line number will be unknown, so we fill them in.
+ *
+ * The final element of the info array is a flag that indicates
+ * whether the dynamically registered plugin function has been
+ * checked for existence yet or not.
+ */
+ if (isset($_plugin)) {
+ if (empty($_plugin[3])) {
+ if (!is_callable($_plugin[0])) {
+ $smarty->_trigger_fatal_error("[plugin] $_type '$_name' is not implemented", $_tpl_file, $_tpl_line, __FILE__, __LINE__);
+ } else {
+ $_plugin[1] = $_tpl_file;
+ $_plugin[2] = $_tpl_line;
+ $_plugin[3] = true;
+ if (!isset($_plugin[4])) $_plugin[4] = true; /* cacheable */
+ }
+ }
+ continue;
+ } else if ($_type == 'insert') {
+ /*
+ * For backwards compatibility, we check for insert functions in
+ * the symbol table before trying to load them as a plugin.
+ */
+ $_plugin_func = 'insert_' . $_name;
+ if (function_exists($_plugin_func)) {
+ $_plugin = array($_plugin_func, $_tpl_file, $_tpl_line, true, false);
+ continue;
+ }
+ }
+
+ $_plugin_file = $smarty->_get_plugin_filepath($_type, $_name);
+
+ if (! $_found = ($_plugin_file != false)) {
+ $_message = "could not load plugin file '$_type.$_name.php'\n";
+ }
+
+ /*
+ * If plugin file is found, it -must- provide the properly named
+ * plugin function. In case it doesn't, simply output the error and
+ * do not fall back on any other method.
+ */
+ if ($_found) {
+ include_once $_plugin_file;
+
+ $_plugin_func = 'smarty_' . $_type . '_' . $_name;
+ if (!function_exists($_plugin_func)) {
+ $smarty->_trigger_fatal_error("[plugin] function $_plugin_func() not found in $_plugin_file", $_tpl_file, $_tpl_line, __FILE__, __LINE__);
+ continue;
+ }
+ }
+ /*
+ * In case of insert plugins, their code may be loaded later via
+ * 'script' attribute.
+ */
+ else if ($_type == 'insert' && $_delayed_loading) {
+ $_plugin_func = 'smarty_' . $_type . '_' . $_name;
+ $_found = true;
+ }
+
+ /*
+ * Plugin specific processing and error checking.
+ */
+ if (!$_found) {
+ if ($_type == 'modifier') {
+ /*
+ * In case modifier falls back on using PHP functions
+ * directly, we only allow those specified in the security
+ * context.
+ */
+ if ($smarty->security && !in_array($_name, $smarty->security_settings['MODIFIER_FUNCS'])) {
+ $_message = "(secure mode) modifier '$_name' is not allowed";
+ } else {
+ if (!function_exists($_name)) {
+ $_message = "modifier '$_name' is not implemented";
+ } else {
+ $_plugin_func = $_name;
+ $_found = true;
+ }
+ }
+ } else if ($_type == 'function') {
+ /*
+ * This is a catch-all situation.
+ */
+ $_message = "unknown tag - '$_name'";
+ }
+ }
+
+ if ($_found) {
+ $smarty->_plugins[$_type][$_name] = array($_plugin_func, $_tpl_file, $_tpl_line, true, true);
+ } else {
+ // output error
+ $smarty->_trigger_fatal_error('[plugin] ' . $_message, $_tpl_file, $_tpl_line, __FILE__, __LINE__);
+ }
+ }
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.load_plugins.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.load_resource_plugin.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.load_resource_plugin.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.load_resource_plugin.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,74 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * load a resource plugin
+ *
+ * @param string $type
+ */
+
+// $type
+
+function smarty_core_load_resource_plugin($params, &$smarty)
+{
+ /*
+ * Resource plugins are not quite like the other ones, so they are
+ * handled differently. The first element of plugin info is the array of
+ * functions provided by the plugin, the second one indicates whether
+ * all of them exist or not.
+ */
+
+ $_plugin = &$smarty->_plugins['resource'][$params['type']];
+ if (isset($_plugin)) {
+ if (!$_plugin[1] && count($_plugin[0])) {
+ $_plugin[1] = true;
+ foreach ($_plugin[0] as $_plugin_func) {
+ if (!is_callable($_plugin_func)) {
+ $_plugin[1] = false;
+ break;
+ }
+ }
+ }
+
+ if (!$_plugin[1]) {
+ $smarty->_trigger_fatal_error("[plugin] resource '" . $params['type'] . "' is not implemented", null, null, __FILE__, __LINE__);
+ }
+
+ return;
+ }
+
+ $_plugin_file = $smarty->_get_plugin_filepath('resource', $params['type']);
+ $_found = ($_plugin_file != false);
+
+ if ($_found) { /*
+ * If the plugin file is found, it -must- provide the properly named
+ * plugin functions.
+ */
+ include_once($_plugin_file);
+
+ /*
+ * Locate functions that we require the plugin to provide.
+ */
+ $_resource_ops = array('source', 'timestamp', 'secure', 'trusted');
+ $_resource_funcs = array();
+ foreach ($_resource_ops as $_op) {
+ $_plugin_func = 'smarty_resource_' . $params['type'] . '_' . $_op;
+ if (!function_exists($_plugin_func)) {
+ $smarty->_trigger_fatal_error("[plugin] function $_plugin_func() not found in $_plugin_file", null, null, __FILE__, __LINE__);
+ return;
+ } else {
+ $_resource_funcs[] = $_plugin_func;
+ }
+ }
+
+ $smarty->_plugins['resource'][$params['type']] = array($_resource_funcs, true);
+ }
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.load_resource_plugin.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.process_cached_inserts.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.process_cached_inserts.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.process_cached_inserts.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Replace cached inserts with the actual results
+ *
+ * @param string $results
+ * @return string
+ */
+function smarty_core_process_cached_inserts($params, &$smarty)
+{
+ preg_match_all('!'.$smarty->_smarty_md5.'{insert_cache (.*)}'.$smarty->_smarty_md5.'!Uis',
+ $params['results'], $match);
+ list($cached_inserts, $insert_args) = $match;
+
+ for ($i = 0, $for_max = count($cached_inserts); $i < $for_max; $i++) {
+ if ($smarty->debugging) {
+ $_params = array();
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php');
+ $debug_start_time = smarty_core_get_microtime($_params, $smarty);
+ }
+
+ $args = unserialize($insert_args[$i]);
+ $name = $args['name'];
+
+ if (isset($args['script'])) {
+ $_params = array('resource_name' => $smarty->_dequote($args['script']));
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_php_resource.php');
+ if(!smarty_core_get_php_resource($_params, $smarty)) {
+ return false;
+ }
+ $resource_type = $_params['resource_type'];
+ $php_resource = $_params['php_resource'];
+
+
+ if ($resource_type == 'file') {
+ $smarty->_include($php_resource, true);
+ } else {
+ $smarty->_eval($php_resource);
+ }
+ }
+
+ $function_name = $smarty->_plugins['insert'][$name][0];
+ if (empty($args['assign'])) {
+ $replace = $function_name($args, $smarty);
+ } else {
+ $smarty->assign($args['assign'], $function_name($args, $smarty));
+ $replace = '';
+ }
+
+ $params['results'] = str_replace($cached_inserts[$i], $replace, $params['results']);
+ if ($smarty->debugging) {
+ $_params = array();
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php');
+ $smarty->_smarty_debug_info[] = array('type' => 'insert',
+ 'filename' => 'insert_'.$name,
+ 'depth' => $smarty->_inclusion_depth,
+ 'exec_time' => smarty_core_get_microtime($_params, $smarty) - $debug_start_time);
+ }
+ }
+
+ return $params['results'];
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.process_cached_inserts.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.process_compiled_include.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.process_compiled_include.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.process_compiled_include.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Replace nocache-tags by results of the corresponding non-cacheable
+ * functions and return it
+ *
+ * @param string $compiled_tpl
+ * @param string $cached_source
+ * @return string
+ */
+
+function smarty_core_process_compiled_include($params, &$smarty)
+{
+ $_cache_including = $smarty->_cache_including;
+ $smarty->_cache_including = true;
+
+ $_return = $params['results'];
+ foreach ($smarty->_cache_serials as $_include_file_path=>$_cache_serial) {
+ $_return = preg_replace_callback('!(\{nocache\:('.$_cache_serial.')#(\d+)\})!s',
+ array(&$smarty, '_process_compiled_include_callback'),
+ $_return);
+ }
+ $smarty->_cache_including = $_cache_including;
+ return $_return;
+}
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.process_compiled_include.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.read_cache_file.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.read_cache_file.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.read_cache_file.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,111 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * read a cache file, determine if it needs to be
+ * regenerated or not
+ *
+ * @param string $tpl_file
+ * @param string $cache_id
+ * @param string $compile_id
+ * @param string $results
+ * @return boolean
+ */
+
+// $tpl_file, $cache_id, $compile_id, &$results
+
+function smarty_core_read_cache_file(&$params, &$smarty)
+{
+ static $content_cache = array();
+
+ if ($smarty->force_compile) {
+ // force compile enabled, always regenerate
+ return false;
+ }
+
+ if (isset($content_cache[$params['tpl_file'].','.$params['cache_id'].','.$params['compile_id']])) {
+ list($params['results'], $smarty->_cache_info) = $content_cache[$params['tpl_file'].','.$params['cache_id'].','.$params['compile_id']];
+ return true;
+ }
+
+ if (!empty($smarty->cache_handler_func)) {
+ // use cache_handler function
+ call_user_func_array($smarty->cache_handler_func,
+ array('read', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id'], null));
+ } else {
+ // use local cache file
+ $_auto_id = $smarty->_get_auto_id($params['cache_id'], $params['compile_id']);
+ $_cache_file = $smarty->_get_auto_filename($smarty->cache_dir, $params['tpl_file'], $_auto_id);
+ $params['results'] = $smarty->_read_file($_cache_file);
+ }
+
+ if (empty($params['results'])) {
+ // nothing to parse (error?), regenerate cache
+ return false;
+ }
+
+ $cache_split = explode("\n", $params['results'], 2);
+ $cache_header = $cache_split[0];
+
+ $_cache_info = unserialize($cache_header);
+
+ if ($smarty->caching == 2 && isset ($_cache_info['expires'])){
+ // caching by expiration time
+ if ($_cache_info['expires'] > -1 && (time() > $_cache_info['expires'])) {
+ // cache expired, regenerate
+ return false;
+ }
+ } else {
+ // caching by lifetime
+ if ($smarty->cache_lifetime > -1 && (time() - $_cache_info['timestamp'] > $smarty->cache_lifetime)) {
+ // cache expired, regenerate
+ return false;
+ }
+ }
+
+ if ($smarty->compile_check) {
+ $_params = array('get_source' => false, 'quiet'=>true);
+ foreach (array_keys($_cache_info['template']) as $_template_dep) {
+ $_params['resource_name'] = $_template_dep;
+ if (!$smarty->_fetch_resource_info($_params) || $_cache_info['timestamp'] < $_params['resource_timestamp']) {
+ // template file has changed, regenerate cache
+ return false;
+ }
+ }
+
+ if (isset($_cache_info['config'])) {
+ $_params = array('resource_base_path' => $smarty->config_dir, 'get_source' => false, 'quiet'=>true);
+ foreach (array_keys($_cache_info['config']) as $_config_dep) {
+ $_params['resource_name'] = $_config_dep;
+ if (!$smarty->_fetch_resource_info($_params) || $_cache_info['timestamp'] < $_params['resource_timestamp']) {
+ // config file has changed, regenerate cache
+ return false;
+ }
+ }
+ }
+ }
+
+ foreach ($_cache_info['cache_serials'] as $_include_file_path=>$_cache_serial) {
+ if (empty($smarty->_cache_serials[$_include_file_path])) {
+ $smarty->_include($_include_file_path, true);
+ }
+
+ if ($smarty->_cache_serials[$_include_file_path] != $_cache_serial) {
+ /* regenerate */
+ return false;
+ }
+ }
+ $params['results'] = $cache_split[1];
+ $content_cache[$params['tpl_file'].','.$params['cache_id'].','.$params['compile_id']] = array($params['results'], $_cache_info);
+
+ $smarty->_cache_info = $_cache_info;
+ return true;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.read_cache_file.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.rm_auto.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.rm_auto.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.rm_auto.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * delete an automagically created file by name and id
+ *
+ * @param string $auto_base
+ * @param string $auto_source
+ * @param string $auto_id
+ * @param integer $exp_time
+ * @return boolean
+ */
+
+// $auto_base, $auto_source = null, $auto_id = null, $exp_time = null
+
+function smarty_core_rm_auto($params, &$smarty)
+{
+ if (!@is_dir($params['auto_base']))
+ return false;
+
+ if(!isset($params['auto_id']) && !isset($params['auto_source'])) {
+ $_params = array(
+ 'dirname' => $params['auto_base'],
+ 'level' => 0,
+ 'exp_time' => $params['exp_time']
+ );
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.rmdir.php');
+ $_res = smarty_core_rmdir($_params, $smarty);
+ } else {
+ $_tname = $smarty->_get_auto_filename($params['auto_base'], $params['auto_source'], $params['auto_id']);
+
+ if(isset($params['auto_source'])) {
+ if (isset($params['extensions'])) {
+ $_res = false;
+ foreach ((array)$params['extensions'] as $_extension)
+ $_res |= $smarty->_unlink($_tname.$_extension, $params['exp_time']);
+ } else {
+ $_res = $smarty->_unlink($_tname, $params['exp_time']);
+ }
+ } elseif ($smarty->use_sub_dirs) {
+ $_params = array(
+ 'dirname' => $_tname,
+ 'level' => 1,
+ 'exp_time' => $params['exp_time']
+ );
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.rmdir.php');
+ $_res = smarty_core_rmdir($_params, $smarty);
+ } else {
+ // remove matching file names
+ $_handle = opendir($params['auto_base']);
+ $_res = true;
+ while (false !== ($_filename = readdir($_handle))) {
+ if($_filename == '.' || $_filename == '..') {
+ continue;
+ } elseif (substr($params['auto_base'] . DIRECTORY_SEPARATOR . $_filename, 0, strlen($_tname)) == $_tname) {
+ $_res &= (bool)$smarty->_unlink($params['auto_base'] . DIRECTORY_SEPARATOR . $_filename, $params['exp_time']);
+ }
+ }
+ }
+ }
+
+ return $_res;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.rm_auto.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.rmdir.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.rmdir.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.rmdir.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * delete a dir recursively (level=0 -> keep root)
+ * WARNING: no tests, it will try to remove what you tell it!
+ *
+ * @param string $dirname
+ * @param integer $level
+ * @param integer $exp_time
+ * @return boolean
+ */
+
+// $dirname, $level = 1, $exp_time = null
+
+function smarty_core_rmdir($params, &$smarty)
+{
+ if(!isset($params['level'])) { $params['level'] = 1; }
+ if(!isset($params['exp_time'])) { $params['exp_time'] = null; }
+
+ if($_handle = @opendir($params['dirname'])) {
+
+ while (false !== ($_entry = readdir($_handle))) {
+ if ($_entry != '.' && $_entry != '..') {
+ if (@is_dir($params['dirname'] . DIRECTORY_SEPARATOR . $_entry)) {
+ $_params = array(
+ 'dirname' => $params['dirname'] . DIRECTORY_SEPARATOR . $_entry,
+ 'level' => $params['level'] + 1,
+ 'exp_time' => $params['exp_time']
+ );
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.rmdir.php');
+ smarty_core_rmdir($_params, $smarty);
+ }
+ else {
+ $smarty->_unlink($params['dirname'] . DIRECTORY_SEPARATOR . $_entry, $params['exp_time']);
+ }
+ }
+ }
+ closedir($_handle);
+ }
+
+ if ($params['level']) {
+ return @rmdir($params['dirname']);
+ }
+ return (bool)$_handle;
+
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.rmdir.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.run_insert_handler.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.run_insert_handler.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.run_insert_handler.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Handle insert tags
+ *
+ * @param array $args
+ * @return string
+ */
+function smarty_core_run_insert_handler($params, &$smarty)
+{
+
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php');
+ if ($smarty->debugging) {
+ $_params = array();
+ $_debug_start_time = smarty_core_get_microtime($_params, $smarty);
+ }
+
+ if ($smarty->caching) {
+ $_arg_string = serialize($params['args']);
+ $_name = $params['args']['name'];
+ if (!isset($smarty->_cache_info['insert_tags'][$_name])) {
+ $smarty->_cache_info['insert_tags'][$_name] = array('insert',
+ $_name,
+ $smarty->_plugins['insert'][$_name][1],
+ $smarty->_plugins['insert'][$_name][2],
+ !empty($params['args']['script']) ? true : false);
+ }
+ return $smarty->_smarty_md5."{insert_cache $_arg_string}".$smarty->_smarty_md5;
+ } else {
+ if (isset($params['args']['script'])) {
+ $_params = array('resource_name' => $smarty->_dequote($params['args']['script']));
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_php_resource.php');
+ if(!smarty_core_get_php_resource($_params, $smarty)) {
+ return false;
+ }
+
+ if ($_params['resource_type'] == 'file') {
+ $smarty->_include($_params['php_resource'], true);
+ } else {
+ $smarty->_eval($_params['php_resource']);
+ }
+ unset($params['args']['script']);
+ }
+
+ $_funcname = $smarty->_plugins['insert'][$params['args']['name']][0];
+ $_content = $_funcname($params['args'], $smarty);
+ if ($smarty->debugging) {
+ $_params = array();
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php');
+ $smarty->_smarty_debug_info[] = array('type' => 'insert',
+ 'filename' => 'insert_'.$params['args']['name'],
+ 'depth' => $smarty->_inclusion_depth,
+ 'exec_time' => smarty_core_get_microtime($_params, $smarty) - $_debug_start_time);
+ }
+
+ if (!empty($params['args']["assign"])) {
+ $smarty->assign($params['args']["assign"], $_content);
+ } else {
+ return $_content;
+ }
+ }
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.run_insert_handler.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.smarty_include_php.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.smarty_include_php.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.smarty_include_php.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,50 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * called for included php files within templates
+ *
+ * @param string $smarty_file
+ * @param string $smarty_assign variable to assign the included template's
+ * output into
+ * @param boolean $smarty_once uses include_once if this is true
+ * @param array $smarty_include_vars associative array of vars from
+ * {include file="blah" var=$var}
+ */
+
+// $file, $assign, $once, $_smarty_include_vars
+
+function smarty_core_smarty_include_php($params, &$smarty)
+{
+ $_params = array('resource_name' => $params['smarty_file']);
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_php_resource.php');
+ smarty_core_get_php_resource($_params, $smarty);
+ $_smarty_resource_type = $_params['resource_type'];
+ $_smarty_php_resource = $_params['php_resource'];
+
+ if (!empty($params['smarty_assign'])) {
+ ob_start();
+ if ($_smarty_resource_type == 'file') {
+ $smarty->_include($_smarty_php_resource, $params['smarty_once'], $params['smarty_include_vars']);
+ } else {
+ $smarty->_eval($_smarty_php_resource, $params['smarty_include_vars']);
+ }
+ $smarty->assign($params['smarty_assign'], ob_get_contents());
+ ob_end_clean();
+ } else {
+ if ($_smarty_resource_type == 'file') {
+ $smarty->_include($_smarty_php_resource, $params['smarty_once'], $params['smarty_include_vars']);
+ } else {
+ $smarty->_eval($_smarty_php_resource, $params['smarty_include_vars']);
+ }
+ }
+}
+
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.smarty_include_php.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_cache_file.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_cache_file.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_cache_file.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,73 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Prepend the cache information to the cache file
+ * and write it
+ *
+ * @param string $tpl_file
+ * @param string $cache_id
+ * @param string $compile_id
+ * @param string $results
+ * @return true|null
+ */
+
+ // $tpl_file, $cache_id, $compile_id, $results
+
+function smarty_core_write_cache_file($params, &$smarty)
+{
+
+ // put timestamp in cache header
+ $smarty->_cache_info['timestamp'] = time();
+ if ($smarty->cache_lifetime > -1){
+ // expiration set
+ $smarty->_cache_info['expires'] = $smarty->_cache_info['timestamp'] + $smarty->cache_lifetime;
+ } else {
+ // cache will never expire
+ $smarty->_cache_info['expires'] = -1;
+ }
+
+ // collapse {nocache...}-tags
+ $params['results'] = preg_replace('!((\{nocache\:([0-9a-f]{32})#(\d+)\})'
+ .'.*'
+ .'{/nocache\:\\3#\\4\})!Us'
+ ,'\\2'
+ ,$params['results']);
+ $smarty->_cache_info['cache_serials'] = $smarty->_cache_serials;
+
+ // prepend the cache header info into cache file
+ $params['results'] = serialize($smarty->_cache_info)."\n".$params['results'];
+
+ if (!empty($smarty->cache_handler_func)) {
+ // use cache_handler function
+ call_user_func_array($smarty->cache_handler_func,
+ array('write', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id'], null));
+ } else {
+ // use local cache file
+
+ if(!@is_writable($smarty->cache_dir)) {
+ // cache_dir not writable, see if it exists
+ if(!@is_dir($smarty->cache_dir)) {
+ $smarty->trigger_error('the $cache_dir \'' . $smarty->cache_dir . '\' does not exist, or is not a directory.', E_USER_ERROR);
+ return false;
+ }
+ $smarty->trigger_error('unable to write to $cache_dir \'' . realpath($smarty->cache_dir) . '\'. Be sure $cache_dir is writable by the web server user.', E_USER_ERROR);
+ return false;
+ }
+
+ $_auto_id = $smarty->_get_auto_id($params['cache_id'], $params['compile_id']);
+ $_cache_file = $smarty->_get_auto_filename($smarty->cache_dir, $params['tpl_file'], $_auto_id);
+ $_params = array('filename' => $_cache_file, 'contents' => $params['results'], 'create_dirs' => true);
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_file.php');
+ smarty_core_write_file($_params, $smarty);
+ return true;
+ }
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_cache_file.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_compiled_include.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_compiled_include.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_compiled_include.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,78 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Extract non-cacheable parts out of compiled template and write it
+ *
+ * @param string $compile_path
+ * @param string $template_compiled
+ * @return boolean
+ */
+
+function smarty_core_write_compiled_include($params, &$smarty)
+{
+ $_tag_start = 'if \(\$this->caching\) \{ echo \'\{nocache\:('.$params['cache_serial'].')#(\d+)\}\';\}';
+ $_tag_end = 'if \(\$this->caching\) \{ echo \'\{/nocache\:(\\2)#(\\3)\}\';\}';
+
+ preg_match_all('!('.$_tag_start.'(.*)'.$_tag_end.')!Us',
+ $params['compiled_content'], $_match_source, PREG_SET_ORDER);
+
+ // no nocache-parts found: done
+ if (count($_match_source)==0) return;
+
+ // convert the matched php-code to functions
+ $_include_compiled = "<?php /* funky header here */\n\n";
+
+ $_compile_path = $params['include_file_path'];
+
+ $smarty->_cache_serials[$_compile_path] = $params['cache_serial'];
+ $_include_compiled .= "\$this->_cache_serials['".$_compile_path."'] = '".$params['cache_serial']."';\n\n?>";
+
+ $_include_compiled .= $params['plugins_code'];
+ $_include_compiled .= "<?php";
+
+ $this_varname = ((double)phpversion() >= 5.0) ? '_smarty' : 'this';
+ for ($_i = 0, $_for_max = count($_match_source); $_i < $_for_max; $_i++) {
+ $_match =& $_match_source[$_i];
+ $source = $_match[4];
+ if ($this_varname == '_smarty') {
+ /* rename $this to $_smarty in the sourcecode */
+ $tokens = token_get_all('<?php ' . $_match[4]);
+ array_shift($tokens); /* remove the opening <.?.php */
+ for ($i=0, $count = count($tokens); $i < $count; $i++) {
+ if (is_array($tokens[$i])) {
+ if ($tokens[$i][0] == T_VARIABLE && $tokens[$i][1] == '$this') {
+ $tokens[$i] = '$' . $this_varname;
+ } else {
+ $tokens[$i] = $tokens[$i][1];
+ }
+ }
+ }
+ $source = implode('', $tokens);
+ }
+
+ /* add function to compiled include */
+ $_include_compiled .= "
+function _smarty_tplfunc_$_match[2]_$_match[3](&\$$this_varname)
+{
+$source
+}
+
+";
+ }
+ $_include_compiled .= "\n\n?>\n";
+
+ $_params = array('filename' => $_compile_path,
+ 'contents' => $_include_compiled, 'create_dirs' => true);
+
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_file.php');
+ smarty_core_write_file($_params, $smarty);
+ return true;
+}
+
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_compiled_include.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_compiled_resource.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_compiled_resource.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_compiled_resource.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * write the compiled resource
+ *
+ * @param string $compile_path
+ * @param string $compiled_content
+ * @return true
+ */
+function smarty_core_write_compiled_resource($params, &$smarty)
+{
+ if(!@is_writable($smarty->compile_dir)) {
+ // compile_dir not writable, see if it exists
+ if(!@is_dir($smarty->compile_dir)) {
+ $smarty->trigger_error('the $compile_dir \'' . $smarty->compile_dir . '\' does not exist, or is not a directory.', E_USER_ERROR);
+ return false;
+ }
+ $smarty->trigger_error('unable to write to $compile_dir \'' . realpath($smarty->compile_dir) . '\'. Be sure $compile_dir is writable by the web server user.', E_USER_ERROR);
+ return false;
+ }
+
+ $_params = array('filename' => $params['compile_path'], 'contents' => $params['compiled_content'], 'create_dirs' => true);
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_file.php');
+ smarty_core_write_file($_params, $smarty);
+ return true;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_compiled_resource.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_file.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_file.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_file.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,54 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * write out a file to disk
+ *
+ * @param string $filename
+ * @param string $contents
+ * @param boolean $create_dirs
+ * @return boolean
+ */
+function smarty_core_write_file($params, &$smarty)
+{
+ $_dirname = dirname($params['filename']);
+
+ if ($params['create_dirs']) {
+ $_params = array('dir' => $_dirname);
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.create_dir_structure.php');
+ smarty_core_create_dir_structure($_params, $smarty);
+ }
+
+ // write to tmp file, then rename it to avoid
+ // file locking race condition
+ $_tmp_file = tempnam($_dirname, 'wrt');
+
+ if (!($fd = @fopen($_tmp_file, 'wb'))) {
+ $_tmp_file = $_dirname . DIRECTORY_SEPARATOR . uniqid('wrt');
+ if (!($fd = @fopen($_tmp_file, 'wb'))) {
+ $smarty->trigger_error("problem writing temporary file '$_tmp_file'");
+ return false;
+ }
+ }
+
+ fwrite($fd, $params['contents']);
+ fclose($fd);
+
+ // Delete the file if it allready exists (this is needed on Win,
+ // because it cannot overwrite files with rename()
+ if (file_exists($params['filename'])) {
+ @unlink($params['filename']);
+ }
+ @rename($_tmp_file, $params['filename']);
+ @chmod($params['filename'], $smarty->_file_perms);
+
+ return true;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/core.write_file.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/core/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/debug.tpl
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/debug.tpl 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/debug.tpl 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,64 @@
+{* Smarty *}
+
+{* debug.tpl, last updated version 2.0.1 *}
+
+{assign_debug_info}
+
+{if isset($_smarty_debug_output) and $_smarty_debug_output eq "html"}
+ <table border=0 width=100%>
+ <tr bgcolor=#cccccc><th colspan=2>Smarty Debug Console</th></tr>
+ <tr bgcolor=#cccccc><td colspan=2><b>included templates & config files (load time in seconds):</b></td></tr>
+ {section name=templates loop=$_debug_tpls}
+ <tr bgcolor={if %templates.index% is even}#eeeeee{else}#fafafa{/if}><td colspan=2><tt>{section name=indent loop=$_debug_tpls[templates].depth} {/section}<font color={if $_debug_tpls[templates].type eq "template"}brown{elseif $_debug_tpls[templates].type eq "insert"}black{else}green{/if}>{$_debug_tpls[templates].filename|escape:html}</font>{if isset($_debug_tpls[templates].exec_time)} <font size=-1><i>({$_debug_tpls[templates].exec_time|string_format:"%.5f"}){if %templates.index% eq 0} (total){/if}</i></font>{/if}</tt></td></tr>
+ {sectionelse}
+ <tr bgcolor=#eeeeee><td colspan=2><tt><i>no templates included</i></tt></td></tr>
+ {/section}
+ <tr bgcolor=#cccccc><td colspan=2><b>assigned template variables:</b></td></tr>
+ {section name=vars loop=$_debug_keys}
+ <tr bgcolor={if %vars.index% is even}#eeeeee{else}#fafafa{/if}><td valign=top><tt><font color=blue>{ldelim}${$_debug_keys[vars]}{rdelim}</font></tt></td><td nowrap><tt><font color=green>{$_debug_vals[vars]|@debug_print_var}</font></tt></td></tr>
+ {sectionelse}
+ <tr bgcolor=#eeeeee><td colspan=2><tt><i>no template variables assigned</i></tt></td></tr>
+ {/section}
+ <tr bgcolor=#cccccc><td colspan=2><b>assigned config file variables (outer template scope):</b></td></tr>
+ {section name=config_vars loop=$_debug_config_keys}
+ <tr bgcolor={if %config_vars.index% is even}#eeeeee{else}#fafafa{/if}><td valign=top><tt><font color=maroon>{ldelim}#{$_debug_config_keys[config_vars]}#{rdelim}</font></tt></td><td><tt><font color=green>{$_debug_config_vals[config_vars]|@debug_print_var}</font></tt></td></tr>
+ {sectionelse}
+ <tr bgcolor=#eeeeee><td colspan=2><tt><i>no config vars assigned</i></tt></td></tr>
+ {/section}
+ </table>
+</BODY></HTML>
+{else}
+<SCRIPT language=javascript>
+ if( self.name == '' ) {ldelim}
+ var title = 'Console';
+ {rdelim}
+ else {ldelim}
+ var title = 'Console_' + self.name;
+ {rdelim}
+ _smarty_console = window.open("",title.value,"width=680,height=600,resizable,scrollbars=yes");
+ _smarty_console.document.write("<HTML><TITLE>Smarty Debug Console_"+self.name+"</TITLE><BODY bgcolor=#ffffff>");
+ _smarty_console.document.write("<table border=0 width=100%>");
+ _smarty_console.document.write("<tr bgcolor=#cccccc><th colspan=2>Smarty Debug Console</th></tr>");
+ _smarty_console.document.write("<tr bgcolor=#cccccc><td colspan=2><b>included templates & config files (load time in seconds):</b></td></tr>");
+ {section name=templates loop=$_debug_tpls}
+ _smarty_console.document.write("<tr bgcolor={if %templates.index% is even}#eeeeee{else}#fafafa{/if}><td colspan=2><tt>{section name=indent loop=$_debug_tpls[templates].depth} {/section}<font color={if $_debug_tpls[templates].type eq "template"}brown{elseif $_debug_tpls[templates].type eq "insert"}black{else}green{/if}>{$_debug_tpls[templates].filename|escape:html|escape:javascript}</font>{if isset($_debug_tpls[templates].exec_time)} <font size=-1><i>({$_debug_tpls[templates].exec_time|string_format:"%.5f"}){if %templates.index% eq 0} (total){/if}</i></font>{/if}</tt></td></tr>");
+ {sectionelse}
+ _smarty_console.document.write("<tr bgcolor=#eeeeee><td colspan=2><tt><i>no templates included</i></tt></td></tr>");
+ {/section}
+ _smarty_console.document.write("<tr bgcolor=#cccccc><td colspan=2><b>assigned template variables:</b></td></tr>");
+ {section name=vars loop=$_debug_keys}
+ _smarty_console.document.write("<tr bgcolor={if %vars.index% is even}#eeeeee{else}#fafafa{/if}><td valign=top><tt><font color=blue>{ldelim}${$_debug_keys[vars]}{rdelim}</font></tt></td><td nowrap><tt><font color=green>{$_debug_vals[vars]|@debug_print_var|escape:javascript}</font></tt></td></tr>");
+ {sectionelse}
+ _smarty_console.document.write("<tr bgcolor=#eeeeee><td colspan=2><tt><i>no template variables assigned</i></tt></td></tr>");
+ {/section}
+ _smarty_console.document.write("<tr bgcolor=#cccccc><td colspan=2><b>assigned config file variables (outer template scope):</b></td></tr>");
+ {section name=config_vars loop=$_debug_config_keys}
+ _smarty_console.document.write("<tr bgcolor={if %config_vars.index% is even}#eeeeee{else}#fafafa{/if}><td valign=top><tt><font color=maroon>{ldelim}#{$_debug_config_keys[config_vars]}#{rdelim}</font></tt></td><td><tt><font color=green>{$_debug_config_vals[config_vars]|@debug_print_var|escape:javascript}</font></tt></td></tr>");
+ {sectionelse}
+ _smarty_console.document.write("<tr bgcolor=#eeeeee><td colspan=2><tt><i>no config vars assigned</i></tt></td></tr>");
+ {/section}
+ _smarty_console.document.write("</table>");
+ _smarty_console.document.write("</BODY></HTML>");
+ _smarty_console.document.close();
+</SCRIPT>
+{/if}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/debug.tpl
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/block.textformat.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/block.textformat.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/block.textformat.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,102 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Smarty {textformat}{/textformat} block plugin
+ *
+ * Type: block function<br>
+ * Name: textformat<br>
+ * Purpose: format text a certain way with preset styles
+ * or custom wrap/indent settings<br>
+ * @link http://smarty.php.net/manual/en/language.function.textformat.php {textformat}
+ * (Smarty online manual)
+ * @param array
+ * <pre>
+ * Params: style: string (email)
+ * indent: integer (0)
+ * wrap: integer (80)
+ * wrap_char string ("\n")
+ * indent_char: string (" ")
+ * wrap_boundary: boolean (true)
+ * </pre>
+ * @param string contents of the block
+ * @param Smarty clever simulation of a method
+ * @return string string $content re-formatted
+ */
+function smarty_block_textformat($params, $content, &$smarty)
+{
+ if (is_null($content)) {
+ return;
+ }
+
+ $style = null;
+ $indent = 0;
+ $indent_first = 0;
+ $indent_char = ' ';
+ $wrap = 80;
+ $wrap_char = "\n";
+ $wrap_cut = false;
+ $assign = null;
+
+ foreach ($params as $_key => $_val) {
+ switch ($_key) {
+ case 'style':
+ case 'indent_char':
+ case 'wrap_char':
+ case 'assign':
+ $$_key = (string)$_val;
+ break;
+
+ case 'indent':
+ case 'indent_first':
+ case 'wrap':
+ $$_key = (int)$_val;
+ break;
+
+ case 'wrap_cut':
+ $$_key = (bool)$_val;
+ break;
+
+ default:
+ $smarty->trigger_error("textformat: unknown attribute '$_key'");
+ }
+ }
+
+ if ($style == 'email') {
+ $wrap = 72;
+ }
+
+ // split into paragraphs
+ $_paragraphs = preg_split('![\r\n][\r\n]!',$content);
+ $_output = '';
+
+ for($_x = 0, $_y = count($_paragraphs); $_x < $_y; $_x++) {
+ if ($_paragraphs[$_x] == '') {
+ continue;
+ }
+ // convert mult. spaces & special chars to single space
+ $_paragraphs[$_x] = preg_replace(array('!\s+!','!(^\s+)|(\s+$)!'), array(' ',''), $_paragraphs[$_x]);
+ // indent first line
+ if($indent_first > 0) {
+ $_paragraphs[$_x] = str_repeat($indent_char, $indent_first) . $_paragraphs[$_x];
+ }
+ // wordwrap sentences
+ $_paragraphs[$_x] = wordwrap($_paragraphs[$_x], $wrap - $indent, $wrap_char, $wrap_cut);
+ // indent lines
+ if($indent > 0) {
+ $_paragraphs[$_x] = preg_replace('!^!m', str_repeat($indent_char, $indent), $_paragraphs[$_x]);
+ }
+ }
+ $_output = implode($wrap_char . $wrap_char, $_paragraphs);
+
+ return $assign ? $smarty->assign($assign, $_output) : $_output;
+
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/block.textformat.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/compiler.assign.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/compiler.assign.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/compiler.assign.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,38 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Smarty {assign} compiler function plugin
+ *
+ * Type: compiler function<br>
+ * Name: assign<br>
+ * Purpose: assign a value to a template variable
+ * @link http://smarty.php.net/manual/en/language.custom.functions.php#LANGUAGE.FUNCTION.ASSIGN {assign}
+ * (Smarty online manual)
+ * @param string containing var-attribute and value-attribute
+ * @param Smarty_Compiler
+ */
+function smarty_compiler_assign($tag_attrs, &$compiler)
+{
+ $_params = $compiler->_parse_attrs($tag_attrs);
+
+ if (!isset($_params['var'])) {
+ $compiler->_syntax_error("assign: missing 'var' parameter", E_USER_WARNING);
+ return;
+ }
+
+ if (!isset($_params['value'])) {
+ $compiler->_syntax_error("assign: missing 'value' parameter", E_USER_WARNING);
+ return;
+ }
+
+ return "\$this->assign({$_params['var']}, {$_params['value']});";
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/compiler.assign.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.assign.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.assign.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.assign.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,30 @@
+<?php
+
+/*
+ * Smarty plugin
+ * -------------------------------------------------------------
+ * Type: function
+ * Name: assign
+ * Purpose: assign a value to a template variable
+ * -------------------------------------------------------------
+ */
+function smarty_function_assign($params, &$smarty)
+{
+ extract($params);
+
+ if (empty($var)) {
+ $smarty->trigger_error("assign: missing 'var' parameter");
+ return;
+ }
+
+ if (!in_array('value', array_keys($params))) {
+ $smarty->trigger_error("assign: missing 'value' parameter");
+ return;
+ }
+
+ $smarty->assign($var, $value);
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.assign.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.assign_debug_info.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.assign_debug_info.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.assign_debug_info.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Smarty {assign_debug_info} function plugin
+ *
+ * Type: function<br>
+ * Name: assign_debug_info<br>
+ * Purpose: assign debug info to the template<br>
+ * @param array unused in this plugin, this plugin uses {@link Smarty::$_config},
+ * {@link Smarty::$_tpl_vars} and {@link Smarty::$_smarty_debug_info}
+ * @param Smarty
+ */
+function smarty_function_assign_debug_info($params, &$smarty)
+{
+ $assigned_vars = $smarty->_tpl_vars;
+ ksort($assigned_vars);
+ if (@is_array($smarty->_config[0])) {
+ $config_vars = $smarty->_config[0];
+ ksort($config_vars);
+ $smarty->assign("_debug_config_keys", array_keys($config_vars));
+ $smarty->assign("_debug_config_vals", array_values($config_vars));
+ }
+
+ $included_templates = $smarty->_smarty_debug_info;
+
+ $smarty->assign("_debug_keys", array_keys($assigned_vars));
+ $smarty->assign("_debug_vals", array_values($assigned_vars));
+
+ $smarty->assign("_debug_tpls", $included_templates);
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.assign_debug_info.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.config_load.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.config_load.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.config_load.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,140 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Smarty {config_load} function plugin
+ *
+ * Type: function<br>
+ * Name: config_load<br>
+ * Purpose: load config file vars
+ * @link http://smarty.php.net/manual/en/language.function.config.load.php {config_load}
+ * (Smarty online manual)
+ * @param array Format:
+ * <pre>
+ * array('file' => required config file name,
+ * 'section' => optional config file section to load
+ * 'scope' => local/parent/global
+ * 'global' => overrides scope, setting to parent if true)
+ * </pre>
+ * @param Smarty
+ */
+function smarty_function_config_load($params, &$smarty)
+{
+ if ($smarty->debugging) {
+ $_params = array();
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php');
+ $_debug_start_time = smarty_core_get_microtime($_params, $smarty);
+ }
+
+ $_file = isset($params['file']) ? $smarty->_dequote($params['file']) : null;
+ $_section = isset($params['section']) ? $smarty->_dequote($params['section']) : null;
+ $_scope = isset($params['scope']) ? $smarty->_dequote($params['scope']) : 'global';
+ $_global = isset($params['global']) ? $smarty->_dequote($params['global']) : false;
+
+ if (!isset($_file) || strlen($_file) == 0) {
+ $smarty->trigger_error("missing 'file' attribute in config_load tag", E_USER_ERROR, __FILE__, __LINE__);
+ }
+
+ if (isset($_scope)) {
+ if ($_scope != 'local' &&
+ $_scope != 'parent' &&
+ $_scope != 'global') {
+ $smarty->trigger_error("invalid 'scope' attribute value", E_USER_ERROR, __FILE__, __LINE__);
+ }
+ } else {
+ if ($_global) {
+ $_scope = 'parent';
+ } else {
+ $_scope = 'local';
+ }
+ }
+
+ $_params = array('resource_name' => $_file,
+ 'resource_base_path' => $smarty->config_dir,
+ 'get_source' => false);
+ $smarty->_parse_resource_name($_params);
+ $_file_path = $_params['resource_type'] . ':' . $_params['resource_name'];
+ if (isset($_section))
+ $_compile_file = $smarty->_get_compile_path($_file_path.'|'.$_section);
+ else
+ $_compile_file = $smarty->_get_compile_path($_file_path);
+
+ if($smarty->force_compile || !file_exists($_compile_file)) {
+ $_compile = true;
+ } elseif ($smarty->compile_check) {
+ $_params = array('resource_name' => $_file,
+ 'resource_base_path' => $smarty->config_dir,
+ 'get_source' => false);
+ $_compile = $smarty->_fetch_resource_info($_params) &&
+ $_params['resource_timestamp'] > filemtime($_compile_file);
+ } else {
+ $_compile = false;
+ }
+
+ if($_compile) {
+ // compile config file
+ if(!is_object($smarty->_conf_obj)) {
+ require_once SMARTY_DIR . $smarty->config_class . '.class.php';
+ $smarty->_conf_obj = new $smarty->config_class();
+ $smarty->_conf_obj->overwrite = $smarty->config_overwrite;
+ $smarty->_conf_obj->booleanize = $smarty->config_booleanize;
+ $smarty->_conf_obj->read_hidden = $smarty->config_read_hidden;
+ $smarty->_conf_obj->fix_newlines = $smarty->config_fix_newlines;
+ }
+
+ $_params = array('resource_name' => $_file,
+ 'resource_base_path' => $smarty->config_dir,
+ $_params['get_source'] = true);
+ if (!$smarty->_fetch_resource_info($_params)) {
+ return;
+ }
+ $smarty->_conf_obj->set_file_contents($_file, $_params['source_content']);
+ $_config_vars = array_merge($smarty->_conf_obj->get($_file),
+ $smarty->_conf_obj->get($_file, $_section));
+ if(function_exists('var_export')) {
+ $_output = '<?php $_config_vars = ' . var_export($_config_vars, true) . '; ?>';
+ } else {
+ $_output = '<?php $_config_vars = unserialize(\'' . strtr(serialize($_config_vars),array('\''=>'\\\'', '\\'=>'\\\\')) . '\'); ?>';
+ }
+ $_params = (array('compile_path' => $_compile_file, 'compiled_content' => $_output, 'resource_timestamp' => $_params['resource_timestamp']));
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_compiled_resource.php');
+ smarty_core_write_compiled_resource($_params, $smarty);
+ } else {
+ include($_compile_file);
+ }
+
+ if ($smarty->caching) {
+ $smarty->_cache_info['config'][$_file] = true;
+ }
+
+ $smarty->_config[0]['vars'] = @array_merge($smarty->_config[0]['vars'], $_config_vars);
+ $smarty->_config[0]['files'][$_file] = true;
+
+ if ($_scope == 'parent') {
+ $smarty->_config[1]['vars'] = @array_merge($smarty->_config[1]['vars'], $_config_vars);
+ $smarty->_config[1]['files'][$_file] = true;
+ } else if ($_scope == 'global') {
+ for ($i = 1, $for_max = count($smarty->_config); $i < $for_max; $i++) {
+ $smarty->_config[$i]['vars'] = @array_merge($smarty->_config[$i]['vars'], $_config_vars);
+ $smarty->_config[$i]['files'][$_file] = true;
+ }
+ }
+
+ if ($smarty->debugging) {
+ $_params = array();
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php');
+ $smarty->_smarty_debug_info[] = array('type' => 'config',
+ 'filename' => $_file.' ['.$_section.'] '.$_scope,
+ 'depth' => $smarty->_inclusion_depth,
+ 'exec_time' => smarty_core_get_microtime($_params, $smarty) - $_debug_start_time);
+ }
+
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.config_load.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.counter.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.counter.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.counter.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,79 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {counter} function plugin
+ *
+ * Type: function<br>
+ * Name: counter<br>
+ * Purpose: print out a counter value
+ * @link http://smarty.php.net/manual/en/language.function.counter.php {counter}
+ * (Smarty online manual)
+ * @param array parameters
+ * @param Smarty
+ * @return string|null
+ */
+function smarty_function_counter($params, &$smarty)
+{
+ static $counters = array();
+
+ $name = (isset($params['name'])) ? $params['name'] : 'default';
+ if (!isset($counters[$name])) {
+ $counters[$name] = array(
+ 'start'=>1,
+ 'skip'=>1,
+ 'direction'=>'up',
+ 'count'=>1
+ );
+ }
+ $counter =& $counters[$name];
+
+ if (isset($params['start'])) {
+ $counter['start'] = $counter['count'] = (int)$params['start'];
+ }
+
+ if (!empty($params['assign'])) {
+ $counter['assign'] = $params['assign'];
+ }
+
+ if (isset($counter['assign'])) {
+ $smarty->assign($counter['assign'], $counter['count']);
+ }
+
+ if (isset($params['print'])) {
+ $print = (bool)$params['print'];
+ } else {
+ $print = empty($counter['assign']);
+ }
+
+ if ($print) {
+ $retval = $counter['count'];
+ } else {
+ $retval = null;
+ }
+
+ if (isset($params['skip'])) {
+ $counter['skip'] = $params['skip'];
+ }
+
+ if (isset($params['direction'])) {
+ $counter['direction'] = $params['direction'];
+ }
+
+ if ($counter['direction'] == "down")
+ $counter['count'] -= $counter['skip'];
+ else
+ $counter['count'] += $counter['skip'];
+
+ return $retval;
+
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.counter.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.cycle.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.cycle.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.cycle.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,102 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Smarty {cycle} function plugin
+ *
+ * Type: function<br>
+ * Name: cycle<br>
+ * Date: May 3, 2002<br>
+ * Purpose: cycle through given values<br>
+ * Input:
+ * - name = name of cycle (optional)
+ * - values = comma separated list of values to cycle,
+ * or an array of values to cycle
+ * (this can be left out for subsequent calls)
+ * - reset = boolean - resets given var to true
+ * - print = boolean - print var or not. default is true
+ * - advance = boolean - whether or not to advance the cycle
+ * - delimiter = the value delimiter, default is ","
+ * - assign = boolean, assigns to template var instead of
+ * printed.
+ *
+ * Examples:<br>
+ * <pre>
+ * {cycle values="#eeeeee,#d0d0d0d"}
+ * {cycle name=row values="one,two,three" reset=true}
+ * {cycle name=row}
+ * </pre>
+ * @link http://smarty.php.net/manual/en/language.function.cycle.php {cycle}
+ * (Smarty online manual)
+ * @author Monte Ohrt <monte at ispi.net>
+ * @author credit to Mark Priatel <mpriatel at rogers.com>
+ * @author credit to Gerard <gerard at interfold.com>
+ * @author credit to Jason Sweat <jsweat_php at yahoo.com>
+ * @version 1.3
+ * @param array
+ * @param Smarty
+ * @return string|null
+ */
+function smarty_function_cycle($params, &$smarty)
+{
+ static $cycle_vars;
+
+ $name = (empty($params['name'])) ? 'default' : $params['name'];
+ $print = (isset($params['print'])) ? (bool)$params['print'] : true;
+ $advance = (isset($params['advance'])) ? (bool)$params['advance'] : true;
+ $reset = (isset($params['reset'])) ? (bool)$params['reset'] : false;
+
+ if (!in_array('values', array_keys($params))) {
+ if(!isset($cycle_vars[$name]['values'])) {
+ $smarty->trigger_error("cycle: missing 'values' parameter");
+ return;
+ }
+ } else {
+ if(isset($cycle_vars[$name]['values'])
+ && $cycle_vars[$name]['values'] != $params['values'] ) {
+ $cycle_vars[$name]['index'] = 0;
+ }
+ $cycle_vars[$name]['values'] = $params['values'];
+ }
+
+ $cycle_vars[$name]['delimiter'] = (isset($params['delimiter'])) ? $params['delimiter'] : ',';
+
+ if(is_array($cycle_vars[$name]['values'])) {
+ $cycle_array = $cycle_vars[$name]['values'];
+ } else {
+ $cycle_array = explode($cycle_vars[$name]['delimiter'],$cycle_vars[$name]['values']);
+ }
+
+ if(!isset($cycle_vars[$name]['index']) || $reset ) {
+ $cycle_vars[$name]['index'] = 0;
+ }
+
+ if (isset($params['assign'])) {
+ $print = false;
+ $smarty->assign($params['assign'], $cycle_array[$cycle_vars[$name]['index']]);
+ }
+
+ if($print) {
+ $retval = $cycle_array[$cycle_vars[$name]['index']];
+ } else {
+ $retval = null;
+ }
+
+ if($advance) {
+ if ( $cycle_vars[$name]['index'] >= count($cycle_array) -1 ) {
+ $cycle_vars[$name]['index'] = 0;
+ } else {
+ $cycle_vars[$name]['index']++;
+ }
+ }
+
+ return $retval;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.cycle.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.debug.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.debug.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.debug.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {debug} function plugin
+ *
+ * Type: function<br>
+ * Name: debug<br>
+ * Date: July 1, 2002<br>
+ * Purpose: popup debug window
+ * @link http://smarty.php.net/manual/en/language.function.debug.php {debug}
+ * (Smarty online manual)
+ * @author Monte Ohrt <monte at ispi.net>
+ * @version 1.0
+ * @param array
+ * @param Smarty
+ * @return string output from {@link Smarty::_generate_debug_output()}
+ */
+function smarty_function_debug($params, &$smarty)
+{
+ if (isset($params['output'])) {
+ $smarty->assign('_smarty_debug_output', $params['output']);
+ }
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.display_debug_console.php');
+ return smarty_core_display_debug_console(null, $smarty);
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.debug.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.eval.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.eval.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.eval.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {eval} function plugin
+ *
+ * Type: function<br>
+ * Name: eval<br>
+ * Purpose: evaluate a template variable as a template<br>
+ * @link http://smarty.php.net/manual/en/language.function.eval.php {eval}
+ * (Smarty online manual)
+ * @param array
+ * @param Smarty
+ */
+function smarty_function_eval($params, &$smarty)
+{
+
+ if (!isset($params['var'])) {
+ $smarty->trigger_error("eval: missing 'var' parameter");
+ return;
+ }
+
+ if($params['var'] == '') {
+ return;
+ }
+
+ $smarty->_compile_source('evaluated template', $params['var'], $_var_compiled);
+
+ ob_start();
+ $smarty->_eval('?>' . $_var_compiled);
+ $_contents = ob_get_contents();
+ ob_end_clean();
+
+ if (!empty($params['assign'])) {
+ $smarty->assign($params['assign'], $_contents);
+ } else {
+ return $_contents;
+ }
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.eval.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.fetch.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.fetch.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.fetch.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,220 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {fetch} plugin
+ *
+ * Type: function<br>
+ * Name: fetch<br>
+ * Purpose: fetch file, web or ftp data and display results
+ * @link http://smarty.php.net/manual/en/language.function.fetch.php {fetch}
+ * (Smarty online manual)
+ * @param array
+ * @param Smarty
+ * @return string|null if the assign parameter is passed, Smarty assigns the
+ * result to a template variable
+ */
+function smarty_function_fetch($params, &$smarty)
+{
+ if (empty($params['file'])) {
+ $smarty->_trigger_fatal_error("[plugin] parameter 'file' cannot be empty");
+ return;
+ }
+
+ $content = '';
+ if ($smarty->security && !preg_match('!^(http|ftp)://!i', $params['file'])) {
+ $_params = array('resource_type' => 'file', 'resource_name' => $params['file']);
+ require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.is_secure.php');
+ if(!smarty_core_is_secure($_params, $smarty)) {
+ $smarty->_trigger_fatal_error('[plugin] (secure mode) fetch \'' . $params['file'] . '\' is not allowed');
+ return;
+ }
+
+ // fetch the file
+ if($fp = @fopen($params['file'],'r')) {
+ while(!feof($fp)) {
+ $content .= fgets ($fp,4096);
+ }
+ fclose($fp);
+ } else {
+ $smarty->_trigger_fatal_error('[plugin] fetch cannot read file \'' . $params['file'] . '\'');
+ return;
+ }
+ } else {
+ // not a local file
+ if(preg_match('!^http://!i',$params['file'])) {
+ // http fetch
+ if($uri_parts = parse_url($params['file'])) {
+ // set defaults
+ $host = $server_name = $uri_parts['host'];
+ $timeout = 30;
+ $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*";
+ $agent = "Smarty Template Engine ".$smarty->_version;
+ $referer = "";
+ $uri = !empty($uri_parts['path']) ? $uri_parts['path'] : '/';
+ $uri .= !empty($uri_parts['query']) ? '?' . $uri_parts['query'] : '';
+ $_is_proxy = false;
+ if(empty($uri_parts['port'])) {
+ $port = 80;
+ } else {
+ $port = $uri_parts['port'];
+ }
+ if(!empty($uri_parts['user'])) {
+ $user = $uri_parts['user'];
+ }
+ if(!empty($uri_parts['pass'])) {
+ $pass = $uri_parts['pass'];
+ }
+ // loop through parameters, setup headers
+ foreach($params as $param_key => $param_value) {
+ switch($param_key) {
+ case "file":
+ case "assign":
+ case "assign_headers":
+ break;
+ case "user":
+ if(!empty($param_value)) {
+ $user = $param_value;
+ }
+ break;
+ case "pass":
+ if(!empty($param_value)) {
+ $pass = $param_value;
+ }
+ break;
+ case "accept":
+ if(!empty($param_value)) {
+ $accept = $param_value;
+ }
+ break;
+ case "header":
+ if(!empty($param_value)) {
+ if(!preg_match('![\w\d-]+: .+!',$param_value)) {
+ $smarty->_trigger_fatal_error("[plugin] invalid header format '".$param_value."'");
+ return;
+ } else {
+ $extra_headers[] = $param_value;
+ }
+ }
+ break;
+ case "proxy_host":
+ if(!empty($param_value)) {
+ $proxy_host = $param_value;
+ }
+ break;
+ case "proxy_port":
+ if(!preg_match('!\D!', $param_value)) {
+ $proxy_port = (int) $param_value;
+ } else {
+ $smarty->_trigger_fatal_error("[plugin] invalid value for attribute '".$param_key."'");
+ return;
+ }
+ break;
+ case "agent":
+ if(!empty($param_value)) {
+ $agent = $param_value;
+ }
+ break;
+ case "referer":
+ if(!empty($param_value)) {
+ $referer = $param_value;
+ }
+ break;
+ case "timeout":
+ if(!preg_match('!\D!', $param_value)) {
+ $timeout = (int) $param_value;
+ } else {
+ $smarty->_trigger_fatal_error("[plugin] invalid value for attribute '".$param_key."'");
+ return;
+ }
+ break;
+ default:
+ $smarty->_trigger_fatal_error("[plugin] unrecognized attribute '".$param_key."'");
+ return;
+ }
+ }
+ if(!empty($proxy_host) && !empty($proxy_port)) {
+ $_is_proxy = true;
+ $fp = fsockopen($proxy_host,$proxy_port,$errno,$errstr,$timeout);
+ } else {
+ $fp = fsockopen($server_name,$port,$errno,$errstr,$timeout);
+ }
+
+ if(!$fp) {
+ $smarty->_trigger_fatal_error("[plugin] unable to fetch: $errstr ($errno)");
+ return;
+ } else {
+ if($_is_proxy) {
+ fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n");
+ } else {
+ fputs($fp, "GET $uri HTTP/1.0\r\n");
+ }
+ if(!empty($host)) {
+ fputs($fp, "Host: $host\r\n");
+ }
+ if(!empty($accept)) {
+ fputs($fp, "Accept: $accept\r\n");
+ }
+ if(!empty($agent)) {
+ fputs($fp, "User-Agent: $agent\r\n");
+ }
+ if(!empty($referer)) {
+ fputs($fp, "Referer: $referer\r\n");
+ }
+ if(isset($extra_headers) && is_array($extra_headers)) {
+ foreach($extra_headers as $curr_header) {
+ fputs($fp, $curr_header."\r\n");
+ }
+ }
+ if(!empty($user) && !empty($pass)) {
+ fputs($fp, "Authorization: BASIC ".base64_encode("$user:$pass")."\r\n");
+ }
+
+ fputs($fp, "\r\n");
+ while(!feof($fp)) {
+ $content .= fgets($fp,4096);
+ }
+ fclose($fp);
+ $csplit = split("\r\n\r\n",$content,2);
+
+ $content = $csplit[1];
+
+ if(!empty($params['assign_headers'])) {
+ $smarty->assign($params['assign_headers'],split("\r\n",$csplit[0]));
+ }
+ }
+ } else {
+ $smarty->_trigger_fatal_error("[plugin] unable to parse URL, check syntax");
+ return;
+ }
+ } else {
+ // ftp fetch
+ if($fp = @fopen($params['file'],'r')) {
+ while(!feof($fp)) {
+ $content .= fgets ($fp,4096);
+ }
+ fclose($fp);
+ } else {
+ $smarty->_trigger_fatal_error('[plugin] fetch cannot read file \'' . $params['file'] .'\'');
+ return;
+ }
+ }
+
+ }
+
+
+ if (!empty($params['assign'])) {
+ $smarty->assign($params['assign'],$content);
+ } else {
+ return $content;
+ }
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.fetch.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_checkboxes.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_checkboxes.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_checkboxes.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,143 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {html_checkboxes} function plugin
+ *
+ * File: function.html_checkboxes.php<br>
+ * Type: function<br>
+ * Name: html_checkboxes<br>
+ * Date: 24.Feb.2003<br>
+ * Purpose: Prints out a list of checkbox input types<br>
+ * Input:<br>
+ * - name (optional) - string default "checkbox"
+ * - values (required) - array
+ * - options (optional) - associative array
+ * - checked (optional) - array default not set
+ * - separator (optional) - ie <br> or
+ * - output (optional) - the output next to each checkbox
+ * - assign (optional) - assign the output as an array to this variable
+ * Examples:
+ * <pre>
+ * {html_checkboxes values=$ids output=$names}
+ * {html_checkboxes values=$ids name='box' separator='<br>' output=$names}
+ * {html_checkboxes values=$ids checked=$checked separator='<br>' output=$names}
+ * </pre>
+ * @link http://smarty.php.net/manual/en/language.function.html.checkboxes.php {html_checkboxes}
+ * (Smarty online manual)
+ * @author Christopher Kvarme <christopher.kvarme at flashjab.com>
+ * @author credits to Monte Ohrt <monte at ispi.net>
+ * @version 1.0
+ * @param array
+ * @param Smarty
+ * @return string
+ * @uses smarty_function_escape_special_chars()
+ */
+function smarty_function_html_checkboxes($params, &$smarty)
+{
+ require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');
+
+ $name = 'checkbox';
+ $values = null;
+ $options = null;
+ $selected = null;
+ $separator = '';
+ $labels = true;
+ $output = null;
+
+ $extra = '';
+
+ foreach($params as $_key => $_val) {
+ switch($_key) {
+ case 'name':
+ case 'separator':
+ $$_key = $_val;
+ break;
+
+ case 'labels':
+ $$_key = (bool)$_val;
+ break;
+
+ case 'options':
+ $$_key = (array)$_val;
+ break;
+
+ case 'values':
+ case 'output':
+ $$_key = array_values((array)$_val);
+ break;
+
+ case 'checked':
+ case 'selected':
+ $selected = array_map('strval', array_values((array)$_val));
+ break;
+
+ case 'checkboxes':
+ $smarty->trigger_error('html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead', E_USER_WARNING);
+ $options = (array)$_val;
+ break;
+
+ case 'assign':
+ break;
+
+ default:
+ if(!is_array($_val)) {
+ $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';
+ } else {
+ $smarty->trigger_error("html_checkboxes: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
+ }
+ break;
+ }
+ }
+
+ if (!isset($options) && !isset($values))
+ return ''; /* raise error here? */
+
+ settype($selected, 'array');
+ $_html_result = array();
+
+ if (is_array($options)) {
+
+ foreach ($options as $_key=>$_val)
+ $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels);
+
+
+ } else {
+ foreach ($values as $_i=>$_key) {
+ $_val = isset($output[$_i]) ? $output[$_i] : '';
+ $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels);
+ }
+
+ }
+
+ if(!empty($params['assign'])) {
+ $smarty->assign($params['assign'], $_html_result);
+ } else {
+ return implode("\n",$_html_result);
+ }
+
+}
+
+function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels) {
+ $_output = '';
+ if ($labels) $_output .= '<label>';
+ $_output .= '<input type="checkbox" name="'
+ . smarty_function_escape_special_chars($name) . '[]" value="'
+ . smarty_function_escape_special_chars($value) . '"';
+
+ if (in_array((string)$value, $selected)) {
+ $_output .= ' checked="checked"';
+ }
+ $_output .= $extra . ' />' . $output;
+ if ($labels) $_output .= '</label>';
+ $_output .= $separator;
+
+ return $_output;
+}
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_checkboxes.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_image.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_image.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_image.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,142 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {html_image} function plugin
+ *
+ * Type: function<br>
+ * Name: html_image<br>
+ * Date: Feb 24, 2003<br>
+ * Purpose: format HTML tags for the image<br>
+ * Input:<br>
+ * - file = file (and path) of image (required)
+ * - border = border width (optional, default 0)
+ * - height = image height (optional, default actual height)
+ * - image =image width (optional, default actual width)
+ * - basedir = base directory for absolute paths, default
+ * is environment variable DOCUMENT_ROOT
+ *
+ * Examples: {html_image file="images/masthead.gif"}
+ * Output: <img src="images/masthead.gif" border=0 width=400 height=23>
+ * @link http://smarty.php.net/manual/en/language.function.html.image.php {html_image}
+ * (Smarty online manual)
+ * @author Monte Ohrt <monte at ispi.net>
+ * @author credits to Duda <duda at big.hu> - wrote first image function
+ * in repository, helped with lots of functionality
+ * @version 1.0
+ * @param array
+ * @param Smarty
+ * @return string
+ * @uses smarty_function_escape_special_chars()
+ */
+function smarty_function_html_image($params, &$smarty)
+{
+ require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');
+
+ $alt = '';
+ $file = '';
+ $border = 0;
+ $height = '';
+ $width = '';
+ $extra = '';
+ $prefix = '';
+ $suffix = '';
+ $server_vars = ($smarty->request_use_auto_globals) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS'];
+ $basedir = isset($server_vars['DOCUMENT_ROOT']) ? $server_vars['DOCUMENT_ROOT'] : '';
+ foreach($params as $_key => $_val) {
+ switch($_key) {
+ case 'file':
+ case 'border':
+ case 'height':
+ case 'width':
+ case 'dpi':
+ case 'basedir':
+ $$_key = $_val;
+ break;
+
+ case 'alt':
+ if(!is_array($_val)) {
+ $$_key = smarty_function_escape_special_chars($_val);
+ } else {
+ $smarty->trigger_error("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
+ }
+ break;
+
+ case 'link':
+ case 'href':
+ $prefix = '<a href="' . $_val . '">';
+ $suffix = '</a>';
+ break;
+
+ default:
+ if(!is_array($_val)) {
+ $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';
+ } else {
+ $smarty->trigger_error("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
+ }
+ break;
+ }
+ }
+
+ if (empty($file)) {
+ $smarty->trigger_error("html_image: missing 'file' parameter", E_USER_NOTICE);
+ return;
+ }
+
+ if (substr($file,0,1) == '/') {
+ $_image_path = $basedir . $file;
+ } else {
+ $_image_path = $file;
+ }
+
+ if(!isset($params['width']) || !isset($params['height'])) {
+ if ($smarty->security &&
+ ($_params = array('resource_type' => 'file', 'resource_name' => $_image_path)) &&
+ (require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.is_secure.php')) &&
+ (!smarty_core_is_secure($_params, $smarty)) ) {
+ $smarty->trigger_error("html_image: (secure) '$_image_path' not in secure directory", E_USER_NOTICE);
+
+ } elseif (!$_image_data = @getimagesize($_image_path)) {
+ if(!file_exists($_image_path)) {
+ $smarty->trigger_error("html_image: unable to find '$_image_path'", E_USER_NOTICE);
+ return;
+ } else if(!is_readable($_image_path)) {
+ $smarty->trigger_error("html_image: unable to read '$_image_path'", E_USER_NOTICE);
+ return;
+ } else {
+ $smarty->trigger_error("html_image: '$_image_path' is not a valid image file", E_USER_NOTICE);
+ return;
+ }
+ }
+
+ if(!isset($params['width'])) {
+ $width = $_image_data[0];
+ }
+ if(!isset($params['height'])) {
+ $height = $_image_data[1];
+ }
+
+ }
+
+ if(isset($params['dpi'])) {
+ if(strstr($server_vars['HTTP_USER_AGENT'], 'Mac')) {
+ $dpi_default = 72;
+ } else {
+ $dpi_default = 96;
+ }
+ $_resize = $dpi_default/$params['dpi'];
+ $width = round($width * $_resize);
+ $height = round($height * $_resize);
+ }
+
+ return $prefix . '<img src="'.$file.'" alt="'.$alt.'" border="'.$border.'" width="'.$width.'" height="'.$height.'"'.$extra.' />' . $suffix;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_image.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_options.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_options.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_options.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,121 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {html_options} function plugin
+ *
+ * Type: function<br>
+ * Name: html_options<br>
+ * Input:<br>
+ * - name (optional) - string default "select"
+ * - values (required if no options supplied) - array
+ * - options (required if no values supplied) - associative array
+ * - selected (optional) - string default not set
+ * - output (required if not options supplied) - array
+ * Purpose: Prints the list of <option> tags generated from
+ * the passed parameters
+ * @link http://smarty.php.net/manual/en/language.function.html.options.php {html_image}
+ * (Smarty online manual)
+ * @param array
+ * @param Smarty
+ * @return string
+ * @uses smarty_function_escape_special_chars()
+ */
+function smarty_function_html_options($params, &$smarty)
+{
+ require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');
+
+ $name = null;
+ $values = null;
+ $options = null;
+ $selected = array();
+ $output = null;
+
+ $extra = '';
+
+ foreach($params as $_key => $_val) {
+ switch($_key) {
+ case 'name':
+ $$_key = (string)$_val;
+ break;
+
+ case 'options':
+ $$_key = (array)$_val;
+ break;
+
+ case 'values':
+ case 'output':
+ $$_key = array_values((array)$_val);
+ break;
+
+ case 'selected':
+ $$_key = array_map('strval', array_values((array)$_val));
+ break;
+
+ default:
+ if(!is_array($_val)) {
+ $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';
+ } else {
+ $smarty->trigger_error("html_options: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
+ }
+ break;
+ }
+ }
+
+ if (!isset($options) && !isset($values))
+ return ''; /* raise error here? */
+
+ $_html_result = '';
+
+ if (is_array($options)) {
+
+ foreach ($options as $_key=>$_val)
+ $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected);
+
+ } else {
+
+ foreach ((array)$values as $_i=>$_key) {
+ $_val = isset($output[$_i]) ? $output[$_i] : '';
+ $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected);
+ }
+
+ }
+
+ if(!empty($name)) {
+ $_html_result = '<select name="' . $name . '"' . $extra . '>' . "\n" . $_html_result . '</select>' . "\n";
+ }
+
+ return $_html_result;
+
+}
+
+function smarty_function_html_options_optoutput($key, $value, $selected) {
+ if(!is_array($value)) {
+ $_html_result = '<option label="' . smarty_function_escape_special_chars($value) . '" value="' .
+ smarty_function_escape_special_chars($key) . '"';
+ if (in_array((string)$key, $selected))
+ $_html_result .= ' selected="selected"';
+ $_html_result .= '>' . smarty_function_escape_special_chars($value) . '</option>' . "\n";
+ } else {
+ $_html_result = smarty_function_html_options_optgroup($key, $value, $selected);
+ }
+ return $_html_result;
+}
+
+function smarty_function_html_options_optgroup($key, $values, $selected) {
+ $optgroup_html = '<optgroup label="' . smarty_function_escape_special_chars($key) . '">' . "\n";
+ foreach ($values as $key => $value) {
+ $optgroup_html .= smarty_function_html_options_optoutput($key, $value, $selected);
+ }
+ $optgroup_html .= "</optgroup>\n";
+ return $optgroup_html;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_options.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_radios.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_radios.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_radios.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,145 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {html_radios} function plugin
+ *
+ * File: function.html_radios.php<br>
+ * Type: function<br>
+ * Name: html_radios<br>
+ * Date: 24.Feb.2003<br>
+ * Purpose: Prints out a list of radio input types<br>
+ * Input:<br>
+ * - name (optional) - string default "radio"
+ * - values (required) - array
+ * - options (optional) - associative array
+ * - checked (optional) - array default not set
+ * - separator (optional) - ie <br> or
+ * - output (optional) - the output next to each radio button
+ * - assign (optional) - assign the output as an array to this variable
+ * Examples:
+ * <pre>
+ * {html_radios values=$ids output=$names}
+ * {html_radios values=$ids name='box' separator='<br>' output=$names}
+ * {html_radios values=$ids checked=$checked separator='<br>' output=$names}
+ * </pre>
+ * @link http://smarty.php.net/manual/en/language.function.html.radios.php {html_radios}
+ * (Smarty online manual)
+ * @author Christopher Kvarme <christopher.kvarme at flashjab.com>
+ * @author credits to Monte Ohrt <monte at ispi.net>
+ * @version 1.0
+ * @param array
+ * @param Smarty
+ * @return string
+ * @uses smarty_function_escape_special_chars()
+ */
+function smarty_function_html_radios($params, &$smarty)
+{
+ require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');
+
+ $name = 'radio';
+ $values = null;
+ $options = null;
+ $selected = null;
+ $separator = '';
+ $labels = true;
+ $output = null;
+ $extra = '';
+
+ foreach($params as $_key => $_val) {
+ switch($_key) {
+ case 'name':
+ case 'separator':
+ $$_key = (string)$_val;
+ break;
+
+ case 'checked':
+ case 'selected':
+ if(is_array($_val)) {
+ $smarty->trigger_error('html_radios: the "' . $_key . '" attribute cannot be an array', E_USER_WARNING);
+ } else {
+ $selected = (string)$_val;
+ }
+ break;
+
+ case 'labels':
+ $$_key = (bool)$_val;
+ break;
+
+ case 'options':
+ $$_key = (array)$_val;
+ break;
+
+ case 'values':
+ case 'output':
+ $$_key = array_values((array)$_val);
+ break;
+
+ case 'radios':
+ $smarty->trigger_error('html_radios: the use of the "radios" attribute is deprecated, use "options" instead', E_USER_WARNING);
+ $options = (array)$_val;
+ break;
+
+ case 'assign':
+ break;
+
+ default:
+ if(!is_array($_val)) {
+ $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';
+ } else {
+ $smarty->trigger_error("html_radios: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
+ }
+ break;
+ }
+ }
+
+ if (!isset($options) && !isset($values))
+ return ''; /* raise error here? */
+
+ $_html_result = array();
+
+ if (isset($options) && is_array($options)) {
+
+ foreach ((array)$options as $_key=>$_val)
+ $_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels);
+
+ } else {
+
+ foreach ((array)$values as $_i=>$_key) {
+ $_val = isset($output[$_i]) ? $output[$_i] : '';
+ $_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels);
+ }
+
+ }
+
+ if(!empty($params['assign'])) {
+ $smarty->assign($params['assign'], $_html_result);
+ } else {
+ return implode("\n",$_html_result);
+ }
+
+}
+
+function smarty_function_html_radios_output($name, $value, $output, $selected, $extra, $separator, $labels) {
+ $_output = '';
+ if ($labels) $_output .= '<label>';
+ $_output .= '<input type="radio" name="'
+ . smarty_function_escape_special_chars($name) . '" value="'
+ . smarty_function_escape_special_chars($value) . '"';
+
+ if ($value==$selected) {
+ $_output .= ' checked="checked"';
+ }
+ $_output .= $extra . ' />' . $output;
+ if ($labels) $_output .= '</label>';
+ $_output .= $separator;
+
+ return $_output;
+}
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_radios.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_select_date.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_select_date.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_select_date.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,312 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Smarty {html_select_date} plugin
+ *
+ * Type: function<br>
+ * Name: html_select_date<br>
+ * Purpose: Prints the dropdowns for date selection.
+ *
+ * ChangeLog:<br>
+ * - 1.0 initial release
+ * - 1.1 added support for +/- N syntax for begin
+ * and end year values. (Monte)
+ * - 1.2 added support for yyyy-mm-dd syntax for
+ * time value. (Jan Rosier)
+ * - 1.3 added support for choosing format for
+ * month values (Gary Loescher)
+ * - 1.3.1 added support for choosing format for
+ * day values (Marcus Bointon)
+ * - 1.3.2 suppport negative timestamps, force year
+ * dropdown to include given date unless explicitly set (Monte)
+ * @link http://smarty.php.net/manual/en/language.function.html.select.date.php {html_select_date}
+ * (Smarty online manual)
+ * @version 1.3.2
+ * @author Andrei Zmievski
+ * @param array
+ * @param Smarty
+ * @return string
+ */
+function smarty_function_html_select_date($params, &$smarty)
+{
+ require_once $smarty->_get_plugin_filepath('shared','make_timestamp');
+ require_once $smarty->_get_plugin_filepath('function','html_options');
+ /* Default values. */
+ $prefix = "Date_";
+ $start_year = strftime("%Y");
+ $end_year = $start_year;
+ $display_days = true;
+ $display_months = true;
+ $display_years = true;
+ $month_format = "%B";
+ /* Write months as numbers by default GL */
+ $month_value_format = "%m";
+ $day_format = "%02d";
+ /* Write day values using this format MB */
+ $day_value_format = "%d";
+ $year_as_text = false;
+ /* Display years in reverse order? Ie. 2000,1999,.... */
+ $reverse_years = false;
+ /* Should the select boxes be part of an array when returned from PHP?
+ e.g. setting it to "birthday", would create "birthday[Day]",
+ "birthday[Month]" & "birthday[Year]". Can be combined with prefix */
+ $field_array = null;
+ /* <select size>'s of the different <select> tags.
+ If not set, uses default dropdown. */
+ $day_size = null;
+ $month_size = null;
+ $year_size = null;
+ /* Unparsed attributes common to *ALL* the <select>/<input> tags.
+ An example might be in the template: all_extra ='class ="foo"'. */
+ $all_extra = null;
+ /* Separate attributes for the tags. */
+ $day_extra = null;
+ $month_extra = null;
+ $year_extra = null;
+ /* Order in which to display the fields.
+ "D" -> day, "M" -> month, "Y" -> year. */
+ $field_order = 'MDY';
+ /* String printed between the different fields. */
+ $field_separator = "\n";
+ $time = time();
+ $all_empty = null;
+ $day_empty = null;
+ $month_empty = null;
+ $year_empty = null;
+
+ foreach ($params as $_key=>$_value) {
+ switch ($_key) {
+ case 'prefix':
+ case 'time':
+ case 'start_year':
+ case 'end_year':
+ case 'month_format':
+ case 'day_format':
+ case 'day_value_format':
+ case 'field_array':
+ case 'day_size':
+ case 'month_size':
+ case 'year_size':
+ case 'all_extra':
+ case 'day_extra':
+ case 'month_extra':
+ case 'year_extra':
+ case 'field_order':
+ case 'field_separator':
+ case 'month_value_format':
+ case 'month_empty':
+ case 'day_empty':
+ case 'year_empty':
+ $$_key = (string)$_value;
+ break;
+
+ case 'all_empty':
+ $$_key = (string)$_value;
+ $day_empty = $month_empty = $year_empty = $all_empty;
+ break;
+
+ case 'display_days':
+ case 'display_months':
+ case 'display_years':
+ case 'year_as_text':
+ case 'reverse_years':
+ $$_key = (bool)$_value;
+ break;
+
+ default:
+ $smarty->trigger_error("[html_select_date] unknown parameter $_key", E_USER_WARNING);
+
+ }
+ }
+
+ if(preg_match('!^-\d+$!',$time)) {
+ // negative timestamp, use date()
+ $time = date('Y-m-d',$time);
+ }
+ // If $time is not in format yyyy-mm-dd
+ if (!preg_match('/^\d{0,4}-\d{0,2}-\d{0,2}$/', $time)) {
+ // use smarty_make_timestamp to get an unix timestamp and
+ // strftime to make yyyy-mm-dd
+ $time = strftime('%Y-%m-%d', smarty_make_timestamp($time));
+ }
+ // Now split this in pieces, which later can be used to set the select
+ $time = explode("-", $time);
+
+ // make syntax "+N" or "-N" work with start_year and end_year
+ if (preg_match('!^(\+|\-)\s*(\d+)$!', $end_year, $match)) {
+ if ($match[1] == '+') {
+ $end_year = strftime('%Y') + $match[2];
+ } else {
+ $end_year = strftime('%Y') - $match[2];
+ }
+ }
+ if (preg_match('!^(\+|\-)\s*(\d+)$!', $start_year, $match)) {
+ if ($match[1] == '+') {
+ $start_year = strftime('%Y') + $match[2];
+ } else {
+ $start_year = strftime('%Y') - $match[2];
+ }
+ }
+ if($start_year > $time[0] && !isset($params['start_year'])) {
+ // force start year to include given date if not explicitly set
+ $start_year = $time[0];
+ }
+ if($end_year < $time[0] && !isset($params['end_year'])) {
+ // force end year to include given date if not explicitly set
+ $end_year = $time[0];
+ }
+
+ $field_order = strtoupper($field_order);
+
+ $html_result = $month_result = $day_result = $year_result = "";
+
+ if ($display_months) {
+ $month_names = array();
+ $month_values = array();
+ if(isset($month_empty)) {
+ $month_names[''] = $month_empty;
+ $month_values[''] = '';
+ }
+ for ($i = 1; $i <= 12; $i++) {
+ $month_names[$i] = strftime($month_format, mktime(0, 0, 0, $i, 1, 2000));
+ $month_values[$i] = strftime($month_value_format, mktime(0, 0, 0, $i, 1, 2000));
+ }
+
+ $month_result .= '<select name=';
+ if (null !== $field_array){
+ $month_result .= '"' . $field_array . '[' . $prefix . 'Month]"';
+ } else {
+ $month_result .= '"' . $prefix . 'Month"';
+ }
+ if (null !== $month_size){
+ $month_result .= ' size="' . $month_size . '"';
+ }
+ if (null !== $month_extra){
+ $month_result .= ' ' . $month_extra;
+ }
+ if (null !== $all_extra){
+ $month_result .= ' ' . $all_extra;
+ }
+ $month_result .= '>'."\n";
+
+ $month_result .= smarty_function_html_options(array('output' => $month_names,
+ 'values' => $month_values,
+ 'selected' => $a=$time[1] ? strftime($month_value_format, mktime(0, 0, 0, (int)$time[1], 1, 2000)) : '',
+ 'print_result' => false),
+ $smarty);
+ $month_result .= '</select>';
+ }
+
+ if ($display_days) {
+ $days = array();
+ if (isset($day_empty)) {
+ $days[''] = $day_empty;
+ $day_values[''] = '';
+ }
+ for ($i = 1; $i <= 31; $i++) {
+ $days[] = sprintf($day_format, $i);
+ $day_values[] = sprintf($day_value_format, $i);
+ }
+
+ $day_result .= '<select name=';
+ if (null !== $field_array){
+ $day_result .= '"' . $field_array . '[' . $prefix . 'Day]"';
+ } else {
+ $day_result .= '"' . $prefix . 'Day"';
+ }
+ if (null !== $day_size){
+ $day_result .= ' size="' . $day_size . '"';
+ }
+ if (null !== $all_extra){
+ $day_result .= ' ' . $all_extra;
+ }
+ if (null !== $day_extra){
+ $day_result .= ' ' . $day_extra;
+ }
+ $day_result .= '>'."\n";
+ $day_result .= smarty_function_html_options(array('output' => $days,
+ 'values' => $day_values,
+ 'selected' => $time[2],
+ 'print_result' => false),
+ $smarty);
+ $day_result .= '</select>';
+ }
+
+ if ($display_years) {
+ if (null !== $field_array){
+ $year_name = $field_array . '[' . $prefix . 'Year]';
+ } else {
+ $year_name = $prefix . 'Year';
+ }
+ if ($year_as_text) {
+ $year_result .= '<input type="text" name="' . $year_name . '" value="' . $time[0] . '" size="4" maxlength="4"';
+ if (null !== $all_extra){
+ $year_result .= ' ' . $all_extra;
+ }
+ if (null !== $year_extra){
+ $year_result .= ' ' . $year_extra;
+ }
+ $year_result .= '>';
+ } else {
+ $years = range((int)$start_year, (int)$end_year);
+ if ($reverse_years) {
+ rsort($years, SORT_NUMERIC);
+ }
+ $yearvals = $years;
+ if(isset($year_empty)) {
+ array_unshift($years, $year_empty);
+ array_unshift($yearvals, '');
+ }
+ $year_result .= '<select name="' . $year_name . '"';
+ if (null !== $year_size){
+ $year_result .= ' size="' . $year_size . '"';
+ }
+ if (null !== $all_extra){
+ $year_result .= ' ' . $all_extra;
+ }
+ if (null !== $year_extra){
+ $year_result .= ' ' . $year_extra;
+ }
+ $year_result .= '>'."\n";
+ $year_result .= smarty_function_html_options(array('output' => $years,
+ 'values' => $yearvals,
+ 'selected' => $time[0],
+ 'print_result' => false),
+ $smarty);
+ $year_result .= '</select>';
+ }
+ }
+
+ // Loop thru the field_order field
+ for ($i = 0; $i <= 2; $i++){
+ $c = substr($field_order, $i, 1);
+ switch ($c){
+ case 'D':
+ $html_result .= $day_result;
+ break;
+
+ case 'M':
+ $html_result .= $month_result;
+ break;
+
+ case 'Y':
+ $html_result .= $year_result;
+ break;
+ }
+ // Add the field seperator
+ if($i != 2) {
+ $html_result .= $field_separator;
+ }
+ }
+
+ return $html_result;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_select_date.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_select_time.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_select_time.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_select_time.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,192 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {html_select_time} function plugin
+ *
+ * Type: function<br>
+ * Name: html_select_time<br>
+ * Purpose: Prints the dropdowns for time selection
+ * @link http://smarty.php.net/manual/en/language.function.html.select.time.php {html_select_time}
+ * (Smarty online manual)
+ * @param array
+ * @param Smarty
+ * @return string
+ * @uses smarty_make_timestamp()
+ */
+function smarty_function_html_select_time($params, &$smarty)
+{
+ require_once $smarty->_get_plugin_filepath('shared','make_timestamp');
+ require_once $smarty->_get_plugin_filepath('function','html_options');
+ /* Default values. */
+ $prefix = "Time_";
+ $time = time();
+ $display_hours = true;
+ $display_minutes = true;
+ $display_seconds = true;
+ $display_meridian = true;
+ $use_24_hours = true;
+ $minute_interval = 1;
+ $second_interval = 1;
+ /* Should the select boxes be part of an array when returned from PHP?
+ e.g. setting it to "birthday", would create "birthday[Hour]",
+ "birthday[Minute]", "birthday[Seconds]" & "birthday[Meridian]".
+ Can be combined with prefix. */
+ $field_array = null;
+ $all_extra = null;
+ $hour_extra = null;
+ $minute_extra = null;
+ $second_extra = null;
+ $meridian_extra = null;
+
+ foreach ($params as $_key=>$_value) {
+ switch ($_key) {
+ case 'prefix':
+ case 'time':
+ case 'field_array':
+ case 'all_extra':
+ case 'hour_extra':
+ case 'minute_extra':
+ case 'second_extra':
+ case 'meridian_extra':
+ $$_key = (string)$_value;
+ break;
+
+ case 'display_hours':
+ case 'display_minutes':
+ case 'display_seconds':
+ case 'display_meridian':
+ case 'use_24_hours':
+ $$_key = (bool)$_value;
+ break;
+
+ case 'minute_interval':
+ case 'second_interval':
+ $$_key = (int)$_value;
+ break;
+
+ default:
+ $smarty->trigger_error("[html_select_time] unknown parameter $_key", E_USER_WARNING);
+ }
+ }
+
+ $time = smarty_make_timestamp($time);
+
+ $html_result = '';
+
+ if ($display_hours) {
+ $hours = $use_24_hours ? range(0, 23) : range(1, 12);
+ $hour_fmt = $use_24_hours ? '%H' : '%I';
+ for ($i = 0, $for_max = count($hours); $i < $for_max; $i++)
+ $hours[$i] = sprintf('%02d', $hours[$i]);
+ $html_result .= '<select name=';
+ if (null !== $field_array) {
+ $html_result .= '"' . $field_array . '[' . $prefix . 'Hour]"';
+ } else {
+ $html_result .= '"' . $prefix . 'Hour"';
+ }
+ if (null !== $hour_extra){
+ $html_result .= ' ' . $hour_extra;
+ }
+ if (null !== $all_extra){
+ $html_result .= ' ' . $all_extra;
+ }
+ $html_result .= '>'."\n";
+ $html_result .= smarty_function_html_options(array('output' => $hours,
+ 'values' => $hours,
+ 'selected' => strftime($hour_fmt, $time),
+ 'print_result' => false),
+ $smarty);
+ $html_result .= "</select>\n";
+ }
+
+ if ($display_minutes) {
+ $all_minutes = range(0, 59);
+ for ($i = 0, $for_max = count($all_minutes); $i < $for_max; $i+= $minute_interval)
+ $minutes[] = sprintf('%02d', $all_minutes[$i]);
+ $selected = intval(floor(strftime('%M', $time) / $minute_interval) * $minute_interval);
+ $html_result .= '<select name=';
+ if (null !== $field_array) {
+ $html_result .= '"' . $field_array . '[' . $prefix . 'Minute]"';
+ } else {
+ $html_result .= '"' . $prefix . 'Minute"';
+ }
+ if (null !== $minute_extra){
+ $html_result .= ' ' . $minute_extra;
+ }
+ if (null !== $all_extra){
+ $html_result .= ' ' . $all_extra;
+ }
+ $html_result .= '>'."\n";
+
+ $html_result .= smarty_function_html_options(array('output' => $minutes,
+ 'values' => $minutes,
+ 'selected' => $selected,
+ 'print_result' => false),
+ $smarty);
+ $html_result .= "</select>\n";
+ }
+
+ if ($display_seconds) {
+ $all_seconds = range(0, 59);
+ for ($i = 0, $for_max = count($all_seconds); $i < $for_max; $i+= $second_interval)
+ $seconds[] = sprintf('%02d', $all_seconds[$i]);
+ $selected = intval(floor(strftime('%S', $time) / $second_interval) * $second_interval);
+ $html_result .= '<select name=';
+ if (null !== $field_array) {
+ $html_result .= '"' . $field_array . '[' . $prefix . 'Second]"';
+ } else {
+ $html_result .= '"' . $prefix . 'Second"';
+ }
+
+ if (null !== $second_extra){
+ $html_result .= ' ' . $second_extra;
+ }
+ if (null !== $all_extra){
+ $html_result .= ' ' . $all_extra;
+ }
+ $html_result .= '>'."\n";
+
+ $html_result .= smarty_function_html_options(array('output' => $seconds,
+ 'values' => $seconds,
+ 'selected' => $selected,
+ 'print_result' => false),
+ $smarty);
+ $html_result .= "</select>\n";
+ }
+
+ if ($display_meridian && !$use_24_hours) {
+ $html_result .= '<select name=';
+ if (null !== $field_array) {
+ $html_result .= '"' . $field_array . '[' . $prefix . 'Meridian]"';
+ } else {
+ $html_result .= '"' . $prefix . 'Meridian"';
+ }
+
+ if (null !== $meridian_extra){
+ $html_result .= ' ' . $meridian_extra;
+ }
+ if (null !== $all_extra){
+ $html_result .= ' ' . $all_extra;
+ }
+ $html_result .= '>'."\n";
+
+ $html_result .= smarty_function_html_options(array('output' => array('AM', 'PM'),
+ 'values' => array('am', 'pm'),
+ 'selected' => strtolower(strftime('%p', $time)),
+ 'print_result' => false),
+ $smarty);
+ $html_result .= "</select>\n";
+ }
+
+ return $html_result;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_select_time.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_table.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_table.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_table.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,136 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {html_table} function plugin
+ *
+ * Type: function<br>
+ * Name: html_table<br>
+ * Date: Feb 17, 2003<br>
+ * Purpose: make an html table from an array of data<br>
+ * Input:<br>
+ * - loop = array to loop through
+ * - cols = number of columns
+ * - rows = number of rows
+ * - table_attr = table attributes
+ * - tr_attr = table row attributes (arrays are cycled)
+ * - td_attr = table cell attributes (arrays are cycled)
+ * - trailpad = value to pad trailing cells with
+ * - vdir = vertical direction (default: "down", means top-to-bottom)
+ * - hdir = horizontal direction (default: "right", means left-to-right)
+ * - inner = inner loop (default "cols": print $loop line by line,
+ * $loop will be printed column by column otherwise)
+ *
+ *
+ * Examples:
+ * <pre>
+ * {table loop=$data}
+ * {table loop=$data cols=4 tr_attr='"bgcolor=red"'}
+ * {table loop=$data cols=4 tr_attr=$colors}
+ * </pre>
+ * @author Monte Ohrt <monte at ispi.net>
+ * @version 1.0
+ * @link http://smarty.php.net/manual/en/language.function.html.table.php {html_table}
+ * (Smarty online manual)
+ * @param array
+ * @param Smarty
+ * @return string
+ */
+function smarty_function_html_table($params, &$smarty)
+{
+ $table_attr = 'border="1"';
+ $tr_attr = '';
+ $td_attr = '';
+ $cols = 3;
+ $rows = 3;
+ $trailpad = ' ';
+ $vdir = 'down';
+ $hdir = 'right';
+ $inner = 'cols';
+
+ if (!isset($params['loop'])) {
+ $smarty->trigger_error("html_table: missing 'loop' parameter");
+ return;
+ }
+
+ foreach ($params as $_key=>$_value) {
+ switch ($_key) {
+ case 'loop':
+ $$_key = (array)$_value;
+ break;
+
+ case 'cols':
+ case 'rows':
+ $$_key = (int)$_value;
+ break;
+
+ case 'table_attr':
+ case 'trailpad':
+ case 'hdir':
+ case 'vdir':
+ $$_key = (string)$_value;
+ break;
+
+ case 'tr_attr':
+ case 'td_attr':
+ $$_key = $_value;
+ break;
+ }
+ }
+
+ $loop_count = count($loop);
+ if (empty($params['rows'])) {
+ /* no rows specified */
+ $rows = ceil($loop_count/$cols);
+ } elseif (empty($params['cols'])) {
+ if (!empty($params['rows'])) {
+ /* no cols specified, but rows */
+ $cols = ceil($loop_count/$rows);
+ }
+ }
+
+ $output = "<table $table_attr>\n";
+
+ for ($r=0; $r<$rows; $r++) {
+ $output .= "<tr" . smarty_function_html_table_cycle('tr', $tr_attr, $r) . ">\n";
+ $rx = ($vdir == 'down') ? $r*$cols : ($rows-1-$r)*$cols;
+
+ for ($c=0; $c<$cols; $c++) {
+ $x = ($hdir == 'right') ? $rx+$c : $rx+$cols-1-$c;
+ if ($inner!='cols') {
+ /* shuffle x to loop over rows*/
+ $x = floor($x/$cols) + ($x%$cols)*$rows;
+ }
+
+ if ($x<$loop_count) {
+ $output .= "<td" . smarty_function_html_table_cycle('td', $td_attr, $c) . ">" . $loop[$x] . "</td>\n";
+ } else {
+ $output .= "<td" . smarty_function_html_table_cycle('td', $td_attr, $c) . ">$trailpad</td>\n";
+ }
+ }
+ $output .= "</tr>\n";
+ }
+ $output .= "</table>\n";
+
+ return $output;
+}
+
+function smarty_function_html_table_cycle($name, $var, $no) {
+ if(!is_array($var)) {
+ $ret = $var;
+ } else {
+ $ret = $var[$no % count($var)];
+ }
+
+ return ($ret) ? ' '.$ret : '';
+}
+
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.html_table.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.mailto.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.mailto.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.mailto.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,143 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {mailto} function plugin
+ *
+ * Type: function<br>
+ * Name: mailto<br>
+ * Date: May 21, 2002
+ * Purpose: automate mailto address link creation, and optionally
+ * encode them.<br>
+ * Input:<br>
+ * - address = e-mail address
+ * - text = (optional) text to display, default is address
+ * - encode = (optional) can be one of:
+ * * none : no encoding (default)
+ * * javascript : encode with javascript
+ * * hex : encode with hexidecimal (no javascript)
+ * - cc = (optional) address(es) to carbon copy
+ * - bcc = (optional) address(es) to blind carbon copy
+ * - subject = (optional) e-mail subject
+ * - newsgroups = (optional) newsgroup(s) to post to
+ * - followupto = (optional) address(es) to follow up to
+ * - extra = (optional) extra tags for the href link
+ *
+ * Examples:
+ * <pre>
+ * {mailto address="me at domain.com"}
+ * {mailto address="me at domain.com" encode="javascript"}
+ * {mailto address="me at domain.com" encode="hex"}
+ * {mailto address="me at domain.com" subject="Hello to you!"}
+ * {mailto address="me at domain.com" cc="you at domain.com,they at domain.com"}
+ * {mailto address="me at domain.com" extra='class="mailto"'}
+ * </pre>
+ * @link http://smarty.php.net/manual/en/language.function.mailto.php {mailto}
+ * (Smarty online manual)
+ * @version 1.2
+ * @author Monte Ohrt <monte at ispi.net>
+ * @author credits to Jason Sweat (added cc, bcc and subject functionality)
+ * @param array
+ * @param Smarty
+ * @return string
+ */
+function smarty_function_mailto($params, &$smarty)
+{
+ $extra = '';
+
+ if (empty($params['address'])) {
+ $smarty->trigger_error("mailto: missing 'address' parameter");
+ return;
+ } else {
+ $address = $params['address'];
+ }
+
+ $text = $address;
+
+ // netscape and mozilla do not decode %40 (@) in BCC field (bug?)
+ // so, don't encode it.
+ $mail_parms = array();
+ foreach ($params as $var=>$value) {
+ switch ($var) {
+ case 'cc':
+ case 'bcc':
+ case 'followupto':
+ if (!empty($value))
+ $mail_parms[] = $var.'='.str_replace('%40','@',rawurlencode($value));
+ break;
+
+ case 'subject':
+ case 'newsgroups':
+ $mail_parms[] = $var.'='.rawurlencode($value);
+ break;
+
+ case 'extra':
+ case 'text':
+ $$var = $value;
+
+ default:
+ }
+ }
+
+ $mail_parm_vals = '';
+ for ($i=0; $i<count($mail_parms); $i++) {
+ $mail_parm_vals .= (0==$i) ? '?' : '&';
+ $mail_parm_vals .= $mail_parms[$i];
+ }
+ $address .= $mail_parm_vals;
+
+ $encode = (empty($params['encode'])) ? 'none' : $params['encode'];
+ if (!in_array($encode,array('javascript','hex','none')) ) {
+ $smarty->trigger_error("mailto: 'encode' parameter must be none, javascript or hex");
+ return;
+ }
+
+ if ($encode == 'javascript' ) {
+ $string = 'document.write(\'<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>\');';
+
+ $js_encode = '';
+ for ($x=0; $x < strlen($string); $x++) {
+ $js_encode .= '%' . bin2hex($string[$x]);
+ }
+
+ return '<script type="text/javascript">eval(unescape(\''.$js_encode.'\'))</script>';
+
+ } elseif ($encode == 'hex') {
+
+ preg_match('!^(.*)(\?.*)$!',$address,$match);
+ if(!empty($match[2])) {
+ $smarty->trigger_error("mailto: hex encoding does not work with extra attributes. Try javascript.");
+ return;
+ }
+ $address_encode = '';
+ for ($x=0; $x < strlen($address); $x++) {
+ if(preg_match('!\w!',$address[$x])) {
+ $address_encode .= '%' . bin2hex($address[$x]);
+ } else {
+ $address_encode .= $address[$x];
+ }
+ }
+ $text_encode = '';
+ for ($x=0; $x < strlen($text); $x++) {
+ $text_encode .= '&#x' . bin2hex($text[$x]).';';
+ }
+
+ $mailto = "mailto:";
+ return '<a href="'.$mailto.$address_encode.'" '.$extra.'>'.$text_encode.'</a>';
+
+ } else {
+ // no encoding
+ return '<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>';
+
+ }
+
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.mailto.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.math.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.math.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.math.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,82 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {math} function plugin
+ *
+ * Type: function<br>
+ * Name: math<br>
+ * Purpose: handle math computations in template<br>
+ * @link http://smarty.php.net/manual/en/language.function.math.php {math}
+ * (Smarty online manual)
+ * @param array
+ * @param Smarty
+ * @return string
+ */
+function smarty_function_math($params, &$smarty)
+{
+ // be sure equation parameter is present
+ if (empty($params['equation'])) {
+ $smarty->trigger_error("math: missing equation parameter");
+ return;
+ }
+
+ $equation = $params['equation'];
+
+ // make sure parenthesis are balanced
+ if (substr_count($equation,"(") != substr_count($equation,")")) {
+ $smarty->trigger_error("math: unbalanced parenthesis");
+ return;
+ }
+
+ // match all vars in equation, make sure all are passed
+ preg_match_all("!\!(0x)([a-zA-Z][a-zA-Z0-9_]*)!",$equation, $match);
+ $allowed_funcs = array('int','abs','ceil','cos','exp','floor','log','log10',
+ 'max','min','pi','pow','rand','round','sin','sqrt','srand','tan');
+ foreach($match[2] as $curr_var) {
+ if (!in_array($curr_var,array_keys($params)) && !in_array($curr_var, $allowed_funcs)) {
+ $smarty->trigger_error("math: parameter $curr_var not passed as argument");
+ return;
+ }
+ }
+
+ foreach($params as $key => $val) {
+ if ($key != "equation" && $key != "format" && $key != "assign") {
+ // make sure value is not empty
+ if (strlen($val)==0) {
+ $smarty->trigger_error("math: parameter $key is empty");
+ return;
+ }
+ if (!is_numeric($val)) {
+ $smarty->trigger_error("math: parameter $key: is not numeric");
+ return;
+ }
+ $equation = preg_replace("/\b$key\b/",$val, $equation);
+ }
+ }
+
+ eval("\$smarty_math_result = ".$equation.";");
+
+ if (empty($params['format'])) {
+ if (empty($params['assign'])) {
+ return $smarty_math_result;
+ } else {
+ $smarty->assign($params['assign'],$smarty_math_result);
+ }
+ } else {
+ if (empty($params['assign'])){
+ printf($params['format'],$smarty_math_result);
+ } else {
+ $smarty->assign($params['assign'],sprintf($params['format'],$smarty_math_result));
+ }
+ }
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.math.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.popup.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.popup.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.popup.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,110 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {popup} function plugin
+ *
+ * Type: function<br>
+ * Name: popup<br>
+ * Purpose: make text pop up in windows via overlib
+ * @link http://smarty.php.net/manual/en/language.function.popup.php {popup}
+ * (Smarty online manual)
+ * @param array
+ * @param Smarty
+ * @return string
+ */
+function smarty_function_popup($params, &$smarty)
+{
+ $append = '';
+ foreach ($params as $_key=>$_value) {
+ switch ($_key) {
+ case 'text':
+ case 'trigger':
+ $$_key = (string)$_value;
+ break;
+
+ case 'caption':
+ case 'closetext':
+ case 'status':
+ $append .= ',' . strtoupper($_key) . ",'" . str_replace("'","\'",$_value) . "'";
+ break;
+
+ case 'fgcolor':
+ case 'bgcolor':
+ case 'textcolor':
+ case 'capcolor':
+ case 'closecolor':
+ case 'textfont':
+ case 'captionfont':
+ case 'closefont':
+ case 'fgbackground':
+ case 'bgbackground':
+ case 'inarray':
+ case 'caparray':
+ case 'capicon':
+ case 'background':
+ case 'frame':
+ case 'function':
+ $append .= ',' . strtoupper($_key) . ",'$_value'";
+ break;
+
+ case 'textsize':
+ case 'captionsize':
+ case 'closesize':
+ case 'width':
+ case 'height':
+ case 'border':
+ case 'offsetx':
+ case 'offsety':
+ case 'snapx':
+ case 'snapy':
+ case 'fixx':
+ case 'fixy':
+ case 'padx':
+ case 'pady':
+ case 'timeout':
+ case 'delay':
+ $append .= ',' . strtoupper($_key) . ",$_value";
+ break;
+
+ case 'sticky':
+ case 'left':
+ case 'right':
+ case 'center':
+ case 'above':
+ case 'below':
+ case 'noclose':
+ case 'autostatus':
+ case 'autostatuscap':
+ case 'fullhtml':
+ case 'hauto':
+ case 'vauto':
+ if ($_value) $append .= ',' . strtoupper($_key);
+ break;
+
+ default:
+ $smarty->trigger_error("[popup] unknown parameter $_key", E_USER_WARNING);
+ }
+ }
+
+ if (empty($text) && !isset($inarray) && empty($function)) {
+ $smarty->trigger_error("overlib: attribute 'text' or 'inarray' or 'function' required");
+ return false;
+ }
+
+ if (empty($trigger)) { $trigger = "onmouseover"; }
+
+ $retval = $trigger . '="return overlib(\''.preg_replace(array("!'!","![\r\n]!"),array("\'",'\r'),$text).'\'';
+ $retval .= $append . ');" onmouseout="nd();"';
+
+ return $retval;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.popup.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.popup_init.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.popup_init.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.popup_init.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {popup_init} function plugin
+ *
+ * Type: function<br>
+ * Name: popup_init<br>
+ * Purpose: initialize overlib
+ * @link http://smarty.php.net/manual/en/language.function.popup.init.php {popup_init}
+ * (Smarty online manual)
+ * @param array
+ * @param Smarty
+ * @return string
+ */
+function smarty_function_popup_init($params, &$smarty)
+{
+ $zindex = 1000;
+
+ if (!empty($params['zindex'])) {
+ $zindex = $params['zindex'];
+ }
+
+ if (!empty($params['src'])) {
+ return '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>' . "\n"
+ . '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>' . "\n";
+ } else {
+ $smarty->trigger_error("popup_init: missing src parameter");
+ }
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.popup_init.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.xoops_link.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.xoops_link.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.xoops_link.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,103 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+/*
+ * Smarty plugin
+ * -------------------------------------------------------------
+ * Type: function
+ * Name: xoops_link
+ * Version: 1.0
+ * Author: Skalpa Keo <skalpa at xoops.org>
+ * Purpose: format URL for linking to specific Xoops page
+ * Input: module = module to link to (optional, default to current module)
+ * page = page to link to (optional, default to current page)
+ * params = query string parameters (optional, default to empty)
+ * ex: urlparm1=,urlparm2,urlparm3=val3, etc.....
+ * urlparm3 value will be set to val3
+ * urlparm2 value will keep current one (no = sign)
+ * urlparm1 value will be set to empty ( = sign, but nothing after)
+ *
+ * I.e: The template called by 'index.php?cid=5' calls this function with
+ * {xoops_link page="viewcat.php" urlvars="cid,orderby=titleA"}>
+ * Then the generated URL will be:
+ * XOOPS_URL/modules/MODULENAME/viewcat.php?cid=5&orderby=titleA
+ * -------------------------------------------------------------
+ */
+
+function smarty_function_xoops_link($params, $smarty) {
+ $urlstr='';
+ if (isset($params['urlvars'])) {
+ $szvars=explode( '&', $params['urlvars'] );
+ $vars=array();
+ // Split the string making an array from the ('name','value') pairs
+ foreach ($szvars as $szvar) {
+ $pos=strpos($szvar,'=');
+ if ( $pos != false ) { // If a value is specified, use it
+ $vars[] = array( 'name' => substr($szvar,0,$pos), 'value' => substr($szvar,$pos+1) );
+ } else { // Otherwise use current one (if any)
+ if ( isset($_POST[$szvar]) ) {
+ $vars[] = array( 'name' => $szvar, 'value' => $_POST[$szvar] );
+ } elseif ( isset($_GET[$szvar]) ) {
+ $vars[] = array( 'name' => $szvar, 'value' => $_GET[$szvar] );
+ }
+ }
+ }
+ // Now reconstruct query string from specified variables
+ foreach ($vars as $var) {
+ $urlstr = "$urlstr&{$var['name']}={$var['value']}";
+ }
+ if ( strlen($urlstr) > 0 ) {
+ $urlstr = '?' . substr( $urlstr, 1 );
+ }
+ }
+
+ // Get default module/page from current ones if necessary
+ $module='';
+ $page='';
+ if ( !isset($params['module']) ) {
+ if ( isset($GLOBALS['xoopsModule']) && is_object($GLOBALS['xoopsModule']) ) {
+ $module = $GLOBALS['xoopsModule']->getVar('dirname');
+ }
+ } else {
+ $module = $params['module'];
+ }
+ if ( !isset($params['page']) ) {
+ $url = parse_url($_SERVER['REQUEST_URI']);
+ $cur = $url['path'];
+ $page = substr( $cur, strrpos( $cur, '/' ) + 1 );
+ } else {
+ $page = $params['page'];
+ }
+ // Now, return entire link URL :-)
+ if ( empty($module) ) {
+ echo XOOPS_URL . "/$page" . $urlstr;
+ } else {
+ echo XOOPS_URL . "/modules/$module/$page" . $urlstr;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/function.xoops_link.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.capitalize.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.capitalize.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.capitalize.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,42 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty capitalize modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: capitalize<br>
+ * Purpose: capitalize words in the string
+ * @link http://smarty.php.net/manual/en/language.modifiers.php#LANGUAGE.MODIFIER.CAPITALIZE
+ * capitalize (Smarty online manual)
+ * @param string
+ * @return string
+ */
+function smarty_modifier_capitalize($string, $uc_digits = false)
+{
+ smarty_modifier_capitalize_ucfirst(null, $uc_digits);
+ return preg_replace_callback('!\b\w+\b!', 'smarty_modifier_capitalize_ucfirst', $string);
+}
+
+function smarty_modifier_capitalize_ucfirst($string, $uc_digits = null)
+{
+ static $_uc_digits = false;
+
+ if(isset($uc_digits)) {
+ $_uc_digits = $uc_digits;
+ return;
+ }
+
+ if(!preg_match('!\d!',$string[0]) || $_uc_digits)
+ return ucfirst($string[0]);
+ else
+ return $string[0];
+}
+
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.capitalize.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.cat.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.cat.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.cat.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty cat modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: cat<br>
+ * Date: Feb 24, 2003
+ * Purpose: catenate a value to a variable
+ * Input: string to catenate
+ * Example: {$var|cat:"foo"}
+ * @link http://smarty.php.net/manual/en/language.modifier.cat.php cat
+ * (Smarty online manual)
+ * @author Monte Ohrt <monte at ispi.net>
+ * @version 1.0
+ * @param string
+ * @param string
+ * @return string
+ */
+function smarty_modifier_cat($string, $cat)
+{
+ return $string . $cat;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.cat.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_characters.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_characters.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_characters.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty count_characters modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: count_characteres<br>
+ * Purpose: count the number of characters in a text
+ * @link http://smarty.php.net/manual/en/language.modifier.count.characters.php
+ * count_characters (Smarty online manual)
+ * @param string
+ * @param boolean include whitespace in the character count
+ * @return integer
+ */
+function smarty_modifier_count_characters($string, $include_spaces = false)
+{
+ if ($include_spaces)
+ return(strlen($string));
+
+ return preg_match_all("/[^\s]/",$string, $match);
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_characters.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_paragraphs.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_paragraphs.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_paragraphs.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty count_paragraphs modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: count_paragraphs<br>
+ * Purpose: count the number of paragraphs in a text
+ * @link http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php
+ * count_paragraphs (Smarty online manual)
+ * @param string
+ * @return integer
+ */
+function smarty_modifier_count_paragraphs($string)
+{
+ // count \r or \n characters
+ return count(preg_split('/[\r\n]+/', $string));
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_paragraphs.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_sentences.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_sentences.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_sentences.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty count_sentences modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: count_sentences
+ * Purpose: count the number of sentences in a text
+ * @link http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php
+ * count_sentences (Smarty online manual)
+ * @param string
+ * @return integer
+ */
+function smarty_modifier_count_sentences($string)
+{
+ // find periods with a word before but not after.
+ return preg_match_all('/[^\s]\.(?!\w)/', $string, $match);
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_sentences.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_words.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_words.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_words.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty count_words modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: count_words<br>
+ * Purpose: count the number of words in a text
+ * @link http://smarty.php.net/manual/en/language.modifier.count.words.php
+ * count_words (Smarty online manual)
+ * @param string
+ * @return integer
+ */
+function smarty_modifier_count_words($string)
+{
+ // split text by ' ',\r,\n,\f,\t
+ $split_array = preg_split('/\s+/',$string);
+ // count matches that contain alphanumerics
+ $word_count = preg_grep('/[a-zA-Z0-9\\x80-\\xff]/', $split_array);
+
+ return count($word_count);
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.count_words.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.date_format.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.date_format.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.date_format.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Include the {@link shared.make_timestamp.php} plugin
+ */
+require_once $smarty->_get_plugin_filepath('shared','make_timestamp');
+/**
+ * Smarty date_format modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: date_format<br>
+ * Purpose: format datestamps via strftime<br>
+ * Input:<br>
+ * - string: input date string
+ * - format: strftime format for output
+ * - default_date: default date if $string is empty
+ * @link http://smarty.php.net/manual/en/language.modifier.date.format.php
+ * date_format (Smarty online manual)
+ * @param string
+ * @param string
+ * @param string
+ * @return string|void
+ * @uses smarty_make_timestamp()
+ */
+function smarty_modifier_date_format($string, $format="%b %e, %Y", $default_date=null)
+{
+ if (substr(PHP_OS,0,3) == 'WIN') {
+ $_win_from = array ('%e', '%T', '%D');
+ $_win_to = array ('%#d', '%H:%M:%S', '%m/%d/%y');
+ $format = str_replace($_win_from, $_win_to, $format);
+ }
+ if($string != '') {
+ return strftime($format, smarty_make_timestamp($string));
+ } elseif (isset($default_date) && $default_date != '') {
+ return strftime($format, smarty_make_timestamp($default_date));
+ } else {
+ return;
+ }
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.date_format.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.debug_print_var.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.debug_print_var.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.debug_print_var.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,56 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty debug_print_var modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: debug_print_var<br>
+ * Purpose: formats variable contents for display in the console
+ * @link http://smarty.php.net/manual/en/language.modifier.debug.print.var.php
+ * debug_print_var (Smarty online manual)
+ * @param array|object
+ * @param integer
+ * @param integer
+ * @return string
+ */
+function smarty_modifier_debug_print_var($var, $depth = 0, $length = 40)
+{
+ $_replace = array("\n"=>'<i>\n</i>', "\r"=>'<i>\r</i>', "\t"=>'<i>\t</i>');
+ if (is_array($var)) {
+ $results = "<b>Array (".count($var).")</b>";
+ foreach ($var as $curr_key => $curr_val) {
+ $return = smarty_modifier_debug_print_var($curr_val, $depth+1, $length);
+ $results .= "<br>".str_repeat(' ', $depth*2)."<b>".strtr($curr_key, $_replace)."</b> => $return";
+ }
+ } else if (is_object($var)) {
+ $object_vars = get_object_vars($var);
+ $results = "<b>".get_class($var)." Object (".count($object_vars).")</b>";
+ foreach ($object_vars as $curr_key => $curr_val) {
+ $return = smarty_modifier_debug_print_var($curr_val, $depth+1, $length);
+ $results .= "<br>".str_repeat(' ', $depth*2)."<b>$curr_key</b> => $return";
+ }
+ } else if (is_resource($var)) {
+ $results = '<i>'.(string)$var.'</i>';
+ } else if (empty($var) && $var != "0") {
+ $results = '<i>empty</i>';
+ } else {
+ if (strlen($var) > $length ) {
+ $results = substr($var, 0, $length-3).'...';
+ } else {
+ $results = $var;
+ }
+ $results = htmlspecialchars($results);
+ $results = strtr($results, $_replace);
+ }
+ return $results;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.debug_print_var.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.default.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.default.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.default.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty default modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: default<br>
+ * Purpose: designate default value for empty variables
+ * @link http://smarty.php.net/manual/en/language.modifier.default.php
+ * default (Smarty online manual)
+ * @param string
+ * @param string
+ * @return string
+ */
+function smarty_modifier_default($string, $default = '')
+{
+ if (!isset($string) || $string === '')
+ return $default;
+ else
+ return $string;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.default.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.escape.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.escape.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.escape.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,89 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty escape modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: escape<br>
+ * Purpose: Escape the string according to escapement type
+ * @link http://smarty.php.net/manual/en/language.modifier.escape.php
+ * escape (Smarty online manual)
+ * @param string
+ * @param html|htmlall|url|quotes|hex|hexentity|javascript
+ * @return string
+ */
+function smarty_modifier_escape($string, $esc_type = 'html')
+{
+ switch ($esc_type) {
+ case 'html':
+ return htmlspecialchars($string, ENT_QUOTES);
+
+ case 'htmlall':
+ return htmlentities($string, ENT_QUOTES);
+
+ case 'url':
+ return urlencode($string);
+
+ case 'quotes':
+ // escape unescaped single quotes
+ return preg_replace("%(?<!\\\\)'%", "\\'", $string);
+
+ case 'hex':
+ // escape every character into hex
+ $return = '';
+ for ($x=0; $x < strlen($string); $x++) {
+ $return .= '%' . bin2hex($string[$x]);
+ }
+ return $return;
+
+ case 'hexentity':
+ $return = '';
+ for ($x=0; $x < strlen($string); $x++) {
+ $return .= '&#x' . bin2hex($string[$x]) . ';';
+ }
+ return $return;
+
+ case 'decentity':
+ $return = '';
+ for ($x=0; $x < strlen($string); $x++) {
+ $return .= '&#' . ord($string[$x]) . ';';
+ }
+ return $return;
+
+ case 'javascript':
+ // escape quotes and backslashes, newlines, etc.
+ return strtr($string, array('\\'=>'\\\\',"'"=>"\\'",'"'=>'\\"',"\r"=>'\\r',"\n"=>'\\n','</'=>'<\/'));
+
+ case 'mail':
+ // safe way to display e-mail address on a web page
+ return str_replace(array('@', '.'),array(' [AT] ', ' [DOT] '), $string);
+
+ case 'nonstd':
+ // escape non-standard chars, such as ms document quotes
+ $_res = '';
+ for($_i = 0, $_len = strlen($string); $_i < $_len; $_i++) {
+ $_ord = ord($string{$_i});
+ // non-standard char, escape it
+ if($_ord >= 126){
+ $_res .= '&#' . $_ord . ';';
+ }
+ else {
+ $_res .= $string{$_i};
+ }
+ }
+ return $_res;
+
+ default:
+ return $string;
+ }
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.escape.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.indent.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.indent.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.indent.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty indent modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: indent<br>
+ * Purpose: indent lines of text
+ * @link http://smarty.php.net/manual/en/language.modifier.indent.php
+ * indent (Smarty online manual)
+ * @param string
+ * @param integer
+ * @param string
+ * @return string
+ */
+function smarty_modifier_indent($string,$chars=4,$char=" ")
+{
+ return preg_replace('!^!m',str_repeat($char,$chars),$string);
+}
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.indent.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.lower.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.lower.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.lower.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty lower modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: lower<br>
+ * Purpose: convert string to lowercase
+ * @link http://smarty.php.net/manual/en/language.modifier.lower.php
+ * lower (Smarty online manual)
+ * @param string
+ * @return string
+ */
+function smarty_modifier_lower($string)
+{
+ return strtolower($string);
+}
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.lower.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.nl2br.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.nl2br.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.nl2br.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty plugin
+ *
+ * Type: modifier<br>
+ * Name: nl2br<br>
+ * Date: Feb 26, 2003
+ * Purpose: convert \r\n, \r or \n to <<br>>
+ * Input:<br>
+ * - contents = contents to replace
+ * - preceed_test = if true, includes preceeding break tags
+ * in replacement
+ * Example: {$text|nl2br}
+ * @link http://smarty.php.net/manual/en/language.modifier.nl2br.php
+ * nl2br (Smarty online manual)
+ * @version 1.0
+ * @author Monte Ohrt <monte at ispi.net>
+ * @param string
+ * @return string
+ */
+function smarty_modifier_nl2br($string)
+{
+ return nl2br($string);
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.nl2br.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.regex_replace.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.regex_replace.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.regex_replace.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty regex_replace modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: regex_replace<br>
+ * Purpose: regular epxression search/replace
+ * @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php
+ * regex_replace (Smarty online manual)
+ * @param string
+ * @param string|array
+ * @param string|array
+ * @return string
+ */
+function smarty_modifier_regex_replace($string, $search, $replace)
+{
+ return preg_replace($search, $replace, $string);
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.regex_replace.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.replace.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.replace.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.replace.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty replace modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: replace<br>
+ * Purpose: simple search/replace
+ * @link http://smarty.php.net/manual/en/language.modifier.replace.php
+ * replace (Smarty online manual)
+ * @param string
+ * @param string
+ * @param string
+ * @return string
+ */
+function smarty_modifier_replace($string, $search, $replace)
+{
+ return str_replace($search, $replace, $string);
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.replace.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.spacify.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.spacify.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.spacify.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty spacify modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: spacify<br>
+ * Purpose: add spaces between characters in a string
+ * @link http://smarty.php.net/manual/en/language.modifier.spacify.php
+ * spacify (Smarty online manual)
+ * @param string
+ * @param string
+ * @return string
+ */
+function smarty_modifier_spacify($string, $spacify_char = ' ')
+{
+ return implode($spacify_char,
+ preg_split('//', $string, -1, PREG_SPLIT_NO_EMPTY));
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.spacify.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.string_format.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.string_format.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.string_format.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty string_format modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: string_format<br>
+ * Purpose: format strings via sprintf
+ * @link http://smarty.php.net/manual/en/language.modifier.string.format.php
+ * string_format (Smarty online manual)
+ * @param string
+ * @param string
+ * @return string
+ */
+function smarty_modifier_string_format($string, $format)
+{
+ return sprintf($format, $string);
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.string_format.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.strip.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.strip.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.strip.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty strip modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: strip<br>
+ * Purpose: Replace all repeated spaces, newlines, tabs
+ * with a single space or supplied replacement string.<br>
+ * Example: {$var|strip} {$var|strip:" "}
+ * Date: September 25th, 2002
+ * @link http://smarty.php.net/manual/en/language.modifier.strip.php
+ * strip (Smarty online manual)
+ * @author Monte Ohrt <monte at ispi.net>
+ * @version 1.0
+ * @param string
+ * @param string
+ * @return string
+ */
+function smarty_modifier_strip($text, $replace = ' ')
+{
+ return preg_replace('!\s+!', $replace, $text);
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.strip.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.strip_tags.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.strip_tags.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.strip_tags.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty strip_tags modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: strip_tags<br>
+ * Purpose: strip html tags from text
+ * @link http://smarty.php.net/manual/en/language.modifier.strip.tags.php
+ * strip_tags (Smarty online manual)
+ * @param string
+ * @param boolean
+ * @return string
+ */
+function smarty_modifier_strip_tags($string, $replace_with_space = true)
+{
+ if ($replace_with_space)
+ return preg_replace('!<[^>]*?>!', ' ', $string);
+ else
+ return strip_tags($string);
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.strip_tags.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.truncate.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.truncate.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.truncate.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty truncate modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: truncate<br>
+ * Purpose: Truncate a string to a certain length if necessary,
+ * optionally splitting in the middle of a word, and
+ * appending the $etc string.
+ * @link http://smarty.php.net/manual/en/language.modifier.truncate.php
+ * truncate (Smarty online manual)
+ * @param string
+ * @param integer
+ * @param string
+ * @param boolean
+ * @return string
+ */
+function smarty_modifier_truncate($string, $length = 80, $etc = '...',
+ $break_words = false)
+{
+ if ($length == 0)
+ return '';
+
+ if (strlen($string) > $length) {
+ $length -= strlen($etc);
+ if (!$break_words)
+ $string = preg_replace('/\s+?(\S+)?$/', '', substr($string, 0, $length+1));
+
+ return substr($string, 0, $length).$etc;
+ } else
+ return $string;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.truncate.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.upper.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.upper.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.upper.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty upper modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: upper<br>
+ * Purpose: convert string to uppercase
+ * @link http://smarty.php.net/manual/en/language.modifier.upper.php
+ * upper (Smarty online manual)
+ * @param string
+ * @return string
+ */
+function smarty_modifier_upper($string)
+{
+ return strtoupper($string);
+}
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.upper.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.wordwrap.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.wordwrap.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.wordwrap.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty wordwrap modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: wordwrap<br>
+ * Purpose: wrap a string of text at a given length
+ * @link http://smarty.php.net/manual/en/language.modifier.wordwrap.php
+ * wordwrap (Smarty online manual)
+ * @param string
+ * @param integer
+ * @param string
+ * @param boolean
+ * @return string
+ */
+function smarty_modifier_wordwrap($string,$length=80,$break="\n",$cut=false)
+{
+ return wordwrap($string,$length,$break,$cut);
+}
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/modifier.wordwrap.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/outputfilter.trimwhitespace.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/outputfilter.trimwhitespace.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/outputfilter.trimwhitespace.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,75 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * Smarty trimwhitespace outputfilter plugin
+ *
+ * File: outputfilter.trimwhitespace.php<br>
+ * Type: outputfilter<br>
+ * Name: trimwhitespace<br>
+ * Date: Jan 25, 2003<br>
+ * Purpose: trim leading white space and blank lines from
+ * template source after it gets interpreted, cleaning
+ * up code and saving bandwidth. Does not affect
+ * <<PRE>></PRE> and <SCRIPT></SCRIPT> blocks.<br>
+ * Install: Drop into the plugin directory, call
+ * <code>$smarty->load_filter('output','trimwhitespace');</code>
+ * from application.
+ * @author Monte Ohrt <monte at ispi.net>
+ * @author Contributions from Lars Noschinski <lars at usenet.noschinski.de>
+ * @version 1.3
+ * @param string
+ * @param Smarty
+ */
+function smarty_outputfilter_trimwhitespace($source, &$smarty)
+{
+ // Pull out the script blocks
+ preg_match_all("!<script[^>]+>.*?</script>!is", $source, $match);
+ $_script_blocks = $match[0];
+ $source = preg_replace("!<script[^>]+>.*?</script>!is",
+ '@@@SMARTY:TRIM:SCRIPT@@@', $source);
+
+ // Pull out the pre blocks
+ preg_match_all("!<pre>.*?</pre>!is", $source, $match);
+ $_pre_blocks = $match[0];
+ $source = preg_replace("!<pre>.*?</pre>!is",
+ '@@@SMARTY:TRIM:PRE@@@', $source);
+
+ // Pull out the textarea blocks
+ preg_match_all("!<textarea[^>]+>.*?</textarea>!is", $source, $match);
+ $_textarea_blocks = $match[0];
+ $source = preg_replace("!<textarea[^>]+>.*?</textarea>!is",
+ '@@@SMARTY:TRIM:TEXTAREA@@@', $source);
+
+ // remove all leading spaces, tabs and carriage returns NOT
+ // preceeded by a php close tag.
+ $source = trim(preg_replace('/((?<!\?>)\n)[\s]+/m', '\1', $source));
+
+ // replace script blocks
+ smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:SCRIPT@@@",$_script_blocks, $source);
+
+ // replace pre blocks
+ smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:PRE@@@",$_pre_blocks, $source);
+
+ // replace textarea blocks
+ smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:TEXTAREA@@@",$_textarea_blocks, $source);
+
+ return $source;
+}
+
+function smarty_outputfilter_trimwhitespace_replace($search_str, $replace, &$subject) {
+ $_len = strlen($search_str);
+ $_pos = 0;
+ for ($_i=0, $_count=count($replace); $_i<$_count; $_i++)
+ if (($_pos=strpos($subject, $search_str, $_pos))!==false)
+ $subject = substr_replace($subject, $replace[$_i], $_pos, $_len);
+ else
+ break;
+
+}
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/outputfilter.trimwhitespace.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/resource.db.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/resource.db.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/resource.db.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,123 @@
+<?php
+/*
+ * Smarty plugin
+ * -------------------------------------------------------------
+ * File: resource.db.php
+ * Type: resource
+ * Name: db
+ * Purpose: Fetches templates from a database
+ * -------------------------------------------------------------
+ */
+function smarty_resource_db_source($tpl_name, &$tpl_source, &$smarty)
+{
+ $tplfile_handler =& xoops_gethandler('tplfile');
+ $tplobj =& $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], null, null, null, $tpl_name, true);
+ if (count($tplobj) > 0) {
+ if (false != $smarty->xoops_canUpdateFromFile()) {
+ $conf_theme = isset($GLOBALS['xoopsConfig']['theme_set']) ? $GLOBALS['xoopsConfig']['theme_set'] : 'default';
+ if ($conf_theme != 'default') {
+ switch ($tplobj[0]->getVar('tpl_type')) {
+ case 'module':
+ $filepath = XOOPS_THEME_PATH.'/'.$conf_theme.'/templates/'.$tplobj[0]->getVar('tpl_module').'/'.$tpl_name;
+ break;
+ case 'block':
+ $filepath = XOOPS_THEME_PATH.'/'.$conf_theme.'/templates/'.$tplobj[0]->getVar('tpl_module').'/blocks/'.$tpl_name;
+ break;
+ default:
+ $filepath = "";
+ break;
+ }
+ } else {
+ switch ($tplobj[0]->getVar('tpl_type')) {
+ case 'module':
+ $filepath = XOOPS_ROOT_PATH.'/modules/'.$tplobj[0]->getVar('tpl_module').'/templates/'.$tpl_name;
+ break;
+ case 'block':
+ $filepath = XOOPS_ROOT_PATH.'/modules/'.$tplobj[0]->getVar('tpl_module').'/templates/blocks/'.$tpl_name;
+ break;
+ default:
+ $filepath = "";
+ break;
+ }
+ }
+ if ($filepath != "" && file_exists($filepath)) {
+ $file_modified = filemtime($filepath);
+ if ($file_modified > $tplobj[0]->getVar('tpl_lastmodified')) {
+ if (false != $fp = fopen($filepath, 'r')) {
+ $filesource = fread($fp, filesize($filepath));
+ fclose($fp);
+ $tplobj[0]->setVar('tpl_source', $filesource, true);
+ $tplobj[0]->setVar('tpl_lastmodified', time());
+ $tplobj[0]->setVar('tpl_lastimported', time());
+ $tplfile_handler->forceUpdate($tplobj[0]);
+ $tpl_source = $filesource;
+ return true;
+ }
+ }
+ }
+ }
+ $tpl_source = $tplobj[0]->getVar('tpl_source');
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function smarty_resource_db_timestamp($tpl_name, &$tpl_timestamp, &$smarty)
+{
+ $tplfile_handler =& xoops_gethandler('tplfile');
+ $tplobj =& $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], null, null, null, $tpl_name, false);
+ if (count($tplobj) > 0) {
+ if (false != $smarty->xoops_canUpdateFromFile()) {
+ $conf_theme = isset($GLOBALS['xoopsConfig']['theme_set']) ? $GLOBALS['xoopsConfig']['theme_set'] : 'default';
+ if ($conf_theme != 'default') {
+ switch ($tplobj[0]->getVar('tpl_type')) {
+ case 'module':
+ $filepath = XOOPS_THEME_PATH.'/'.$conf_theme.'/templates/'.$tplobj[0]->getVar('tpl_module').'/'.$tpl_name;
+ break;
+ case 'block':
+ $filepath = XOOPS_THEME_PATH.'/'.$conf_theme.'/templates/'.$tplobj[0]->getVar('tpl_module').'/blocks/'.$tpl_name;
+ break;
+ default:
+ $filepath = "";
+ break;
+ }
+ } else {
+ switch ($tplobj[0]->getVar('tpl_type')) {
+ case 'module':
+ $filepath = XOOPS_ROOT_PATH.'/modules/'.$tplobj[0]->getVar('tpl_module').'/templates/'.$tpl_name;
+ break;
+ case 'block':
+ $filepath = XOOPS_ROOT_PATH.'/modules/'.$tplobj[0]->getVar('tpl_module').'/templates/blocks/'.$tpl_name;
+ break;
+ default:
+ $filepath = "";
+ break;
+ }
+ }
+ if ($filepath != "" && file_exists($filepath)) {
+ $file_modified = filemtime($filepath);
+ if ($file_modified > $tplobj[0]->getVar('tpl_lastmodified')) {
+ $tpl_timestamp = $file_modified;
+ return true;
+ }
+ }
+ }
+ $tpl_timestamp = $tplobj[0]->getVar('tpl_lastmodified');
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function smarty_resource_db_secure($tpl_name, &$smarty)
+{
+ // assume all templates are secure
+ return true;
+}
+
+function smarty_resource_db_trusted($tpl_name, &$smarty)
+{
+ // not used for templates
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/resource.db.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/shared.escape_special_chars.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/shared.escape_special_chars.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/shared.escape_special_chars.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Smarty shared plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * escape_special_chars common function
+ *
+ * Function: smarty_function_escape_special_chars<br>
+ * Purpose: used by other smarty functions to escape
+ * special chars except for already escaped ones
+ * @param string
+ * @return string
+ */
+function smarty_function_escape_special_chars($string)
+{
+ if(!is_array($string)) {
+ $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
+ $string = htmlspecialchars($string);
+ $string = str_replace(array('%%%SMARTY_START%%%','%%%SMARTY_END%%%'), array('&',';'), $string);
+ }
+ return $string;
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/shared.escape_special_chars.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/shared.make_timestamp.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/shared.make_timestamp.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/shared.make_timestamp.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Smarty shared plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Function: smarty_make_timestamp<br>
+ * Purpose: used by other smarty functions to make a timestamp
+ * from a string.
+ * @param string
+ * @return string
+ */
+function smarty_make_timestamp($string)
+{
+ if(empty($string)) {
+ $string = "now";
+ }
+ $time = strtotime($string);
+ if (is_numeric($time) && $time != -1)
+ return $time;
+
+ // is mysql timestamp format of YYYYMMDDHHMMSS?
+ if (preg_match('/^\d{14}$/', $string)) {
+ $time = mktime(substr($string,8,2),substr($string,10,2),substr($string,12,2),
+ substr($string,4,2),substr($string,6,2),substr($string,0,4));
+
+ return $time;
+ }
+
+ // couldn't recognize it, try to return a time
+ $time = (int) $string;
+ if ($time > 0)
+ return $time;
+ else
+ return time();
+}
+
+/* vim: set expandtab: */
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/smarty/plugins/shared.make_timestamp.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/snoopy/Snoopy.class.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/snoopy/Snoopy.class.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/snoopy/Snoopy.class.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,1234 @@
+<?php
+
+/*************************************************
+
+Snoopy - the PHP net client
+Author: Monte Ohrt <monte at ispi.net>
+Copyright (c): 1999-2000 ispi, all rights reserved
+Version: 1.2
+
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+You may contact the author of Snoopy by e-mail at:
+monte at ispi.net
+
+Or, write to:
+Monte Ohrt
+CTO, ispi
+237 S. 70th suite 220
+Lincoln, NE 68510
+
+The latest version of Snoopy can be obtained from:
+http://snoopy.sourceforge.net/
+
+*************************************************/
+
+class Snoopy
+{
+ /**** Public variables ****/
+
+ /* user definable vars */
+
+ var $host = "www.php.net"; // host name we are connecting to
+ var $port = 80; // port we are connecting to
+ var $proxy_host = ""; // proxy host to use
+ var $proxy_port = ""; // proxy port to use
+ var $proxy_user = ""; // proxy user to use
+ var $proxy_pass = ""; // proxy password to use
+
+ var $agent = "Snoopy v1.2"; // agent we masquerade as
+ var $referer = ""; // referer info to pass
+ var $cookies = array(); // array of cookies to pass
+ // $cookies["username"]="joe";
+ var $rawheaders = array(); // array of raw headers to send
+ // $rawheaders["Content-type"]="text/html";
+
+ var $maxredirs = 5; // http redirection depth maximum. 0 = disallow
+ var $lastredirectaddr = ""; // contains address of last redirected address
+ var $offsiteok = true; // allows redirection off-site
+ var $maxframes = 0; // frame content depth maximum. 0 = disallow
+ var $expandlinks = true; // expand links to fully qualified URLs.
+ // this only applies to fetchlinks()
+ // or submitlinks()
+ var $passcookies = true; // pass set cookies back through redirects
+ // NOTE: this currently does not respect
+ // dates, domains or paths.
+
+ var $user = ""; // user for http authentication
+ var $pass = ""; // password for http authentication
+
+ // http accept types
+ var $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*";
+
+ var $results = ""; // where the content is put
+
+ var $error = ""; // error messages sent here
+ var $response_code = ""; // response code returned from server
+ var $headers = array(); // headers returned from server sent here
+ var $maxlength = 500000; // max return data length (body)
+ var $read_timeout = 0; // timeout on read operations, in seconds
+ // supported only since PHP 4 Beta 4
+ // set to 0 to disallow timeouts
+ var $timed_out = false; // if a read operation timed out
+ var $status = 0; // http request status
+
+ var $temp_dir = "/tmp"; // temporary directory that the webserver
+ // has permission to write to.
+ // under Windows, this should be C:\temp
+
+ var $curl_path = "/usr/local/bin/curl";
+ // Snoopy will use cURL for fetching
+ // SSL content if a full system path to
+ // the cURL binary is supplied here.
+ // set to false if you do not have
+ // cURL installed. See http://curl.haxx.se
+ // for details on installing cURL.
+ // Snoopy does *not* use the cURL
+ // library functions built into php,
+ // as these functions are not stable
+ // as of this Snoopy release.
+
+ /**** Private variables ****/
+
+ var $_maxlinelen = 4096; // max line length (headers)
+
+ var $_httpmethod = "GET"; // default http request method
+ var $_httpversion = "HTTP/1.0"; // default http request version
+ var $_submit_method = "POST"; // default submit method
+ var $_submit_type = "application/x-www-form-urlencoded"; // default submit type
+ var $_mime_boundary = ""; // MIME boundary for multipart/form-data submit type
+ var $_redirectaddr = false; // will be set if page fetched is a redirect
+ var $_redirectdepth = 0; // increments on an http redirect
+ var $_frameurls = array(); // frame src urls
+ var $_framedepth = 0; // increments on frame depth
+
+ var $_isproxy = false; // set if using a proxy server
+ var $_fp_timeout = 30; // timeout for socket connection
+
+/*======================================================================*\
+ Function: fetch
+ Purpose: fetch the contents of a web page
+ (and possibly other protocols in the
+ future like ftp, nntp, gopher, etc.)
+ Input: $URI the location of the page to fetch
+ Output: $this->results the output text from the fetch
+\*======================================================================*/
+
+ function fetch($URI)
+ {
+
+ //preg_match("|^([^:]+)://([^:/]+)(:[\d]+)*(.*)|",$URI,$URI_PARTS);
+ $URI_PARTS = parse_url($URI);
+ if (!empty($URI_PARTS["user"]))
+ $this->user = $URI_PARTS["user"];
+ if (!empty($URI_PARTS["pass"]))
+ $this->pass = $URI_PARTS["pass"];
+ if (empty($URI_PARTS["query"]))
+ $URI_PARTS["query"] = '';
+
+ switch($URI_PARTS["scheme"])
+ {
+ case "http":
+ $this->host = $URI_PARTS["host"];
+ if(!empty($URI_PARTS["port"]))
+ $this->port = $URI_PARTS["port"];
+ if($this->_connect($fp))
+ {
+ if($this->_isproxy)
+ {
+ // using proxy, send entire URI
+ $this->_httprequest($URI,$fp,$URI,$this->_httpmethod);
+ }
+ else
+ {
+ $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
+ // no proxy, send only the path
+ $this->_httprequest($path, $fp, $URI, $this->_httpmethod);
+ }
+
+ $this->_disconnect($fp);
+
+ if($this->_redirectaddr)
+ {
+ /* url was redirected, check if we've hit the max depth */
+ if($this->maxredirs > $this->_redirectdepth)
+ {
+ // only follow redirect if it's on this site, or offsiteok is true
+ if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
+ {
+ /* follow the redirect */
+ $this->_redirectdepth++;
+ $this->lastredirectaddr=$this->_redirectaddr;
+ $this->fetch($this->_redirectaddr);
+ }
+ }
+ }
+
+ if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
+ {
+ $frameurls = $this->_frameurls;
+ $this->_frameurls = array();
+
+ while(list(,$frameurl) = each($frameurls))
+ {
+ if($this->_framedepth < $this->maxframes)
+ {
+ $this->fetch($frameurl);
+ $this->_framedepth++;
+ }
+ else
+ break;
+ }
+ }
+ }
+ else
+ {
+ return false;
+ }
+ return true;
+ break;
+ case "https":
+ if(!$this->curl_path)
+ return false;
+ if(function_exists("is_executable"))
+ if (!is_executable($this->curl_path))
+ return false;
+ $this->host = $URI_PARTS["host"];
+ if(!empty($URI_PARTS["port"]))
+ $this->port = $URI_PARTS["port"];
+ if($this->_isproxy)
+ {
+ // using proxy, send entire URI
+ $this->_httpsrequest($URI,$URI,$this->_httpmethod);
+ }
+ else
+ {
+ $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
+ // no proxy, send only the path
+ $this->_httpsrequest($path, $URI, $this->_httpmethod);
+ }
+
+ if($this->_redirectaddr)
+ {
+ /* url was redirected, check if we've hit the max depth */
+ if($this->maxredirs > $this->_redirectdepth)
+ {
+ // only follow redirect if it's on this site, or offsiteok is true
+ if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
+ {
+ /* follow the redirect */
+ $this->_redirectdepth++;
+ $this->lastredirectaddr=$this->_redirectaddr;
+ $this->fetch($this->_redirectaddr);
+ }
+ }
+ }
+
+ if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
+ {
+ $frameurls = $this->_frameurls;
+ $this->_frameurls = array();
+
+ while(list(,$frameurl) = each($frameurls))
+ {
+ if($this->_framedepth < $this->maxframes)
+ {
+ $this->fetch($frameurl);
+ $this->_framedepth++;
+ }
+ else
+ break;
+ }
+ }
+ return true;
+ break;
+ default:
+ // not a valid protocol
+ $this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n';
+ return false;
+ break;
+ }
+ return true;
+ }
+
+/*======================================================================*\
+ Function: submit
+ Purpose: submit an http form
+ Input: $URI the location to post the data
+ $formvars the formvars to use.
+ format: $formvars["var"] = "val";
+ $formfiles an array of files to submit
+ format: $formfiles["var"] = "/dir/filename.ext";
+ Output: $this->results the text output from the post
+\*======================================================================*/
+
+ function submit($URI, $formvars="", $formfiles="")
+ {
+ unset($postdata);
+
+ $postdata = $this->_prepare_post_body($formvars, $formfiles);
+
+ $URI_PARTS = parse_url($URI);
+ if (!empty($URI_PARTS["user"]))
+ $this->user = $URI_PARTS["user"];
+ if (!empty($URI_PARTS["pass"]))
+ $this->pass = $URI_PARTS["pass"];
+ if (empty($URI_PARTS["query"]))
+ $URI_PARTS["query"] = '';
+
+ switch($URI_PARTS["scheme"])
+ {
+ case "http":
+ $this->host = $URI_PARTS["host"];
+ if(!empty($URI_PARTS["port"]))
+ $this->port = $URI_PARTS["port"];
+ if($this->_connect($fp))
+ {
+ if($this->_isproxy)
+ {
+ // using proxy, send entire URI
+ $this->_httprequest($URI,$fp,$URI,$this->_submit_method,$this->_submit_type,$postdata);
+ }
+ else
+ {
+ $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
+ // no proxy, send only the path
+ $this->_httprequest($path, $fp, $URI, $this->_submit_method, $this->_submit_type, $postdata);
+ }
+
+ $this->_disconnect($fp);
+
+ if($this->_redirectaddr)
+ {
+ /* url was redirected, check if we've hit the max depth */
+ if($this->maxredirs > $this->_redirectdepth)
+ {
+ if(!preg_match("|^".$URI_PARTS["scheme"]."://|", $this->_redirectaddr))
+ $this->_redirectaddr = $this->_expandlinks($this->_redirectaddr,$URI_PARTS["scheme"]."://".$URI_PARTS["host"]);
+
+ // only follow redirect if it's on this site, or offsiteok is true
+ if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
+ {
+ /* follow the redirect */
+ $this->_redirectdepth++;
+ $this->lastredirectaddr=$this->_redirectaddr;
+ if( strpos( $this->_redirectaddr, "?" ) > 0 )
+ $this->fetch($this->_redirectaddr); // the redirect has changed the request method from post to get
+ else
+ $this->submit($this->_redirectaddr,$formvars, $formfiles);
+ }
+ }
+ }
+
+ if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
+ {
+ $frameurls = $this->_frameurls;
+ $this->_frameurls = array();
+
+ while(list(,$frameurl) = each($frameurls))
+ {
+ if($this->_framedepth < $this->maxframes)
+ {
+ $this->fetch($frameurl);
+ $this->_framedepth++;
+ }
+ else
+ break;
+ }
+ }
+
+ }
+ else
+ {
+ return false;
+ }
+ return true;
+ break;
+ case "https":
+ if(!$this->curl_path)
+ return false;
+ if(function_exists("is_executable"))
+ if (!is_executable($this->curl_path))
+ return false;
+ $this->host = $URI_PARTS["host"];
+ if(!empty($URI_PARTS["port"]))
+ $this->port = $URI_PARTS["port"];
+ if($this->_isproxy)
+ {
+ // using proxy, send entire URI
+ $this->_httpsrequest($URI, $URI, $this->_submit_method, $this->_submit_type, $postdata);
+ }
+ else
+ {
+ $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
+ // no proxy, send only the path
+ $this->_httpsrequest($path, $URI, $this->_submit_method, $this->_submit_type, $postdata);
+ }
+
+ if($this->_redirectaddr)
+ {
+ /* url was redirected, check if we've hit the max depth */
+ if($this->maxredirs > $this->_redirectdepth)
+ {
+ if(!preg_match("|^".$URI_PARTS["scheme"]."://|", $this->_redirectaddr))
+ $this->_redirectaddr = $this->_expandlinks($this->_redirectaddr,$URI_PARTS["scheme"]."://".$URI_PARTS["host"]);
+
+ // only follow redirect if it's on this site, or offsiteok is true
+ if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
+ {
+ /* follow the redirect */
+ $this->_redirectdepth++;
+ $this->lastredirectaddr=$this->_redirectaddr;
+ if( strpos( $this->_redirectaddr, "?" ) > 0 )
+ $this->fetch($this->_redirectaddr); // the redirect has changed the request method from post to get
+ else
+ $this->submit($this->_redirectaddr,$formvars, $formfiles);
+ }
+ }
+ }
+
+ if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
+ {
+ $frameurls = $this->_frameurls;
+ $this->_frameurls = array();
+
+ while(list(,$frameurl) = each($frameurls))
+ {
+ if($this->_framedepth < $this->maxframes)
+ {
+ $this->fetch($frameurl);
+ $this->_framedepth++;
+ }
+ else
+ break;
+ }
+ }
+ return true;
+ break;
+
+ default:
+ // not a valid protocol
+ $this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n';
+ return false;
+ break;
+ }
+ return true;
+ }
+
+/*======================================================================*\
+ Function: fetchlinks
+ Purpose: fetch the links from a web page
+ Input: $URI where you are fetching from
+ Output: $this->results an array of the URLs
+\*======================================================================*/
+
+ function fetchlinks($URI)
+ {
+ if ($this->fetch($URI))
+ {
+
+ if(is_array($this->results))
+ {
+ for($x=0;$x<count($this->results);$x++)
+ $this->results[$x] = $this->_striplinks($this->results[$x]);
+ }
+ else
+ $this->results = $this->_striplinks($this->results);
+
+ if($this->expandlinks)
+ $this->results = $this->_expandlinks($this->results, $URI);
+ return true;
+ }
+ else
+ return false;
+ }
+
+/*======================================================================*\
+ Function: fetchform
+ Purpose: fetch the form elements from a web page
+ Input: $URI where you are fetching from
+ Output: $this->results the resulting html form
+\*======================================================================*/
+
+ function fetchform($URI)
+ {
+
+ if ($this->fetch($URI))
+ {
+
+ if(is_array($this->results))
+ {
+ for($x=0;$x<count($this->results);$x++)
+ $this->results[$x] = $this->_stripform($this->results[$x]);
+ }
+ else
+ $this->results = $this->_stripform($this->results);
+
+ return true;
+ }
+ else
+ return false;
+ }
+
+
+/*======================================================================*\
+ Function: fetchtext
+ Purpose: fetch the text from a web page, stripping the links
+ Input: $URI where you are fetching from
+ Output: $this->results the text from the web page
+\*======================================================================*/
+
+ function fetchtext($URI)
+ {
+ if($this->fetch($URI))
+ {
+ if(is_array($this->results))
+ {
+ for($x=0;$x<count($this->results);$x++)
+ $this->results[$x] = $this->_striptext($this->results[$x]);
+ }
+ else
+ $this->results = $this->_striptext($this->results);
+ return true;
+ }
+ else
+ return false;
+ }
+
+/*======================================================================*\
+ Function: submitlinks
+ Purpose: grab links from a form submission
+ Input: $URI where you are submitting from
+ Output: $this->results an array of the links from the post
+\*======================================================================*/
+
+ function submitlinks($URI, $formvars="", $formfiles="")
+ {
+ if($this->submit($URI,$formvars, $formfiles))
+ {
+ if(is_array($this->results))
+ {
+ for($x=0;$x<count($this->results);$x++)
+ {
+ $this->results[$x] = $this->_striplinks($this->results[$x]);
+ if($this->expandlinks)
+ $this->results[$x] = $this->_expandlinks($this->results[$x],$URI);
+ }
+ }
+ else
+ {
+ $this->results = $this->_striplinks($this->results);
+ if($this->expandlinks)
+ $this->results = $this->_expandlinks($this->results,$URI);
+ }
+ return true;
+ }
+ else
+ return false;
+ }
+
+/*======================================================================*\
+ Function: submittext
+ Purpose: grab text from a form submission
+ Input: $URI where you are submitting from
+ Output: $this->results the text from the web page
+\*======================================================================*/
+
+ function submittext($URI, $formvars = "", $formfiles = "")
+ {
+ if($this->submit($URI,$formvars, $formfiles))
+ {
+ if(is_array($this->results))
+ {
+ for($x=0;$x<count($this->results);$x++)
+ {
+ $this->results[$x] = $this->_striptext($this->results[$x]);
+ if($this->expandlinks)
+ $this->results[$x] = $this->_expandlinks($this->results[$x],$URI);
+ }
+ }
+ else
+ {
+ $this->results = $this->_striptext($this->results);
+ if($this->expandlinks)
+ $this->results = $this->_expandlinks($this->results,$URI);
+ }
+ return true;
+ }
+ else
+ return false;
+ }
+
+
+
+/*======================================================================*\
+ Function: set_submit_multipart
+ Purpose: Set the form submission content type to
+ multipart/form-data
+\*======================================================================*/
+ function set_submit_multipart()
+ {
+ $this->_submit_type = "multipart/form-data";
+ }
+
+
+/*======================================================================*\
+ Function: set_submit_normal
+ Purpose: Set the form submission content type to
+ application/x-www-form-urlencoded
+\*======================================================================*/
+ function set_submit_normal()
+ {
+ $this->_submit_type = "application/x-www-form-urlencoded";
+ }
+
+
+
+
+/*======================================================================*\
+ Private functions
+\*======================================================================*/
+
+
+/*======================================================================*\
+ Function: _striplinks
+ Purpose: strip the hyperlinks from an html document
+ Input: $document document to strip.
+ Output: $match an array of the links
+\*======================================================================*/
+
+ function _striplinks($document)
+ {
+ preg_match_all("'<\s*a\s.*?href\s*=\s* # find <a href=
+ ([\"\'])? # find single or double quote
+ (?(1) (.*?)\\1 | ([^\s\>]+)) # if quote found, match up to next matching
+ # quote, otherwise match up to next space
+ 'isx",$document,$links);
+
+
+ // catenate the non-empty matches from the conditional subpattern
+
+ while(list($key,$val) = each($links[2]))
+ {
+ if(!empty($val))
+ $match[] = $val;
+ }
+
+ while(list($key,$val) = each($links[3]))
+ {
+ if(!empty($val))
+ $match[] = $val;
+ }
+
+ // return the links
+ return $match;
+ }
+
+/*======================================================================*\
+ Function: _stripform
+ Purpose: strip the form elements from an html document
+ Input: $document document to strip.
+ Output: $match an array of the links
+\*======================================================================*/
+
+ function _stripform($document)
+ {
+ preg_match_all("'<\/?(FORM|INPUT|SELECT|TEXTAREA|(OPTION))[^<>]*>(?(2)(.*(?=<\/?(option|select)[^<>]*>[\r\n]*)|(?=[\r\n]*))|(?=[\r\n]*))'Usi",$document,$elements);
+
+ // catenate the matches
+ $match = implode("\r\n",$elements[0]);
+
+ // return the links
+ return $match;
+ }
+
+
+
+/*======================================================================*\
+ Function: _striptext
+ Purpose: strip the text from an html document
+ Input: $document document to strip.
+ Output: $text the resulting text
+\*======================================================================*/
+
+ function _striptext($document)
+ {
+
+ // I didn't use preg eval (//e) since that is only available in PHP 4.0.
+ // so, list your entities one by one here. I included some of the
+ // more common ones.
+
+ $search = array("'<script[^>]*?>.*?</script>'si", // strip out javascript
+ "'<[\/\!]*?[^<>]*?>'si", // strip out html tags
+ "'([\r\n])[\s]+'", // strip out white space
+ "'&(quot|#34|#034|#x22);'i", // replace html entities
+ "'&(amp|#38|#038|#x26);'i", // added hexadecimal values
+ "'&(lt|#60|#060|#x3c);'i",
+ "'&(gt|#62|#062|#x3e);'i",
+ "'&(nbsp|#160|#xa0);'i",
+ "'&(iexcl|#161);'i",
+ "'&(cent|#162);'i",
+ "'&(pound|#163);'i",
+ "'&(copy|#169);'i",
+ "'&(reg|#174);'i",
+ "'&(deg|#176);'i",
+ "'&(#39|#039|#x27);'",
+ "'&(euro|#8364);'i", // europe
+ "'&a(uml|UML);'", // german
+ "'&o(uml|UML);'",
+ "'&u(uml|UML);'",
+ "'&A(uml|UML);'",
+ "'&O(uml|UML);'",
+ "'&U(uml|UML);'",
+ "'ß'i",
+ );
+ $replace = array( "",
+ "",
+ "\\1",
+ "\"",
+ "&",
+ "<",
+ ">",
+ " ",
+ chr(161),
+ chr(162),
+ chr(163),
+ chr(169),
+ chr(174),
+ chr(176),
+ chr(39),
+ chr(128),
+ "ä",
+ "ö",
+ "ü",
+ "Ä",
+ "Ö",
+ "Ü",
+ "ß",
+ );
+
+ $text = preg_replace($search,$replace,$document);
+
+ return $text;
+ }
+
+/*======================================================================*\
+ Function: _expandlinks
+ Purpose: expand each link into a fully qualified URL
+ Input: $links the links to qualify
+ $URI the full URI to get the base from
+ Output: $expandedLinks the expanded links
+\*======================================================================*/
+
+ function _expandlinks($links,$URI)
+ {
+
+ preg_match("/^[^\?]+/",$URI,$match);
+
+ $match = preg_replace("|/[^\/\.]+\.[^\/\.]+$|","",$match[0]);
+ $match = preg_replace("|/$|","",$match);
+
+ $search = array( "|^http://".preg_quote($this->host)."|i",
+ "|^(?!http://)(\/)?(?!mailto:)|i",
+ "|/\./|",
+ "|/[^\/]+/\.\./|"
+ );
+
+ $replace = array( "",
+ $match."/",
+ "/",
+ "/"
+ );
+
+ $expandedLinks = preg_replace($search,$replace,$links);
+
+ return $expandedLinks;
+ }
+
+/*======================================================================*\
+ Function: _httprequest
+ Purpose: go get the http data from the server
+ Input: $url the url to fetch
+ $fp the current open file pointer
+ $URI the full URI
+ $body body contents to send if any (POST)
+ Output:
+\*======================================================================*/
+
+ function _httprequest($url,$fp,$URI,$http_method,$content_type="",$body="")
+ {
+ $cookie_headers = '';
+ if($this->passcookies && $this->_redirectaddr)
+ $this->setcookies();
+
+ $URI_PARTS = parse_url($URI);
+ if(empty($url))
+ $url = "/";
+ $headers = $http_method." ".$url." ".$this->_httpversion."\r\n";
+ if(!empty($this->agent))
+ $headers .= "User-Agent: ".$this->agent."\r\n";
+ if(!empty($this->host) && !isset($this->rawheaders['Host']))
+ $headers .= "Host: ".$this->host."\r\n";
+ if(!empty($this->accept))
+ $headers .= "Accept: ".$this->accept."\r\n";
+ if(!empty($this->referer))
+ $headers .= "Referer: ".$this->referer."\r\n";
+ if(!empty($this->cookies))
+ {
+ if(!is_array($this->cookies))
+ $this->cookies = (array)$this->cookies;
+
+ reset($this->cookies);
+ if ( count($this->cookies) > 0 ) {
+ $cookie_headers .= 'Cookie: ';
+ foreach ( $this->cookies as $cookieKey => $cookieVal ) {
+ $cookie_headers .= $cookieKey."=".urlencode($cookieVal)."; ";
+ }
+ $headers .= substr($cookie_headers,0,-2) . "\r\n";
+ }
+ }
+ if(!empty($this->rawheaders))
+ {
+ if(!is_array($this->rawheaders))
+ $this->rawheaders = (array)$this->rawheaders;
+ while(list($headerKey,$headerVal) = each($this->rawheaders))
+ $headers .= $headerKey.": ".$headerVal."\r\n";
+ }
+ if(!empty($content_type)) {
+ $headers .= "Content-type: $content_type";
+ if ($content_type == "multipart/form-data")
+ $headers .= "; boundary=".$this->_mime_boundary;
+ $headers .= "\r\n";
+ }
+ if(!empty($body))
+ $headers .= "Content-length: ".strlen($body)."\r\n";
+ if(!empty($this->user) || !empty($this->pass))
+ $headers .= "Authorization: Basic ".base64_encode($this->user.":".$this->pass)."\r\n";
+
+ //add proxy auth headers
+ if(!empty($this->proxy_user))
+ $headers .= 'Proxy-Authorization: ' . 'Basic ' . base64_encode($this->proxy_user . ':' . $this->proxy_pass)."\r\n";
+
+
+ $headers .= "\r\n";
+
+ // set the read timeout if needed
+ if ($this->read_timeout > 0)
+ socket_set_timeout($fp, $this->read_timeout);
+ $this->timed_out = false;
+
+ fwrite($fp,$headers.$body,strlen($headers.$body));
+
+ $this->_redirectaddr = false;
+ unset($this->headers);
+
+ while($currentHeader = fgets($fp,$this->_maxlinelen))
+ {
+ if ($this->read_timeout > 0 && $this->_check_timeout($fp))
+ {
+ $this->status=-100;
+ return false;
+ }
+
+ if($currentHeader == "\r\n")
+ break;
+
+ // if a header begins with Location: or URI:, set the redirect
+ if(preg_match("/^(Location:|URI:)/i",$currentHeader))
+ {
+ // get URL portion of the redirect
+ preg_match("/^(Location:|URI:)[ ]+(.*)/",chop($currentHeader),$matches);
+ // look for :// in the Location header to see if hostname is included
+ if(!preg_match("|\:\/\/|",$matches[2]))
+ {
+ // no host in the path, so prepend
+ $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
+ // eliminate double slash
+ if(!preg_match("|^/|",$matches[2]))
+ $this->_redirectaddr .= "/".$matches[2];
+ else
+ $this->_redirectaddr .= $matches[2];
+ }
+ else
+ $this->_redirectaddr = $matches[2];
+ }
+
+ if(preg_match("|^HTTP/|",$currentHeader))
+ {
+ if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$currentHeader, $status))
+ {
+ $this->status= $status[1];
+ }
+ $this->response_code = $currentHeader;
+ }
+
+ $this->headers[] = $currentHeader;
+ }
+
+ $results = '';
+ do {
+ $_data = fread($fp, $this->maxlength);
+ if (strlen($_data) == 0) {
+ break;
+ }
+ $results .= $_data;
+ } while(true);
+
+ if ($this->read_timeout > 0 && $this->_check_timeout($fp))
+ {
+ $this->status=-100;
+ return false;
+ }
+
+ // check if there is a a redirect meta tag
+
+ if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]*URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
+
+ {
+ $this->_redirectaddr = $this->_expandlinks($match[1],$URI);
+ }
+
+ // have we hit our frame depth and is there frame src to fetch?
+ if(($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match))
+ {
+ $this->results[] = $results;
+ for($x=0; $x<count($match[1]); $x++)
+ $this->_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
+ }
+ // have we already fetched framed content?
+ elseif(is_array($this->results))
+ $this->results[] = $results;
+ // no framed content
+ else
+ $this->results = $results;
+
+ return true;
+ }
+
+/*======================================================================*\
+ Function: _httpsrequest
+ Purpose: go get the https data from the server using curl
+ Input: $url the url to fetch
+ $URI the full URI
+ $body body contents to send if any (POST)
+ Output:
+\*======================================================================*/
+
+ function _httpsrequest($url,$URI,$http_method,$content_type="",$body="")
+ {
+ if($this->passcookies && $this->_redirectaddr)
+ $this->setcookies();
+
+ $headers = array();
+
+ $URI_PARTS = parse_url($URI);
+ if(empty($url))
+ $url = "/";
+ // GET ... header not needed for curl
+ //$headers[] = $http_method." ".$url." ".$this->_httpversion;
+ if(!empty($this->agent))
+ $headers[] = "User-Agent: ".$this->agent;
+ if(!empty($this->host))
+ $headers[] = "Host: ".$this->host;
+ if(!empty($this->accept))
+ $headers[] = "Accept: ".$this->accept;
+ if(!empty($this->referer))
+ $headers[] = "Referer: ".$this->referer;
+ if(!empty($this->cookies))
+ {
+ if(!is_array($this->cookies))
+ $this->cookies = (array)$this->cookies;
+
+ reset($this->cookies);
+ if ( count($this->cookies) > 0 ) {
+ $cookie_str = 'Cookie: ';
+ foreach ( $this->cookies as $cookieKey => $cookieVal ) {
+ $cookie_str .= $cookieKey."=".urlencode($cookieVal)."; ";
+ }
+ $headers[] = substr($cookie_str,0,-2);
+ }
+ }
+ if(!empty($this->rawheaders))
+ {
+ if(!is_array($this->rawheaders))
+ $this->rawheaders = (array)$this->rawheaders;
+ while(list($headerKey,$headerVal) = each($this->rawheaders))
+ $headers[] = $headerKey.": ".$headerVal;
+ }
+ if(!empty($content_type)) {
+ if ($content_type == "multipart/form-data")
+ $headers[] = "Content-type: $content_type; boundary=".$this->_mime_boundary;
+ else
+ $headers[] = "Content-type: $content_type";
+ }
+ if(!empty($body))
+ $headers[] = "Content-length: ".strlen($body);
+ if(!empty($this->user) || !empty($this->pass))
+ $headers[] = "Authorization: BASIC ".base64_encode($this->user.":".$this->pass);
+
+ for($curr_header = 0; $curr_header < count($headers); $curr_header++)
+ $cmdline_params .= " -H \"".$headers[$curr_header]."\"";
+
+ if(!empty($body))
+ $cmdline_params .= " -d \"$body\"";
+
+ if($this->read_timeout > 0)
+ $cmdline_params .= " -m ".$this->read_timeout;
+
+ $headerfile = tempnam($temp_dir, "sno");
+
+ $safer_URI = strtr( $URI, "\"", " " ); // strip quotes from the URI to avoid shell access
+ exec($this->curl_path." -D \"$headerfile\"".$cmdline_params." \"".$safer_URI."\"",$results,$return);
+
+ if($return)
+ {
+ $this->error = "Error: cURL could not retrieve the document, error $return.";
+ return false;
+ }
+
+
+ $results = implode("\r\n",$results);
+
+ $result_headers = file("$headerfile");
+
+ $this->_redirectaddr = false;
+ unset($this->headers);
+
+ for($currentHeader = 0; $currentHeader < count($result_headers); $currentHeader++)
+ {
+
+ // if a header begins with Location: or URI:, set the redirect
+ if(preg_match("/^(Location: |URI: )/i",$result_headers[$currentHeader]))
+ {
+ // get URL portion of the redirect
+ preg_match("/^(Location: |URI:)\s+(.*)/",chop($result_headers[$currentHeader]),$matches);
+ // look for :// in the Location header to see if hostname is included
+ if(!preg_match("|\:\/\/|",$matches[2]))
+ {
+ // no host in the path, so prepend
+ $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
+ // eliminate double slash
+ if(!preg_match("|^/|",$matches[2]))
+ $this->_redirectaddr .= "/".$matches[2];
+ else
+ $this->_redirectaddr .= $matches[2];
+ }
+ else
+ $this->_redirectaddr = $matches[2];
+ }
+
+ if(preg_match("|^HTTP/|",$result_headers[$currentHeader]))
+ $this->response_code = $result_headers[$currentHeader];
+
+ $this->headers[] = $result_headers[$currentHeader];
+ }
+
+ // check if there is a a redirect meta tag
+
+ if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]+URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
+ {
+ $this->_redirectaddr = $this->_expandlinks($match[1],$URI);
+ }
+
+ // have we hit our frame depth and is there frame src to fetch?
+ if(($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match))
+ {
+ $this->results[] = $results;
+ for($x=0; $x<count($match[1]); $x++)
+ $this->_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
+ }
+ // have we already fetched framed content?
+ elseif(is_array($this->results))
+ $this->results[] = $results;
+ // no framed content
+ else
+ $this->results = $results;
+
+ unlink("$headerfile");
+
+ return true;
+ }
+
+/*======================================================================*\
+ Function: setcookies()
+ Purpose: set cookies for a redirection
+\*======================================================================*/
+
+ function setcookies()
+ {
+ for($x=0; $x<count($this->headers); $x++)
+ {
+ if(preg_match('/^set-cookie:[\s]+([^=]+)=([^;]+)/i', $this->headers[$x],$match))
+ $this->cookies[$match[1]] = urldecode($match[2]);
+ }
+ }
+
+
+/*======================================================================*\
+ Function: _check_timeout
+ Purpose: checks whether timeout has occurred
+ Input: $fp file pointer
+\*======================================================================*/
+
+ function _check_timeout($fp)
+ {
+ if ($this->read_timeout > 0) {
+ $fp_status = socket_get_status($fp);
+ if ($fp_status["timed_out"]) {
+ $this->timed_out = true;
+ return true;
+ }
+ }
+ return false;
+ }
+
+/*======================================================================*\
+ Function: _connect
+ Purpose: make a socket connection
+ Input: $fp file pointer
+\*======================================================================*/
+
+ function _connect(&$fp)
+ {
+ if(!empty($this->proxy_host) && !empty($this->proxy_port))
+ {
+ $this->_isproxy = true;
+
+ $host = $this->proxy_host;
+ $port = $this->proxy_port;
+ }
+ else
+ {
+ $host = $this->host;
+ $port = $this->port;
+ }
+
+ $this->status = 0;
+
+ if($fp = fsockopen(
+ $host,
+ $port,
+ $errno,
+ $errstr,
+ $this->_fp_timeout
+ ))
+ {
+ // socket connection succeeded
+
+ return true;
+ }
+ else
+ {
+ // socket connection failed
+ $this->status = $errno;
+ switch($errno)
+ {
+ case -3:
+ $this->error="socket creation failed (-3)";
+ case -4:
+ $this->error="dns lookup failure (-4)";
+ case -5:
+ $this->error="connection refused or timed out (-5)";
+ default:
+ $this->error="connection failed (".$errno.")";
+ }
+ return false;
+ }
+ }
+/*======================================================================*\
+ Function: _disconnect
+ Purpose: disconnect a socket connection
+ Input: $fp file pointer
+\*======================================================================*/
+
+ function _disconnect($fp)
+ {
+ return(fclose($fp));
+ }
+
+
+/*======================================================================*\
+ Function: _prepare_post_body
+ Purpose: Prepare post body according to encoding type
+ Input: $formvars - form variables
+ $formfiles - form upload files
+ Output: post body
+\*======================================================================*/
+
+ function _prepare_post_body($formvars, $formfiles)
+ {
+ settype($formvars, "array");
+ settype($formfiles, "array");
+ $postdata = '';
+
+ if (count($formvars) == 0 && count($formfiles) == 0)
+ return;
+
+ switch ($this->_submit_type) {
+ case "application/x-www-form-urlencoded":
+ reset($formvars);
+ while(list($key,$val) = each($formvars)) {
+ if (is_array($val) || is_object($val)) {
+ while (list($cur_key, $cur_val) = each($val)) {
+ $postdata .= urlencode($key)."[]=".urlencode($cur_val)."&";
+ }
+ } else
+ $postdata .= urlencode($key)."=".urlencode($val)."&";
+ }
+ break;
+
+ case "multipart/form-data":
+ $this->_mime_boundary = "Snoopy".md5(uniqid(microtime()));
+
+ reset($formvars);
+ while(list($key,$val) = each($formvars)) {
+ if (is_array($val) || is_object($val)) {
+ while (list($cur_key, $cur_val) = each($val)) {
+ $postdata .= "--".$this->_mime_boundary."\r\n";
+ $postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n";
+ $postdata .= "$cur_val\r\n";
+ }
+ } else {
+ $postdata .= "--".$this->_mime_boundary."\r\n";
+ $postdata .= "Content-Disposition: form-data; name=\"$key\"\r\n\r\n";
+ $postdata .= "$val\r\n";
+ }
+ }
+
+ reset($formfiles);
+ while (list($field_name, $file_names) = each($formfiles)) {
+ settype($file_names, "array");
+ while (list(, $file_name) = each($file_names)) {
+ if (!is_readable($file_name)) continue;
+
+ $fp = fopen($file_name, "r");
+ $file_content = fread($fp, filesize($file_name));
+ fclose($fp);
+ $base_name = basename($file_name);
+
+ $postdata .= "--".$this->_mime_boundary."\r\n";
+ $postdata .= "Content-Disposition: form-data; name=\"$field_name\"; filename=\"$base_name\"\r\n\r\n";
+ $postdata .= "$file_content\r\n";
+ }
+ }
+ $postdata .= "--".$this->_mime_boundary."--\r\n";
+ break;
+ }
+
+ return $postdata;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/snoopy/Snoopy.class.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/snoopy/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/snoopy/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/snoopy/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/snoopy/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/snoopy.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/snoopy.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/snoopy.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,84 @@
+<?php
+/// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Jan Pedersen (AKA Mithrandir) //
+// URL: http://www.xoops.org //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+
+require_once XOOPS_ROOT_PATH."/class/snoopy/Snoopy.class.php";
+
+class XoopsSnoopy extends Snoopy
+{
+
+// Added on March 4, 2003 by onokazu at xoops.org
+/*======================================================================*\
+ Function: set_submit_xml
+ Purpose: Set the submission content type to
+ text/xml
+\*======================================================================*/
+ function set_submit_xml()
+ {
+ $this->_submit_type = "text/xml";
+ }
+
+
+/*======================================================================*\
+ Function: _prepare_post_body
+ Purpose: Prepare post body according to encoding type
+ Input: $formvars - form variables
+ $formfiles - form upload files
+ Output: post body
+\*======================================================================*/
+
+ function _prepare_post_body($formvars, $formfiles)
+ {
+ switch ($this->_submit_type) {
+ case "application/x-www-form-urlencoded":
+ case "multipart/form-data":
+ return parent::_prepare_post_body($formvars, $formfiles);
+
+ // Added on March 4, 2003 by onokazu at xoops.org
+ case "text/xml":
+ default:
+ settype($formvars, "array");
+ settype($formfiles, "array");
+
+ if (count($formvars) == 0 && count($formfiles) == 0) {
+ return;
+ }
+ $postdata = $formvars[0];
+ break;
+ }
+
+ return $postdata;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/snoopy.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/tardownloader.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/tardownloader.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/tardownloader.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,177 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+
+/**
+ * base class
+ */
+include_once XOOPS_ROOT_PATH.'/class/downloader.php';
+/**
+ * Class to handle tar files
+ */
+include_once XOOPS_ROOT_PATH.'/class/class.tar.php';
+
+/**
+ * Send tar files through a http socket
+ *
+ * @package kernel
+ * @subpackage core
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright (c) 2000-2003 The Xoops Project - www.xoops.org
+ */
+class XoopsTarDownloader extends XoopsDownloader
+{
+
+ /**
+ * Constructor
+ *
+ * @param string $ext file extension
+ * @param string $mimyType Mimetype
+ **/
+ function XoopsTarDownloader($ext = '.tar.gz', $mimyType = 'application/x-gzip')
+ {
+ $this->archiver = new tar();
+ $this->ext = trim($ext);
+ $this->mimeType = trim($mimyType);
+ }
+
+ /**
+ * Add a file to the archive
+ *
+ * @param string $filepath Full path to the file
+ * @param string $newfilename Filename (if you don't want to use the original)
+ **/
+ function addFile($filepath, $newfilename=null)
+ {
+ $this->archiver->addFile($filepath);
+ if (isset($newfilename)) {
+ // dirty, but no other way
+ for ($i = 0; $i < $this->archiver->numFiles; $i++) {
+ if ($this->archiver->files[$i]['name'] == $filepath) {
+ $this->archiver->files[$i]['name'] = trim($newfilename);
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * Add a binary file to the archive
+ *
+ * @param string $filepath Full path to the file
+ * @param string $newfilename Filename (if you don't want to use the original)
+ **/
+ function addBinaryFile($filepath, $newfilename=null)
+ {
+ $this->archiver->addFile($filepath, true);
+ if (isset($newfilename)) {
+ // dirty, but no other way
+ for ($i = 0; $i < $this->archiver->numFiles; $i++) {
+ if ($this->archiver->files[$i]['name'] == $filepath) {
+ $this->archiver->files[$i]['name'] = trim($newfilename);
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * Add a dummy file to the archive
+ *
+ * @param string $data Data to write
+ * @param string $filename Name for the file in the archive
+ * @param integer $time
+ **/
+ function addFileData(&$data, $filename, $time=0)
+ {
+ $dummyfile = XOOPS_CACHE_PATH.'/dummy_'.time().'.html';
+ $fp = fopen($dummyfile, 'w');
+ fwrite($fp, $data);
+ fclose($fp);
+ $this->archiver->addFile($dummyfile);
+ unlink($dummyfile);
+
+ // dirty, but no other way
+ for ($i = 0; $i < $this->archiver->numFiles; $i++) {
+ if ($this->archiver->files[$i]['name'] == $dummyfile) {
+ $this->archiver->files[$i]['name'] = $filename;
+ if ($time != 0) {
+ $this->archiver->files[$i]['time'] = $time;
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * Add a binary dummy file to the archive
+ *
+ * @param string $data Data to write
+ * @param string $filename Name for the file in the archive
+ * @param integer $time
+ **/
+ function addBinaryFileData(&$data, $filename, $time=0)
+ {
+ $dummyfile = XOOPS_CACHE_PATH.'/dummy_'.time().'.html';
+ $fp = fopen($dummyfile, 'wb');
+ fwrite($fp, $data);
+ fclose($fp);
+ $this->archiver->addFile($dummyfile, true);
+ unlink($dummyfile);
+
+ // dirty, but no other way
+ for ($i = 0; $i < $this->archiver->numFiles; $i++) {
+ if ($this->archiver->files[$i]['name'] == $dummyfile) {
+ $this->archiver->files[$i]['name'] = $filename;
+ if ($time != 0) {
+ $this->archiver->files[$i]['time'] = $time;
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * Send the file to the client
+ *
+ * @param string $name Filename
+ * @param boolean $gzip Use GZ compression
+ **/
+ function download($name, $gzip = true)
+ {
+ $this->_header($name.$this->ext);
+ echo $this->archiver->toTarOutput($name.$this->ext, $gzip);
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/tardownloader.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/template.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/template.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/template.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,276 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('SMARTY_DIR')) {
+ exit();
+}
+/**
+ * Base class: Smarty template engine
+ */
+require_once SMARTY_DIR.'Smarty.class.php';
+
+/**
+ * Template engine
+ *
+ * @package kernel
+ * @subpackage core
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright (c) 2000-2003 The Xoops Project - www.xoops.org
+ */
+class XoopsTpl extends Smarty
+{
+
+ /**
+ * Allow update of template files from the themes/ directory?
+ * This should be set to false on an active site to increase performance
+ */
+ var $_canUpdateFromFile = false;
+
+ /**
+ * Constructor
+ **/
+ function XoopsTpl()
+ {
+ global $xoopsConfig;
+ $this->Smarty();
+ $this->compile_id = null;
+ if ($xoopsConfig['theme_fromfile'] == 1) {
+ $this->_canUpdateFromFile = true;
+ $this->compile_check = true;
+ } else {
+ $this->_canUpdateFromFile = false;
+ $this->compile_check = false;
+ }
+ $this->left_delimiter = '<{';
+ $this->right_delimiter = '}>';
+ $this->template_dir = XOOPS_THEME_PATH;
+ $this->cache_dir = XOOPS_CACHE_PATH;
+ $this->compile_dir = XOOPS_COMPILE_PATH;
+ $this->plugins_dir = array(XOOPS_ROOT_PATH.'/class/smarty/plugins');
+ $this->default_template_handler_func = 'xoops_template_create';
+
+ // Added by goghs on 11-26 to deal with safe mode
+ //if (ini_get('safe_mode') == "1") {
+ $this->use_sub_dirs = false;
+ //} else {
+ // $this->use_sub_dirs = true;
+ //}
+ // END
+ }
+
+ /**
+ * Set the directory for templates
+ *
+ * @param string $dirname Directory path without a trailing slash
+ **/
+ function xoops_setTemplateDir($dirname)
+ {
+ $this->template_dir = $dirname;
+ }
+
+ /**
+ * Get the active template directory
+ *
+ * @return string
+ **/
+ function xoops_getTemplateDir()
+ {
+ return $this->template_dir;
+ }
+
+ /**
+ * Set debugging mode
+ *
+ * @param boolean $flag
+ **/
+ function xoops_setDebugging($flag=false)
+ {
+ $this->debugging = is_bool($flag) ? $flag : false;
+ }
+
+ /**
+ * Set caching
+ *
+ * @param integer $num
+ **/
+ function xoops_setCaching($num=0)
+ {
+ $this->caching = (int)$num;
+ }
+
+ /**
+ * Set cache lifetime
+ *
+ * @param integer $num Cache lifetime
+ **/
+ function xoops_setCacheTime($num=0)
+ {
+ $num = (int)$num;
+ if ($num <= 0) {
+ $this->caching = 0;
+ } else {
+ $this->cache_lifetime = $num;
+ }
+ }
+
+ /**
+ * Set directory for compiled template files
+ *
+ * @param string $dirname Full directory path without a trailing slash
+ **/
+ function xoops_setCompileDir($dirname)
+ {
+ $this->compile_dir = $dirname;
+ }
+
+ /**
+ * Set the directory for cached template files
+ *
+ * @param string $dirname Full directory path without a trailing slash
+ **/
+ function xoops_setCacheDir($dirname)
+ {
+ $this->cache_dir = $dirname;
+ }
+
+ /**
+ * Render output from template data
+ *
+ * @param string $data
+ * @return string Rendered output
+ **/
+ function xoops_fetchFromData(&$data)
+ {
+ $dummyfile = XOOPS_CACHE_PATH.'/dummy_'.time();
+ $fp = fopen($dummyfile, 'w');
+ fwrite($fp, $data);
+ fclose($fp);
+ $fetched = $this->fetch('file:'.$dummyfile);
+ unlink($dummyfile);
+ $this->clear_compiled_tpl('file:'.$dummyfile);
+ return $fetched;
+ }
+
+ /**
+ *
+ **/
+ function xoops_canUpdateFromFile()
+ {
+ return $this->_canUpdateFromFile;
+ }
+
+ /**
+ * Get caching
+ *
+ * @return int
+ **/
+ function xoops_getCaching()
+ {
+ return $this->caching;
+ }
+}
+
+/**
+ * Smarty default template handler function
+ *
+ * @param $resource_type
+ * @param $resource_name
+ * @param $template_source
+ * @param $template_timestamp
+ * @param $smarty_obj
+ * @return bool
+ **/
+function xoops_template_create ($resource_type, $resource_name, &$template_source, &$template_timestamp, &$smarty_obj)
+{
+ if ( $resource_type == 'db' ) {
+ $file_handler =& xoops_gethandler('tplfile');
+ $tpl =& $file_handler->find('default', null, null, null, $resource_name, true);
+ if (count($tpl) > 0 && is_object($tpl[0])) {
+ $template_source = $tpl[0]->getSource();
+ $template_timestamp = $tpl[0]->getLastModified();
+ return true;
+ }
+ } else {
+ }
+ return false;
+}
+
+/**
+ * function to update compiled template file in templates_c folder
+ *
+ * @param string $tpl_id
+ * @param boolean $clear_old
+ * @return boolean
+ **/
+function xoops_template_touch($tplfile, $clear_old = true)
+{
+ $tpl = new XoopsTpl();
+ $tpl->force_compile = true;
+ if ( is_object($tplfile) ) {
+ $file = $tplfile->getVar('tpl_file');
+ if ($clear_old) {
+ $tpl->clear_cache('db:'.$file);
+ $tpl->clear_compiled_tpl('db:'.$file);
+ }
+ $tpl->fetch('db:'.$file);
+ return true;
+ }
+ return false;
+}
+
+/**
+ * Clear the module cache
+ *
+ * @param int $mid Module ID
+ * @return
+ **/
+function xoops_template_clear_module_cache($mid)
+{
+ $block_handler =& xoops_gethandler('block');
+ //note this uses backwards parameters for backwards compatibility - change that!
+ $block_arr =& $block_handler->getByModule($mid, true, false);
+ if (count($block_arr) > 0) {
+ $instance_handler =& xoops_gethandler('blockinstance');
+ $instances =& $instance_handler->getObjects(new Criteria('bid', "(".implode(',', array_keys($block_arr)).")", "IN"));
+ $count = count($instances);
+ if ($count > 0) {
+ $xoopsTpl = new XoopsTpl();
+ $xoopsTpl->xoops_setCaching(2);
+ for ($i = 0; $i < $count; $i++) {
+ if ($block_arr[$instances[$i]->getVar('bid')]->getVar('template') != '') {
+ $xoopsTpl->clear_cache('db:'.$block_arr[$instances[$i]->getVar('bid')]->getVar('template'), 'blk_'.$instances[$i]->getVar('instanceid'));
+ }
+ }
+ }
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/template.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/theme.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/theme.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/theme.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,593 @@
+<?php
+// $Id$
+/**
+* xoops.theme service definition
+*
+* @copyright The Xoops project http://www.xoops.org/
+* @license http://www.fsf.org/copyleft/gpl.html GNU public license
+* @package xoops
+* @subpackage lang
+* @author Skalpa Keo <skalpa at xoops.org>
+* @since 2.1.0
+* @internal Almost a straight copy from the Xoops 2.0.x include/common.php code
+* ---------------------------------------------------------------------------------
+* See the enclosed file LICENSE for licensing information.
+* If you did not receive this file, see http://www.fsf.org/copyleft/gpl.html
+* ---------------------------------------------------------------------------------
+*/
+
+require_once XOOPS_ROOT_PATH.'/class/template.php';
+
+class XTheme {
+
+ /*#@+
+ * xoops.theme properties
+ **/
+ /**
+ * The name of this theme
+ * @var string
+ **/
+ var $name = 'default';
+ var $fullName = '';
+
+ var $path = '';
+ var $url = '';
+ /**
+ * Whether or not the theme engine should include output generated by php
+ * @var string
+ **/
+ var $bufferOutput = true;
+ /**
+ * Default content-type of pages generated by this theme
+ * @var string
+ **/
+ var $contentType = 'text/html';
+ /**
+ * The templates this theme contains in an array of relative paths
+ * @var array
+ **/
+ var $templateFiles = array();
+
+ /**
+ * Default file for this theme (in case the specified one can't be found)
+ * @var string
+ **/
+ var $defaultFile = 'theme.html';
+ /**
+ * The file to fetch from the theme
+ * @var string
+ **/
+ var $pageTpl = '';
+ /**
+ * The type of page to show (main, admin or rss)
+ * @var string
+ **/
+ var $pageType = '';
+ /**
+ * Enable banner system ?
+ * @var bool
+ */
+ var $enableBanner = false;
+ /**
+ * Template engine used to render pages
+ * @var object
+ */
+ var $tplEngine = false;
+
+ /**#@-*/
+
+ /*#@+
+ * xoops.theme.page properties
+ **/
+ /**
+ * Array of strings defining the page title (we use an array here so modules can add a string to the main title)
+ * @var array
+ **/
+ var $title = array();
+ /**
+ * Separator used to rebuild the title
+ * @var string
+ **/
+ var $titleSeparator = ' - ';
+ /**
+ * Page banner
+ * @var object
+ **/
+ var $banner = null;
+
+ /**
+ * Page footer
+ * @var string
+ **/
+ var $footer = '';
+
+ /**
+ * see addJS() and getJS() methods
+ **/
+ var $js = array();
+
+ /**
+ * Constructor
+ *
+ * @param bool $enableBanner whether to enable banners on this page
+ * @param bool $debugging whether debugging is enabled
+ * @param bool $mainService whether this is the main theme service (Not used yet, Mith)
+ * @param string $name name of the theme to use
+ *
+ * @return void
+ */
+ function XTheme($enableBanner = true, $debugging = false, $mainService = false, $name = "") {
+ $this->path = XOOPS_THEME_PATH;
+ $this->url = XOOPS_THEME_URL;
+ /*switch ($this->contentType) {
+ case 'text/html':
+ $this->document =& $GLOBALS[XOOPS]->create( 'xoops.output.document.xhtml' );
+ break;
+ default:
+ $this->document =& $GLOBALS[XOOPS]->create( 'xoops.output.document' );
+ }*/
+ $this->enableBanner = $enableBanner;
+ if ($name != "") {
+ $this->name = $name;
+ }
+
+ $this->tplEngine = new XoopsTpl();
+ $this->tplEngine->xoops_setDebugging($debugging);
+ $this->tplEngine->template_dir = XOOPS_THEME_PATH;
+ $this->tplEngine->assign( 'xoops_banner', $this->enableBanner ? xoops_getbanner() : ' ' );
+
+ $GLOBALS['xoopsTpl'] =& $this->tplEngine;
+ if ( $this->bufferOutput ) {
+ global $xoopsConfig;
+
+ //if Gzip is enabled and debug is turned off
+ // DISABLED for XOOPS 2.2.3 until we figure out, why it won't work in some configurations - Mith.
+ // @TODO: Find out why gzip_compression gives blank pages
+// if ( $xoopsConfig['gzip_compression'] == 1 && ($xoopsConfig['debug_mode'] == array(0 => 0) || $xoopsConfig['debug_mode'] == array()))
+// {
+// $ob_started = false;
+// $phpver = phpversion();
+// $useragent = ( isset( $_SERVER["HTTP_USER_AGENT"] ) ) ? $_SERVER["HTTP_USER_AGENT"] : "";
+//
+// if ( $phpver >= '4.0.4pl1' && ( strstr( $useragent, 'compatible' ) || strstr( $useragent, 'Gecko' ) ) )
+// {
+// if ( extension_loaded( 'zlib' ) ) {
+// ob_start( 'ob_gzhandler' );
+// $ob_started = true;
+// }
+// }
+// else if ( $phpver > '4.0' )
+// {
+// if ( strstr( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) )
+// {
+// if ( extension_loaded( 'zlib' ) )
+// {
+// ob_start();
+// ob_implicit_flush( 0 );
+// header( 'Content-Encoding: gzip' );
+// $ob_started = true;
+// }
+// }
+// }
+// if (!$ob_started) {
+// ob_start();
+// }
+// }
+// else
+// {
+// ob_start();
+// }
+ ob_start();
+ }
+
+ $this->loadGlobalVars();
+ $this->loadTheme();
+ return true;
+ }
+
+ /**
+ * Builds title string for page title
+ *
+ * @return string
+ */
+ function titleString() {
+ return implode( $this->titleSeparator, $this->title );
+ }
+
+
+ /**
+ * Determines path for a given theme template
+ *
+ * checks first theme path for $tplpath
+ * then default theme path for $tplpath
+ * then returns the default theme's default file
+ *
+ * @param string $tplpath name of template
+ */
+ function templatePath( $tplpath ) {
+ // if ( isset($this->templateFiles[$tplpath]) ) {
+ // return $this->templateFiles[$tplpath];
+ // }
+ $defpath = $this->path.'/default/' . $this->defaultFile;
+ $deffilepath = $this->path.'/default/' . $tplpath;
+ $thmpath = $this->path.'/'.$this->name.'/'.$tplpath;
+ if ( is_readable( $thmpath ) ) {
+ return $thmpath;
+ }
+ if ( is_readable( $deffilepath ) ) {
+ return $defpath;
+ }
+ if ( is_readable( $defpath ) ) {
+ return $defpath;
+ }
+ trigger_error( "Cannot determine path for template $tplpath", E_USER_WARNING );
+ return false;
+ }
+
+ /**
+ * Display a template
+ *
+ * @param string $contentTemplate Name of template to display
+ * @param string $pageTpl Name of template to use for whole page
+ * @param array $customVars additional variables to assign before display
+ *
+ * @return bool
+ */
+ function display( $contentTemplate = null, $pageTpl = null, $customVars = null ) {
+ static $called = false;
+
+ if ( $this->bufferOutput ) {
+ if ( $called ) {
+ return true;
+ }
+ $content = ob_get_contents();
+ ob_end_clean();
+ } else {
+ $content = '';
+ }
+ $called = true;
+
+ //$this->tplEngine->caching = 0; // ??? @todo: Kept from Xoops 2.0.x, but to be kicked out
+
+ global $xoopsConfig, $xoopsOption;
+ $this->name = $xoopsConfig['theme_set'];
+
+ //load CSS and theme language prior to assigning content
+ $this->pageType = isset($xoopsOption['pagetype']) && in_array($xoopsOption['pagetype'], array("admin", "rss")) ? $xoopsOption['pagetype'] : "main";
+
+ $this->tplEngine->assign(array('xoops_theme' => $this->name,
+ 'xoops_imageurl' => $this->url.'/'.$this->name.'/',
+ 'xoops_themecss'=> xoops_getcss($this->name, $this->pageType)));
+ //load theme language
+ $filename = $this->pageType == "admin" ? "admin.php" : "main.php";
+ if (file_exists(XOOPS_THEME_PATH."/$this->name/language/".$GLOBALS['xoopsConfig']['language']."/".$filename)) {
+ include_once(XOOPS_THEME_PATH."/$this->name/language/".$GLOBALS['xoopsConfig']['language']."/".$filename);
+ }
+ elseif (file_exists(XOOPS_THEME_PATH."/$this->name/language/english/".$filename)) {
+ include_once(XOOPS_THEME_PATH."/$this->name/language/english/".$filename);
+ }
+
+ if ( isset( $customVars ) ) {
+ $this->tplEngine->assign( $customVars );
+ }
+
+ //Add module CSS code
+ $moduleCSS = xoops_getcss($this->name, "module");
+ if (count($moduleCSS)>0) {
+ foreach($moduleCSS as $modulescss){
+ $this->addCSS($modulescss);
+ }
+ }
+
+ //assign JavaScript
+ $this->tplEngine->assign('xoops_js', '//--></script>'.implode('', $this->getJS()).'<script type="text/javascript"><!--');
+
+ // Load module-specified variables for cached module pages
+ // Keep the two variables before they are deprecated in modules
+ global $xoopsOption;
+ if(isset($xoopsOption["xoops_pagetitle"])){
+ $this->tplEngine->assign('xoops_pagetitle', $xoopsOption["xoops_pagetitle"]);
+ }
+ if(isset($xoopsOption["xoops_module_header"])){
+ $this->tplEngine->assign('xoops_module_header', $xoopsOption["xoops_module_header"]);
+ }
+
+ //Assign main content
+ if ( !empty( $contentTemplate ) ) {
+ if ( strpos( $contentTemplate, ':' ) === false ) {
+ $contentTemplate = $this->templatePath($contentTemplate);
+ }
+ $content .= $this->tplEngine->fetch( $contentTemplate, $this->getCachedTemplateId() );
+ }
+
+ $this->tplEngine->assign( 'xoops_contents', $content );
+
+ if ((isset($xoopsOption['output_type']) && $xoopsOption['output_type'] == "plain")) {
+ //display "plain" template that has theme CSS, but no specific content
+ $this->pageTpl = 'system_plain.html';
+ $tpl = "db:".$this->pageTpl;
+ }
+ else {
+ if ((isset($xoopsOption['pagetype']) && $xoopsOption['pagetype'] == "admin")) {
+ //display theme admin template
+ $this->pageTpl = 'themeadmin.html';
+ }
+
+ //Find page template to show
+ if (is_null($pageTpl)) {
+ if ( empty($this->pageTpl) || (false === ( $tpl = $this->templatePath($this->pageTpl) ) ) ) {
+ $tpl = $this->templatePath( $this->defaultFile );
+ }
+ }
+ elseif ((false === ( $tpl = $this->templatePath($pageTpl) ) )) {
+ $tpl = $this->templatePath( $this->defaultFile );
+ }
+ }
+ $this->tplEngine->caching = 0; // ??? @todo: Kept from Xoops 2.0.x, but to be kicked out
+ $this->tplEngine->display( $tpl );
+ return true;
+ }
+
+ /**
+ * Add Javascript file or JS code to the document head
+ *
+ * @param string $src path to .js file
+ * @param array $attributes name => value paired array of attributes such as title
+ * @param string $content JavaScript code
+ *
+ * @return void
+ **/
+ function addJS($src, $attributes = array(), $content = "") {
+ $js = "<script type=\"text/javascript\"";
+ if (!is_null($src)) {
+ $attributes['src'] = $src;
+ }
+ if (is_array($attributes) && count($attributes) > 0) {
+ foreach ($attributes as $name => $value) {
+ $js .= " ".$name ."=\"".$value."\"";
+ }
+ }
+ $js .= ">";
+ if (is_null($src)) {
+ $js .= $content;
+ }
+ $js .= "</script>\n";
+ $this->js[] = $js;
+ }
+
+ /**
+ * Add StyleSheet or CSS code to the document head
+ *
+ * @param string $src path to .css file
+ * @param array $attributes name => value paired array of attributes such as title
+ * @param string $content CSS code
+ *
+ * @return void
+ **/
+ function addCSS($src, $attributes = array(), $content = "") {
+ if (!is_null($src)) {
+ $css = "<link rel=\"stylesheet\" type=\"text/css\"";
+ $attributes['href'] = $src;
+ }
+ else {
+ $css = "<style type=\"text/css\"";
+ }
+ if (is_array($attributes) && count($attributes) > 0) {
+ foreach ($attributes as $name => $value) {
+ $css .= " ".$name."=\"".$value."\"";
+ }
+ }
+ if (is_null($src)) {
+ $css .= ">";
+ $css .= $content;
+ $css .= "</style>\n";
+ }
+ else {
+ $css .= " />\n";
+ }
+ $this->js[] = $css;
+ }
+
+ /**
+ * Get Javascript code for document head
+ *
+ * @return array
+ **/
+ function getJS() {
+ return $this->js;
+ }
+
+ /**
+ * Load variables used globally in themes
+ *
+ * @param bool $loadConfig whether to load configuration data from db (called with false from xoops_cp_header() )
+ *
+ * @return void
+ */
+ function loadGlobalVars($loadConfig = true) {
+ global $xoopsConfig, $xoopsModule;
+ $this->tplEngine->assign(array('xoops_url' => XOOPS_URL,
+ 'xoops_rootpath' => XOOPS_ROOT_PATH,
+ 'xoops_langcode' => _LANGCODE,
+ 'xoops_charset' => _CHARSET,
+ 'xoops_version' => XOOPS_VERSION,
+ 'xoops_upload_url' => XOOPS_UPLOAD_URL));
+ $this->tplEngine->assign(
+ array('xoops_requesturi' => htmlspecialchars($GLOBALS['xoopsRequestUri'], ENT_QUOTES),
+ 'xoops_sitename' => htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES),
+ 'xoops_slogan' => htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES)));
+ if ($loadConfig == true) {
+ // Meta tags
+ $config_handler =& xoops_gethandler('config');
+ $config =& $config_handler->getConfigsByCat(XOOPS_CONF_METAFOOTER);
+ foreach ($config as $name => $value) {
+ // prefix each tag with 'xoops_'
+ $this->tplEngine->assign('xoops_'.$name, $value);
+ }
+ $this->addJS(XOOPS_URL.'/include/xoops.js');
+
+ // Load module information
+ if (isset($xoopsModule) && is_object($xoopsModule) && $xoopsModule->getVar('dirname') != "system") {
+ // set page title
+ $this->tplEngine->assign('xoops_pagetitle', $xoopsModule->getVar('name'));
+ $this->tplEngine->assign('xoops_dirname', $xoopsModule->getVar('dirname'));
+ }
+ else {
+ $this->tplEngine->assign('xoops_pagetitle', htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES));
+ $this->tplEngine->assign('xoops_dirname', "system");
+ }
+ }
+ global $xoopsUser, $xoopsModule;
+ // Load user variables
+ if ($xoopsUser != '') {
+ $this->tplEngine->assign(array( 'xoops_isuser' => true,
+ 'xoops_userid' => $xoopsUser->getVar('uid'),
+ 'xoops_uname' => $xoopsUser->getVar('uname')));
+ if (is_object($xoopsModule)) {
+ $this->tplEngine->assign('xoops_isadmin', $xoopsUser->isAdmin($xoopsModule->getVar('mid')));
+ }
+ } else {
+ $this->tplEngine->assign(array('xoops_isuser' => false, 'xoops_isadmin' => false));
+ }
+ }
+
+ /**
+ * Load the theme if valid
+ *
+ * @return void
+ **/
+ function loadTheme() {
+ global $xoopsConfig, $xoopsUser;
+ // $xoopsConfig['theme_set'] is set through GPC
+ if (!empty($_REQUEST['xoops_theme_select']) && in_array($_REQUEST['xoops_theme_select'], $xoopsConfig['theme_set_allowed'])) {
+ $xoopsConfig['theme_set'] = $_REQUEST['xoops_theme_select'];
+ $_SESSION['xoopsUserTheme'] = $_REQUEST['xoops_theme_select'];
+ // taking old value in the same session
+ } elseif (!empty($_SESSION['xoopsUserTheme']) && in_array($_SESSION['xoopsUserTheme'], $xoopsConfig['theme_set_allowed'])) {
+ $xoopsConfig['theme_set'] = $_SESSION['xoopsUserTheme'];
+ }
+ // taking user preference
+ elseif ($xoopsUser) {
+ if ($xoopsUser->getVar('theme') != "" && in_array($xoopsUser->getVar('theme'), $xoopsConfig['theme_set_allowed'])) {
+ $xoopsConfig['theme_set'] = $xoopsUser->getVar('theme');
+ }
+ }
+ if (isset($GLOBALS['xoopsOption']['pagetype']) && $GLOBALS['xoopsOption']['pagetype'] == "admin") {
+ //if admin theme is set to use frontside theme
+ if (is_numeric($xoopsConfig['theme_set_admin']) && $xoopsConfig['theme_set_admin'] == 0) {
+ //set current admin theme to frontside theme
+ $xoopsConfig['theme_set_admin'] = $xoopsConfig['theme_set'];
+ }
+ //check theme for admin template
+ if ($this->tplEngine->template_exists($xoopsConfig['theme_set_admin'].'/themeadmin.html')) {
+ //set the current theme to the one selected for admin area
+ $xoopsConfig['theme_set'] = $xoopsConfig['theme_set_admin'];
+ }
+ else {
+ //revert to default theme for admin area
+ $xoopsConfig['theme_set'] = $this->name;
+ }
+ }
+ $GLOBALS['xoopsOption']['theme_use_smarty'] = 1;
+ }
+
+ function getCachedTemplateId() {
+ // generate safe cache Id
+ $cachegroup = isset($GLOBALS['xoopsOption']['cache_group']) ? "_".$GLOBALS['xoopsOption']['cache_group'] : "";
+
+ $protocol = strtolower(substr($_SERVER['SERVER_PROTOCOL'], 0, strpos($_SERVER['SERVER_PROTOCOL'], "/", 0)));
+ return 'mod_'.$GLOBALS['xoopsModule']->getVar('dirname').'|'.md5(str_replace(XOOPS_URL, '', $protocol."://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].$cachegroup));
+ }
+
+ /**
+ * Checks if a template is cached
+ *
+ * @param string $template name of template
+ *
+ * @return bool
+ **/
+ function is_cached($template) {
+ return $this->tplEngine->is_cached($template, $this->getCachedTemplateId());
+ }
+
+ /**
+ * Function: Creates a pretty menu and navigation bar above your module admin page
+ *
+ * I've nicked the basis of this from functions.php,v 1.2 of the new Profiles module
+ * developed by hyperpod for Xoops V1.2, who in turn based this on Hsalazar's work with Soapbox
+ *
+ * @version 1
+ * @author A Kitson
+ * @param int $currentoption The menu option to display as being current
+ * @param string $breadcrumb the trail back to where we've come from
+ */
+ function loadModuleAdminMenu ($currentoption = 0, $breadcrumb = '')
+ {
+ /**
+ * @global object $xoopsModule {@link XoopsModule} object for the current module
+ */
+ global $xoopsModule;
+
+ /**
+ * @var array $menuoptions - get the adminmenu variables from the template object (assigned during xoops_cp_header() )
+ */
+ $menuoptions = $this->tplEngine->get_template_vars('adminmenu');
+ /**
+ * If the current module has menu links there
+ */
+ if (isset($menuoptions[$xoopsModule->getVar('mid')])) {
+ /**
+ * Add the breadcrumb to the links
+ */
+ $menuoptions[$xoopsModule->getVar('mid')]['breadcrumb'] = $breadcrumb;
+ /**
+ * Add the currently selected option
+ */
+ $menuoptions[$xoopsModule->getVar('mid')]['current'] = $currentoption;
+ /**
+ * Assign the links with additional information to the template object
+ */
+ $this->tplEngine->assign('modulemenu', $menuoptions[$xoopsModule->getVar('mid')]);
+ }
+ }
+
+ /**
+ * Checks the cache of the current page template (if set in $xoopsOption)
+ *
+ * @return void
+ **/
+ function checkCache() {
+ global $xoopsModule, $xoopsConfig;
+ if (xoops_getenv('REQUEST_METHOD') != 'POST' && !empty($xoopsModule) && !empty($xoopsConfig['module_cache'][$xoopsModule->getVar('mid')])) {
+ global $xoopsOption;
+ //Enable caching
+ $this->tplEngine->xoops_setCaching(2);
+ $this->tplEngine->xoops_setCacheTime($xoopsConfig['module_cache'][$xoopsModule->getVar('mid')]);
+
+ if (isset($xoopsOption['template_main'])) {
+ $xoopsCachedTemplate = 'db:'.$xoopsOption['template_main'];
+ //Check caching
+ if ($this->is_cached($xoopsCachedTemplate)) {
+ //Add logger message
+ global $xoopsLogger;
+ $xoopsLogger->addExtra($xoopsCachedTemplate, sprintf('Cached (regenerates every %d seconds)', $xoopsConfig['module_cache'][$xoopsModule->getVar('mid')]));
+
+ //serve page
+ $this->display($xoopsCachedTemplate);
+
+ global $xoopsLogger, $xoopsUser;
+ $xoopsLogger->stopTime();
+ if (in_array(2, $xoopsConfig['debug_mode']) && $xoopsUser && $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
+ //add SQL debug window
+ echo $xoopsLogger->getSQLDebug();
+ }
+ exit();
+ }
+ }
+
+ } else {
+ $this->tplEngine->xoops_setCaching(0);
+ }
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/theme.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/tree.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/tree.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/tree.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,227 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+
+/**
+ * A tree structures with {@link XoopsObject}s as nodes
+ *
+ * @package kernel
+ * @subpackage core
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright (c) 2000-2003 The Xoops Project - www.xoops.org
+ */
+class XoopsObjectTree {
+
+ /**#@+
+ * @access private
+ */
+ var $_parentId;
+ var $_myId;
+ var $_rootId = null;
+ var $_tree = array();
+ var $_objects;
+ /**#@-*/
+
+ /**
+ * Constructor
+ *
+ * @param array $objectArr Array of {@link XoopsObject}s
+ * @param string $myId field name of object ID
+ * @param string $parentId field name of parent object ID
+ * @param string $rootId field name of root object ID
+ **/
+ function XoopsObjectTree(&$objectArr, $myId, $parentId, $rootId = null)
+ {
+ $this->_objects =& $objectArr;
+ $this->_myId = $myId;
+ $this->_parentId = $parentId;
+ if (isset($rootId)) {
+ $this->_rootId = $rootId;
+ }
+ $this->_initialize();
+ }
+
+ /**
+ * Initialize the object
+ *
+ * @access private
+ **/
+ function _initialize()
+ {
+ foreach (array_keys($this->_objects) as $i) {
+ $key1 = $this->_objects[$i]->getVar($this->_myId);
+ $this->_tree[$key1]['obj'] =& $this->_objects[$i];
+ $key2 = $this->_objects[$i]->getVar($this->_parentId);
+ $this->_tree[$key1]['parent'] = $key2;
+ $this->_tree[$key2]['child'][] = $key1;
+ if (isset($this->_rootId)) {
+ $this->_tree[$key1]['root'] = $this->_objects[$i]->getVar($this->_rootId);
+ }
+ }
+ }
+
+ /**
+ * Get the tree
+ *
+ * @return array Associative array comprising the tree
+ **/
+ function &getTree()
+ {
+ return $this->_tree;
+ }
+
+ /**
+ * returns an object from the tree specified by its id
+ *
+ * @param string $key ID of the object to retrieve
+ * @return object Object within the tree
+ **/
+ function &getByKey($key)
+ {
+ return $this->_tree[$key]['obj'];
+ }
+
+ /**
+ * returns an array of all the first child object of an object specified by its id
+ *
+ * @param string $key ID of the parent object
+ * @return array Array of children of the parent
+ **/
+ function &getFirstChild($key)
+ {
+ $ret = array();
+ if (isset($this->_tree[$key]['child'])) {
+ foreach ($this->_tree[$key]['child'] as $childkey) {
+ $ret[$childkey] =& $this->_tree[$childkey]['obj'];
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * returns an array of all child objects of an object specified by its id
+ *
+ * @param string $key ID of the parent
+ * @param array $ret (Empty when called from client) Array of children from previous recursions.
+ * @return array Array of child nodes.
+ **/
+ function &getAllChild($key, $ret = array())
+ {
+ if (isset($this->_tree[$key]['child'])) {
+ foreach ($this->_tree[$key]['child'] as $childkey) {
+ $ret[$childkey] =& $this->_tree[$childkey]['obj'];
+ $children =& $this->getAllChild($childkey, $ret);
+ foreach (array_keys($children) as $newkey) {
+ $ret[$newkey] =& $children[$newkey];
+ }
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * returns an array of all parent objects.
+ * the key of returned array represents how many levels up from the specified object
+ *
+ * @param string $key ID of the child object
+ * @param array $ret (empty when called from outside) Result from previous recursions
+ * @param int $uplevel (empty when called from outside) level of recursion
+ * @return array Array of parent nodes.
+ **/
+ function &getAllParent($key, $ret = array(), $uplevel = 1)
+ {
+ if (isset($this->_tree[$key]['parent']) && isset($this->_tree[$this->_tree[$key]['parent']]['obj'])) {
+ $ret[$uplevel] =& $this->_tree[$this->_tree[$key]['parent']]['obj'];
+ $parents =& $this->getAllParent($this->_tree[$key]['parent'], $ret, $uplevel+1);
+ foreach (array_keys($parents) as $newkey) {
+ $ret[$newkey] =& $parents[$newkey];
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * Make options for a select box from
+ *
+ * @param string $fieldName Name of the member variable from the
+ * node objects that should be used as the title for the options.
+ * @param string $selected Value to display as selected
+ * @param int $key ID of the object to display as the root of select options
+ * @param string $ret (reference to a string when called from outside) Result from previous recursions
+ * @param string $prefix_orig String to indent items at deeper levels
+ * @param string $prefix_curr String to indent the current item
+ * @return
+ *
+ * @access private
+ **/
+ function _makeSelBoxOptions($fieldName, $selected, $key, &$ret, $prefix_orig, $prefix_curr = '')
+ {
+ if ($key > 0) {
+ $value = $this->_tree[$key]['obj']->getVar($this->_myId);
+ $ret .= '<option value="'.$value.'"';
+ if ($value == $selected) {
+ $ret .= ' selected="selected"';
+ }
+ $ret .= '>'.$prefix_curr.$this->_tree[$key]['obj']->getVar($fieldName).'</option>';
+ $prefix_curr .= $prefix_orig;
+ }
+ if (isset($this->_tree[$key]['child']) && !empty($this->_tree[$key]['child'])) {
+ foreach ($this->_tree[$key]['child'] as $childkey) {
+ $this->_makeSelBoxOptions($fieldName, $selected, $childkey, $ret, $prefix_orig, $prefix_curr);
+ }
+ }
+ }
+
+ /**
+ * Make a select box with options from the tree
+ *
+ * @param string $name Name of the select box
+ * @param string $fieldName Name of the member variable from the
+ * node objects that should be used as the title for the options.
+ * @param string $prefix String to indent deeper levels
+ * @param string $selected Value to display as selected
+ * @param bool $addEmptyOption Set TRUE to add an empty option with value "0" at the top of the hierarchy
+ * @param integer $key ID of the object to display as the root of select options
+ * @return string HTML select box
+ **/
+ function &makeSelBox($name, $fieldName, $prefix='-', $selected='', $addEmptyOption = false, $key=0)
+ {
+ $ret = '<select name="'.$name.'" id="'.$name.'">';
+ if (false != $addEmptyOption) {
+ $ret .= '<option value="0"></option>';
+ }
+ $this->_makeSelBoxOptions($fieldName, $selected, $key, $ret, $prefix);
+ return $ret.'</select>';
+ }
+
+
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/tree.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/uploader.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/uploader.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/uploader.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,460 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if ( file_exists(XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php") ) {
+ include_once XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php";
+} else {
+ include_once XOOPS_ROOT_PATH."/language/english/error.php";
+}
+/*!
+Example
+
+ include_once 'uploader.php';
+ $allowed_mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png');
+ $maxfilesize = 50000;
+ $maxfilewidth = 120;
+ $maxfileheight = 120;
+ $uploader = new XoopsMediaUploader('/home/xoops/uploads', $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight);
+ if ($uploader->fetchMedia($_POST['uploade_file_name'])) {
+ if (!$uploader->upload()) {
+ echo $uploader->getErrors();
+ } else {
+ echo '<h4>File uploaded successfully!</h4>'
+ echo 'Saved as: ' . $uploader->getSavedFileName() . '<br />';
+ echo 'Full path: ' . $uploader->getSavedDestination();
+ }
+ } else {
+ echo $uploader->getErrors();
+ }
+
+*/
+
+/**
+ * Upload Media files
+ *
+ * Example of usage:
+ * <code>
+ * include_once 'uploader.php';
+ * $allowed_mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png');
+ * $maxfilesize = 50000;
+ * $maxfilewidth = 120;
+ * $maxfileheight = 120;
+ * $uploader = new XoopsMediaUploader('/home/xoops/uploads', $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight);
+ * if ($uploader->fetchMedia($_POST['uploade_file_name'])) {
+ * if (!$uploader->upload()) {
+ * echo $uploader->getErrors();
+ * } else {
+ * echo '<h4>File uploaded successfully!</h4>'
+ * echo 'Saved as: ' . $uploader->getSavedFileName() . '<br />';
+ * echo 'Full path: ' . $uploader->getSavedDestination();
+ * }
+ * } else {
+ * echo $uploader->getErrors();
+ * }
+ * </code>
+ *
+ * @package kernel
+ * @subpackage core
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright (c) 2000-2003 The Xoops Project - www.xoops.org
+ */
+class XoopsMediaUploader
+{
+ /**
+ * Flag indicating if unrecognized mimetypes should be allowed (use with precaution ! may lead to security issues )
+ **/
+ var $allowUnknownTypes = false;
+
+ var $mediaName;
+ var $mediaType;
+ var $mediaSize;
+ var $mediaTmpName;
+ var $mediaError;
+ var $mediaRealType = '';
+
+ var $uploadDir = '';
+
+ var $allowedMimeTypes = array();
+
+ var $maxFileSize = 0;
+ var $maxWidth;
+ var $maxHeight;
+
+ var $targetFileName;
+
+ var $prefix;
+
+ var $errors = array();
+
+ var $savedDestination;
+
+ var $savedFileName;
+
+ var $extensionToMime = array();
+ /**
+ * Constructor
+ *
+ * @param string $uploadDir
+ * @param array $allowedMimeTypes
+ * @param int $maxFileSize
+ * @param int $maxWidth
+ * @param int $maxHeight
+ * @param int $cmodvalue
+ **/
+ function XoopsMediaUploader($uploadDir, $allowedMimeTypes, $maxFileSize=0, $maxWidth=null, $maxHeight=null)
+ {
+ @$this->extensionToMime = include( XOOPS_ROOT_PATH . '/class/mimetypes.inc.php' );
+ if ( !is_array( $this->extensionToMime ) ) {
+ $this->extensionToMime = array();
+ return false;
+ }
+ if (is_array($allowedMimeTypes)) {
+ $this->allowedMimeTypes =& $allowedMimeTypes;
+ }
+ $this->uploadDir = $uploadDir;
+ $this->maxFileSize = intval($maxFileSize);
+ if(isset($maxWidth)) {
+ $this->maxWidth = intval($maxWidth);
+ }
+ if(isset($maxHeight)) {
+ $this->maxHeight = intval($maxHeight);
+ }
+ }
+
+ /**
+ * Fetch the uploaded file
+ *
+ * @param string $media_name Name of the file field
+ * @param int $index Index of the file (if more than one uploaded under that name)
+ * @return bool
+ **/
+ function fetchMedia($media_name, $index = null)
+ {
+ if ( empty( $this->extensionToMime ) ) {
+ $this->setErrors( _ER_UP_MIMETYPELOAD );
+ return false;
+ }
+ if (!isset($_FILES[$media_name])) {
+ $this->setErrors(_ER_UP_FILENOTFOUND);
+ return false;
+ } elseif (is_array($_FILES[$media_name]['name']) && isset($index)) {
+ $index = intval($index);
+ $this->mediaName = (get_magic_quotes_gpc()) ? stripslashes($_FILES[$media_name]['name'][$index]) : $_FILES[$media_name]['name'][$index];
+ $this->mediaType = $_FILES[$media_name]['type'][$index];
+ $this->mediaSize = $_FILES[$media_name]['size'][$index];
+ $this->mediaTmpName = $_FILES[$media_name]['tmp_name'][$index];
+ $this->mediaError = !empty($_FILES[$media_name]['error'][$index]) ? $_FILES[$media_name]['error'][$index] : 0;
+ } else {
+ $media_name =& $_FILES[$media_name];
+ $this->mediaName = (get_magic_quotes_gpc()) ? stripslashes($media_name['name']) : $media_name['name'];
+ $this->mediaName = $media_name['name'];
+ $this->mediaType = $media_name['type'];
+ $this->mediaSize = $media_name['size'];
+ $this->mediaTmpName = $media_name['tmp_name'];
+ $this->mediaError = !empty($media_name['error']) ? $media_name['error'] : 0;
+ }
+ if ( ($ext = strrpos( $this->mediaName, '.' )) !== false ) {
+ $ext = strtolower(substr( $this->mediaName, $ext + 1 ));
+ if ( isset( $this->extensionToMime[$ext] ) ) {
+ $this->mediaRealType = $this->extensionToMime[$ext];
+ //trigger_error( "XoopsMediaUploader: Set mediaRealType to {$this->mediaRealType} (file extension is $ext)", E_USER_NOTICE );
+ }
+ }
+ $this->errors = array();
+ if ( $ext && in_array( $ext, array( 'gif', 'jpg', 'jpeg', 'png', 'bmp', 'xbm' ) ) ) {
+ // Prevent sending of invalid images that would crash IE
+ if ( ! ( $info = getimagesize( $this->mediaTmpName ) ) ) {
+ $this->setErrors( 'Invalid file content' );
+ return false;
+ }
+ }
+ if (intval($this->mediaSize) < 0) {
+ $this->setErrors(_ER_UP_INVALIDFILESIZE);
+ return false;
+ }
+ if ($this->mediaName == '') {
+ $this->setErrors( _ER_UP_FILENAMEEMPTY);
+ return false;
+ }
+ if ($this->mediaTmpName == 'none' || !is_uploaded_file($this->mediaTmpName)) {
+ $this->setErrors(_ER_UP_NOFILEUPLOADED);
+ return false;
+ }
+ if ($this->mediaError > 0) {
+ $this->setErrors(sprintf(_ER_UP_ERROROCCURRED, $this->mediaError));
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Set the target filename
+ *
+ * @param string $value
+ **/
+ function setTargetFileName($value){
+ $this->targetFileName = strval(trim($value));
+ }
+
+ /**
+ * Set the prefix
+ *
+ * @param string $value
+ **/
+ function setPrefix($value){
+ $this->prefix = strval(trim($value));
+ }
+
+ /**
+ * Get the uploaded filename
+ *
+ * @return string
+ **/
+ function getMediaName()
+ {
+ return $this->mediaName;
+ }
+
+ /**
+ * Get the type of the uploaded file
+ *
+ * @return string
+ **/
+ function getMediaType()
+ {
+ return $this->mediaType;
+ }
+
+ /**
+ * Get the size of the uploaded file
+ *
+ * @return int
+ **/
+ function getMediaSize()
+ {
+ return $this->mediaSize;
+ }
+
+ /**
+ * Get the temporary name that the uploaded file was stored under
+ *
+ * @return string
+ **/
+ function getMediaTmpName()
+ {
+ return $this->mediaTmpName;
+ }
+
+ /**
+ * Get the saved filename
+ *
+ * @return string
+ **/
+ function getSavedFileName(){
+ return $this->savedFileName;
+ }
+
+ /**
+ * Get the destination the file is saved to
+ *
+ * @return string
+ **/
+ function getSavedDestination(){
+ return $this->savedDestination;
+ }
+
+ /**
+ * Check the file and copy it to the destination
+ *
+ * @return bool
+ **/
+ function upload($chmod = 0644)
+ {
+ if ($this->uploadDir == '') {
+ $this->setErrors(_ER_UP_UPLOADDIRNOTSET);
+ return false;
+ }
+ if (!is_dir($this->uploadDir)) {
+ $this->setErrors(sprintf(_ER_UP_FAILEDOPENDIR, $this->uploadDir));
+ }
+ if (!is_writeable($this->uploadDir)) {
+ $this->setErrors(sprintf(_ER_UP_FAILEDOPENDIRWRITE, $this->uploadDir));
+ }
+ if (!$this->checkMaxFileSize()) {
+ $this->setErrors(sprintf(_ER_UP_FILESIZETOOLARGE, $this->mediaSize));
+ }
+ if (!$this->checkMaxWidth()) {
+ $this->setErrors(sprintf(_ER_UP_FILEWIDTHTOOLARGE, $this->maxWidth));
+ }
+ if (!$this->checkMaxHeight()) {
+ $this->setErrors(sprintf(_ER_UP_FILEHEIGHTTOOLARGE, $this->maxHeight));
+ }
+ if (!$this->checkMimeType()) {
+ $this->setErrors(sprintf(_ER_UP_MIMETYPENOTALLOWED, $this->mediaType));
+ }
+ if (count($this->errors) > 0) {
+ return false;
+ }
+ if (!$this->_copyFile($chmod)) {
+ $this->setErrors(sprintf(_ER_UP_FAILEDUPLOADFILE, $this->mediaName));
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Copy the file to its destination
+ *
+ * @return bool
+ **/
+ function _copyFile($chmod)
+ {
+ $matched = array();
+ if (!preg_match("/\.([a-zA-Z0-9]+)$/", $this->mediaName, $matched)) {
+ return false;
+ }
+ if (isset($this->targetFileName)) {
+ $this->savedFileName = $this->targetFileName;
+ } elseif (isset($this->prefix)) {
+ $this->savedFileName = uniqid($this->prefix).'.'.strtolower($matched[1]);
+ } else {
+ $this->savedFileName = strtolower($this->mediaName);
+ }
+ $this->savedDestination = $this->uploadDir.'/'.$this->savedFileName;
+ if (!move_uploaded_file($this->mediaTmpName, $this->savedDestination)) {
+ return false;
+ }
+ @chmod($this->savedDestination, $chmod);
+ return true;
+ }
+
+ /**
+ * Is the file the right size?
+ *
+ * @return bool
+ **/
+ function checkMaxFileSize()
+ {
+ if ($this->mediaSize > $this->maxFileSize) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Is the picture the right width?
+ *
+ * @return bool
+ **/
+ function checkMaxWidth()
+ {
+ if (!isset($this->maxWidth)) {
+ return true;
+ }
+ if (false !== $dimension = getimagesize($this->mediaTmpName)) {
+ if ($dimension[0] > $this->maxWidth) {
+ return false;
+ }
+ } else {
+ trigger_error(sprintf(_ER_UP_FAILEDFETCHIMAGESIZE, $this->mediaTmpName), E_USER_WARNING);
+ }
+ return true;
+ }
+
+ /**
+ * Is the picture the right height?
+ *
+ * @return bool
+ **/
+ function checkMaxHeight()
+ {
+ if (!isset($this->maxHeight)) {
+ return true;
+ }
+ if (false !== $dimension = getimagesize($this->mediaTmpName)) {
+ if ($dimension[1] > $this->maxHeight) {
+ return false;
+ }
+ } else {
+ trigger_error(sprintf(_ER_UP_FAILEDFETCHIMAGESIZE, $this->mediaTmpName), E_USER_WARNING);
+ }
+ return true;
+ }
+
+ /**
+ * Check whether or not the uploaded file type is allowed
+ *
+ * @return bool
+ **/
+ function checkMimeType()
+ {
+ if ( empty( $this->mediaRealType ) && !$this->allowUnknownTypes ) {
+ $this->setErrors( _ER_UP_UNKNOWNFILETYPEREJECTED );
+ return false;
+ }
+
+ return ( empty($this->allowedMimeTypes) || in_array($this->mediaRealType, $this->allowedMimeTypes) );
+ }
+
+ /**
+ * Add an error
+ *
+ * @param string $error
+ **/
+ function setErrors($error)
+ {
+ $this->errors[] = trim($error);
+ }
+
+ /**
+ * Get generated errors
+ *
+ * @param bool $ashtml Format using HTML?
+ *
+ * @return array|string Array of array messages OR HTML string
+ */
+ function &getErrors($ashtml = true)
+ {
+ if (!$ashtml) {
+ return $this->errors;
+ } else {
+ $ret = '';
+ if (count($this->errors) > 0) {
+ $ret = '<h4>'._ER_UP_ERRORSRETURNED.'</h4>';
+ foreach ($this->errors as $error) {
+ $ret .= $error.'<br />';
+ }
+ }
+ return $ret;
+ }
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/uploader.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xml/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xml/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/bloggerapi.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/bloggerapi.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/bloggerapi.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,297 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+require_once XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpcapi.php';
+
+class BloggerApi extends XoopsXmlRpcApi
+{
+
+ function BloggerApi(&$params, &$response, &$module)
+ {
+ $this->XoopsXmlRpcApi($params, $response, $module);
+ $this->_setXoopsTagMap('storyid', 'postid');
+ $this->_setXoopsTagMap('published', 'dateCreated');
+ $this->_setXoopsTagMap('uid', 'userid');
+ }
+
+ function newPost()
+ {
+ if (!$this->_checkUser($this->params[2], $this->params[3])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ if (!$fields =& $this->_getPostFields(null, $this->params[1])) {
+ $this->response->add(new XoopsXmlRpcFault(106));
+ } else {
+ $missing = array();
+ $post = array();
+ foreach ($fields as $tag => $detail) {
+ $maptag = $this->_getXoopsTagMap($tag);
+ $data = $this->_getTagCdata($this->params[4], $maptag, true);
+ if (trim($data) == ''){
+ if ($detail['required']) {
+ $missing[] = $maptag;
+ }
+ } else {
+ $post[$tag] = $data;
+ }
+ }
+ if (count($missing) > 0) {
+ $msg = '';
+ foreach ($missing as $m) {
+ $msg .= '<'.$m.'> ';
+ }
+ $this->response->add(new XoopsXmlRpcFault(109, $msg));
+ } else {
+ $newparams = array();
+ // Xoops Api ignores App key
+ $newparams[0] = $this->params[1];
+ $newparams[1] = $this->params[2];
+ $newparams[2] = $this->params[3];
+ foreach ($post as $key => $value) {
+ $newparams[3][$key] =& $value;
+ unset($value);
+ }
+ $newparams[3]['xoops_text'] =& $this->params[4];
+ $newparams[4] = $this->params[5];
+ $xoopsapi =& $this->_getXoopsApi($newparams);
+ $xoopsapi->_setUser($this->user, $this->isadmin);
+ $xoopsapi->newPost();
+ }
+ }
+ }
+ }
+
+ function editPost()
+ {
+ if (!$this->_checkUser($this->params[2], $this->params[3])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ if (!$fields =& $this->_getPostFields($this->params[1])) {
+ } else {
+ $missing = array();
+ $post = array();
+ foreach ($fields as $tag => $detail) {
+ $data = $this->_getTagCdata($this->params[4], $tag, true);
+ if (trim($data) == ''){
+ if ($detail['required']) {
+ $missing[] = $tag;
+ }
+ } else {
+ $post[$tag] = $data;
+ }
+ }
+ if (count($missing) > 0) {
+ $msg = '';
+ foreach ($missing as $m) {
+ $msg .= '<'.$m.'> ';
+ }
+ $this->response->add(new XoopsXmlRpcFault(109, $msg));
+ } else {
+ $newparams = array();
+ // XOOPS API ignores App key (index 0 of params)
+ $newparams[0] = $this->params[1];
+ $newparams[1] = $this->params[2];
+ $newparams[2] = $this->params[3];
+ foreach ($post as $key => $value) {
+ $newparams[3][$key] =& $value;
+ unset($value);
+ }
+ $newparams[3]['xoops_text'] =& $this->params[4];
+ $newparams[4] = $this->params[5];
+ $xoopsapi =& $this->_getXoopsApi($newparams);
+ $xoopsapi->_setUser($this->user, $this->isadmin);
+ $xoopsapi->editPost();
+ }
+ }
+ }
+ }
+
+ function deletePost()
+ {
+ if (!$this->_checkUser($this->params[2], $this->params[3])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ // XOOPS API ignores App key (index 0 of params)
+ array_shift($this->params);
+ $xoopsapi =& $this->_getXoopsApi($this->params);
+ $xoopsapi->_setUser($this->user, $this->isadmin);
+ $xoopsapi->deletePost();
+ }
+ }
+
+ function getPost()
+ {
+ if (!$this->_checkUser($this->params[2], $this->params[3])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ // XOOPS API ignores App key (index 0 of params)
+ array_shift($this->params);
+ $xoopsapi =& $this->_getXoopsApi($this->params);
+ $xoopsapi->_setUser($this->user, $this->isadmin);
+ $ret =& $xoopsapi->getPost(false);
+ if (is_array($ret)) {
+ $struct = new XoopsXmlRpcStruct();
+ $content = '';
+ foreach ($ret as $key => $value) {
+ $maptag = $this->_getXoopsTagMap($key);
+ switch($maptag) {
+ case 'userid':
+ $struct->add('userid', new XoopsXmlRpcString($value));
+ break;
+ case 'dateCreated':
+ $struct->add('dateCreated', new XoopsXmlRpcDatetime($value));
+ break;
+ case 'postid':
+ $struct->add('postid', new XoopsXmlRpcString($value));
+ break;
+ default :
+ $content .= '<'.$key.'>'.trim($value).'</'.$key.'>';
+ break;
+ }
+ }
+ $struct->add('content', new XoopsXmlRpcString($content));
+ $this->response->add($struct);
+ } else {
+ $this->response->add(new XoopsXmlRpcFault(106));
+ }
+ }
+ }
+
+ function getRecentPosts()
+ {
+ if (!$this->_checkUser($this->params[2], $this->params[3])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ // XOOPS API ignores App key (index 0 of params)
+ array_shift($this->params);
+ $xoopsapi =& $this->_getXoopsApi($this->params);
+ $xoopsapi->_setUser($this->user, $this->isadmin);
+ $ret =& $xoopsapi->getRecentPosts(false);
+ if (is_array($ret)) {
+ $arr = new XoopsXmlRpcArray();
+ $count = count($ret);
+ if ($count == 0) {
+ $this->response->add(new XoopsXmlRpcFault(106, 'Found 0 Entries'));
+ } else {
+ for ($i = 0; $i < $count; $i++) {
+ $struct = new XoopsXmlRpcStruct();
+ $content = '';
+ foreach($ret[$i] as $key => $value) {
+ $maptag = $this->_getXoopsTagMap($key);
+ switch($maptag) {
+ case 'userid':
+ $struct->add('userid', new XoopsXmlRpcString($value));
+ break;
+ case 'dateCreated':
+ $struct->add('dateCreated', new XoopsXmlRpcDatetime($value));
+ break;
+ case 'postid':
+ $struct->add('postid', new XoopsXmlRpcString($value));
+ break;
+ default :
+ $content .= '<'.$key.'>'.trim($value).'</'.$key.'>';
+ break;
+ }
+ }
+ $struct->add('content', new XoopsXmlRpcString($content));
+ $arr->add($struct);
+ unset($struct);
+ }
+ $this->response->add($arr);
+ }
+ } else {
+ $this->response->add(new XoopsXmlRpcFault(106));
+ }
+ }
+ }
+
+ function getUsersBlogs()
+ {
+ if (!$this->_checkUser($this->params[1], $this->params[2])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ $arr = new XoopsXmlRpcArray();
+ $struct = new XoopsXmlRpcStruct();
+ $struct->add('url', new XoopsXmlRpcString(XOOPS_URL.'/modules/'.$this->module->getVar('dirname').'/'));
+ $struct->add('blogid', new XoopsXmlRpcString($this->module->getVar('mid')));
+ $struct->add('blogName', new XoopsXmlRpcString('XOOPS Blog'));
+ $arr->add($struct);
+ $this->response->add($arr);
+ }
+ }
+
+ function getUserInfo()
+ {
+ if (!$this->_checkUser($this->params[1], $this->params[2])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ $struct = new XoopsXmlRpcStruct();
+ $struct->add('nickname', new XoopsXmlRpcString($this->user->getVar('uname')));
+ $struct->add('userid', new XoopsXmlRpcString($this->user->getVar('uid')));
+ $struct->add('url', new XoopsXmlRpcString($this->user->getVar('url')));
+ $struct->add('email', new XoopsXmlRpcString($this->user->getVar('email')));
+ $struct->add('lastname', new XoopsXmlRpcString(''));
+ $struct->add('firstname', new XoopsXmlRpcString($this->user->getVar('name')));
+ $this->response->add($struct);
+ }
+ }
+
+ function getTemplate()
+ {
+ if (!$this->_checkUser($this->params[2], $this->params[3])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ switch ($this->params[5]) {
+ case 'main':
+ $this->response->add(new XoopsXmlRpcFault(107));
+ break;
+ case 'archiveIndex':
+ $this->response->add(new XoopsXmlRpcFault(107));
+ break;
+ default:
+ $this->response->add(new XoopsXmlRpcFault(107));
+ break;
+ }
+ }
+ }
+
+ function setTemplate()
+ {
+ if (!$this->_checkUser($this->params[2], $this->params[3])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ $this->response->add(new XoopsXmlRpcFault(107));
+ }
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/bloggerapi.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/metaweblogapi.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/metaweblogapi.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/metaweblogapi.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,277 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+require_once XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpcapi.php';
+
+class MetaWeblogApi extends XoopsXmlRpcApi
+{
+ function MetaWeblogApi(&$params, &$response, &$module)
+ {
+ $this->XoopsXmlRpcApi($params, $response, $module);
+ $this->_setXoopsTagMap('storyid', 'postid');
+ $this->_setXoopsTagMap('published', 'dateCreated');
+ $this->_setXoopsTagMap('uid', 'userid');
+ //$this->_setXoopsTagMap('hometext', 'description');
+ }
+
+ function newPost()
+ {
+ if (!$this->_checkUser($this->params[1], $this->params[2])) {
+
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ if (!$fields =& $this->_getPostFields(null, $this->params[0])) {
+ $this->response->add(new XoopsXmlRpcFault(106));
+ } else {
+ $missing = array();
+ $post = array();
+ foreach ($fields as $tag => $detail) {
+ $maptag = $this->_getXoopsTagMap($tag);
+ if (!isset($this->params[3][$maptag])) {
+ $data = $this->_getTagCdata($this->params[3]['description'], $maptag, true);
+ if (trim($data) == ''){
+ if ($detail['required']) {
+ $missing[] = $maptag;
+ }
+ } else {
+ $post[$tag] = $data;
+ }
+ } else {
+ $post[$tag] = $this->params[3][$maptag];
+ }
+ }
+ if (count($missing) > 0) {
+ $msg = '';
+ foreach ($missing as $m) {
+ $msg .= '<'.$m.'> ';echo $m;
+ }
+ $this->response->add(new XoopsXmlRpcFault(109, $msg));
+ } else {
+ $newparams = array();
+ $newparams[0] = $this->params[0];
+ $newparams[1] = $this->params[1];
+ $newparams[2] = $this->params[2];
+ foreach ($post as $key => $value) {
+ $newparams[3][$key] =& $value;
+ unset($value);
+ }
+ $newparams[3]['xoops_text'] = $this->params[3]['description'];
+ if (isset($this->params[3]['categories']) && is_array($this->params[3]['categories'])) {
+ foreach ($this->params[3]['categories'] as $k => $v) {
+ $newparams[3]['categories'][$k] = $v;
+ }
+ }
+ $newparams[4] = $this->params[4];
+ $xoopsapi =& $this->_getXoopsApi($newparams);
+ $xoopsapi->_setUser($this->user, $this->isadmin);
+ $xoopsapi->newPost();
+ }
+ }
+ }
+ }
+
+ function editPost()
+ {
+ if (!$this->_checkUser($this->params[1], $this->params[2])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ if (!$fields =& $this->_getPostFields($this->params[0])) {
+ } else {
+ $missing = array();
+ $post = array();
+ foreach ($fields as $tag => $detail) {
+ $maptag = $this->_getXoopsTagMap($tag);
+ if (!isset($this->params[3][$maptag])) {
+ $data = $this->_getTagCdata($this->params[3]['description'], $maptag, true);
+ if (trim($data) == ''){
+ if ($detail['required']) {
+ $missing[] = $tag;
+ }
+ } else {
+ $post[$tag] = $data;
+ }
+ } else {
+ $post[$tag] =& $this->params[3][$maptag];
+ }
+ }
+ if (count($missing) > 0) {
+ $msg = '';
+ foreach ($missing as $m) {
+ $msg .= '<'.$m.'> ';
+ }
+ $this->response->add(new XoopsXmlRpcFault(109, $msg));
+ } else {
+ $newparams = array();
+ $newparams[0] = $this->params[0];
+ $newparams[1] = $this->params[1];
+ $newparams[2] = $this->params[2];
+ foreach ($post as $key => $value) {
+ $newparams[3][$key] =& $value;
+ unset($value);
+ }
+ if (isset($this->params[3]['categories']) && is_array($this->params[3]['categories'])) {
+ foreach ($this->params[3]['categories'] as $k => $v) {
+ $newparams[3]['categories'][$k] = $v;
+ }
+ }
+ $newparams[3]['xoops_text'] = $this->params[3]['description'];
+ $newparams[4] = $this->params[4];
+ $xoopsapi =& $this->_getXoopsApi($newparams);
+ $xoopsapi->_setUser($this->user, $this->isadmin);
+ $xoopsapi->editPost();
+ }
+ }
+ }
+ }
+
+ function getPost()
+ {
+ if (!$this->_checkUser($this->params[1], $this->params[2])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ $xoopsapi =& $this->_getXoopsApi($this->params);
+ $xoopsapi->_setUser($this->user, $this->isadmin);
+ $ret =& $xoopsapi->getPost(false);
+ if (is_array($ret)) {
+ $struct = new XoopsXmlRpcStruct();
+ $content = '';
+ foreach ($ret as $key => $value) {
+ $maptag = $this->_getXoopsTagMap($key);
+ switch($maptag) {
+ case 'userid':
+ $struct->add('userid', new XoopsXmlRpcString($value));
+ break;
+ case 'dateCreated':
+ $struct->add('dateCreated', new XoopsXmlRpcDatetime($value));
+ break;
+ case 'postid':
+ $struct->add('postid', new XoopsXmlRpcString($value));
+ $struct->add('link', new XoopsXmlRpcString(XOOPS_URL.'/modules/xoopssections/item.php?item='.$value));
+ $struct->add('permaLink', new XoopsXmlRpcString(XOOPS_URL.'/modules/xoopssections/item.php?item='.$value));
+ break;
+ case 'title':
+ $struct->add('title', new XoopsXmlRpcString($value));
+ break;
+ default :
+ $content .= '<'.$key.'>'.trim($value).'</'.$key.'>';
+ break;
+ }
+ }
+ $struct->add('description', new XoopsXmlRpcString($content));
+ $this->response->add($struct);
+ } else {
+ $this->response->add(new XoopsXmlRpcFault(106));
+ }
+ }
+ }
+
+ function getRecentPosts()
+ {
+ if (!$this->_checkUser($this->params[1], $this->params[2])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ $xoopsapi =& $this->_getXoopsApi($this->params);
+ $xoopsapi->_setUser($this->user, $this->isadmin);
+ $ret =& $xoopsapi->getRecentPosts(false);
+ if (is_array($ret)) {
+ $arr = new XoopsXmlRpcArray();
+ $count = count($ret);
+ if ($count == 0) {
+ $this->response->add(new XoopsXmlRpcFault(106, 'Found 0 Entries'));
+ } else {
+ for ($i = 0; $i < $count; $i++) {
+ $struct = new XoopsXmlRpcStruct();
+ $content = '';
+ foreach($ret[$i] as $key => $value) {
+ $maptag = $this->_getXoopsTagMap($key);
+ switch($maptag) {
+ case 'userid':
+ $struct->add('userid', new XoopsXmlRpcString($value));
+ break;
+ case 'dateCreated':
+ $struct->add('dateCreated', new XoopsXmlRpcDatetime($value));
+ break;
+ case 'postid':
+ $struct->add('postid', new XoopsXmlRpcString($value));
+ $struct->add('link', new XoopsXmlRpcString(XOOPS_URL.'/modules/news/article.php?item_id='.$value));
+ $struct->add('permaLink', new XoopsXmlRpcString(XOOPS_URL.'/modules/news/article.php?item_id='.$value));
+ break;
+ case 'title':
+ $struct->add('title', new XoopsXmlRpcString($value));
+ break;
+ default :
+ $content .= '<'.$key.'>'.trim($value).'</'.$key.'>';
+ break;
+ }
+ }
+ $struct->add('description', new XoopsXmlRpcString($content));
+ $arr->add($struct);
+ unset($struct);
+ }
+ $this->response->add($arr);
+ }
+ } else {
+ $this->response->add(new XoopsXmlRpcFault(106));
+ }
+ }
+ }
+
+ function getCategories()
+ {
+ if (!$this->_checkUser($this->params[1], $this->params[2])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ $xoopsapi =& $this->_getXoopsApi($this->params);
+ $xoopsapi->_setUser($this->user, $this->isadmin);
+ $ret =& $xoopsapi->getCategories(false);
+ if (is_array($ret)) {
+ $arr = new XoopsXmlRpcArray();
+ foreach ($ret as $id => $detail) {
+ $struct = new XoopsXmlRpcStruct();
+ $struct->add('description', new XoopsXmlRpcString($detail));
+ $struct->add('htmlUrl', new XoopsXmlRpcString(XOOPS_URL.'/modules/news/index.php?storytopic='.$id));
+ $struct->add('rssUrl', new XoopsXmlRpcString(''));
+ $catstruct = new XoopsXmlRpcStruct();
+ $catstruct->add($detail['title'], $struct);
+ $arr->add($catstruct);
+ unset($struct);
+ unset($catstruct);
+ }
+ $this->response->add($arr);
+ } else {
+ $this->response->add(new XoopsXmlRpcFault(106));
+ }
+ }
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/metaweblogapi.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/movabletypeapi.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/movabletypeapi.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/movabletypeapi.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,82 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+require_once XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpcapi.php';
+
+class MovableTypeApi extends XoopsXmlRpcApi
+{
+ function MovableTypeApi(&$params, &$response, &$module)
+ {
+ $this->XoopsXmlRpcApi($params, $response, $module);
+ }
+
+ function getCategoryList()
+ {
+ if (!$this->_checkUser($this->params[1], $this->params[2])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ $xoopsapi =& $this->_getXoopsApi($this->params);
+ $xoopsapi->_setUser($this->user, $this->isadmin);
+ $ret =& $xoopsapi->getCategories(false);
+ if (is_array($ret)) {
+ $arr = new XoopsXmlRpcArray();
+ foreach ($ret as $id => $name) {
+ $struct = new XoopsXmlRpcStruct();
+ $struct->add('categoryId', new XoopsXmlRpcString($id));
+ $struct->add('categoryName', new XoopsXmlRpcString($name['title']));
+ $arr->add($struct);
+ unset($struct);
+ }
+ $this->response->add($arr);
+ } else {
+ $this->response->add(new XoopsXmlRpcFault(106));
+ }
+ }
+ }
+
+ function getPostCategories()
+ {
+ $this->response->add(new XoopsXmlRpcFault(107));
+ }
+
+ function setPostCategories()
+ {
+ $this->response->add(new XoopsXmlRpcFault(107));
+ }
+
+ function supportedMethods()
+ {
+ $this->response->add(new XoopsXmlRpcFault(107));
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/movabletypeapi.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xmlrpcapi.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xmlrpcapi.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xmlrpcapi.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,167 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+
+class XoopsXmlRpcApi
+{
+
+ // reference to method parameters
+ var $params;
+
+ // reference to xmlrpc document class object
+ var $response;
+
+ // reference to module class object
+ var $module;
+
+ // map between xoops tags and blogger specific tags
+ var $xoopsTagMap = array();
+
+ // user class object
+ var $user;
+
+ var $isadmin = false;
+
+
+
+ function XoopsXmlRpcApi(&$params, &$response, &$module)
+ {
+ $this->params =& $params;
+ $this->response =& $response;
+ $this->module =& $module;
+ }
+
+ function _setUser(&$user, $isadmin = false)
+ {
+ if (is_object($user)) {
+ $this->user =& $user;
+ $this->isadmin = $isadmin;
+ }
+ }
+
+ function _checkUser($username, $password)
+ {
+ if (isset($this->user)) {
+ return true;
+ }
+ $member_handler =& xoops_gethandler('member');
+ $this->user =& $member_handler->loginUser(addslashes($username), addslashes($password));
+ if (!is_object($this->user)) {
+ unset($this->user);
+ return false;
+ }
+ $moduleperm_handler =& xoops_gethandler('groupperm');
+ if (!$moduleperm_handler->checkRight('module_read', $this->module->getVar('mid'), $this->user->getGroups())) {
+ unset($this->user);
+ return false;
+ }
+ return true;
+ }
+
+ function _checkAdmin()
+ {
+ if ($this->isadmin) {
+ return true;
+ }
+ if (!isset($this->user)) {
+ return false;
+ }
+ if (!$this->user->isAdmin($this->module->getVar('mid'))) {
+ return false;
+ }
+ $this->isadmin = true;
+ return true;
+ }
+
+ function &_getPostFields($post_id = null, $blog_id = null)
+ {
+ $ret = array();
+ $ret['title'] = array('required' => true, 'form_type' => 'textbox', 'value_type' => 'text');
+ $ret['hometext'] = array('required' => false, 'form_type' => 'textarea', 'data_type' => 'textarea');
+ $ret['moretext'] = array('required' => false, 'form_type' => 'textarea', 'data_type' => 'textarea');
+ $ret['categories'] = array('required' => false, 'form_type' => 'select_multi', 'data_type' => 'array');
+ /*
+ if (!isset($blog_id)) {
+ if (!isset($post_id)) {
+ return false;
+ }
+ $itemman =& $this->mf->get(MANAGER_ITEM);
+ $item =& $itemman->get($post_id);
+ $blog_id = $item->getVar('sect_id');
+ }
+ $sectman =& $this->mf->get(MANAGER_SECTION);
+ $this->section =& $sectman->get($blog_id);
+ $ret =& $this->section->getVar('sect_fields');
+ */
+ return $ret;
+ }
+
+ function _setXoopsTagMap($xoopstag, $blogtag)
+ {
+ if (trim($blogtag) != '') {
+ $this->xoopsTagMap[$xoopstag] = $blogtag;
+ }
+ }
+
+ function _getXoopsTagMap($xoopstag)
+ {
+ if (isset($this->xoopsTagMap[$xoopstag])) {
+ return $this->xoopsTagMap[$xoopstag];
+ }
+ return $xoopstag;
+ }
+
+ function _getTagCdata(&$text, $tag, $remove = true)
+ {
+ $ret = '';
+ $match = array();
+ if (preg_match("/\<".$tag."\>(.*)\<\/".$tag."\>/is", $text, $match)) {
+ if ($remove) {
+ $text = str_replace($match[0], '', $text);
+ }
+ $ret = $match[1];
+ }
+ return $ret;
+ }
+
+ // kind of dirty method to load XOOPS API and create a new object thereof
+ // returns itself if the calling object is XOOPS API
+ function &_getXoopsApi(&$params)
+ {
+ if (strtolower(get_class($this)) != 'xoopsapi') {
+ require_once(XOOPS_ROOT_PATH.'/class/xml/rpc/xoopsapi.php');
+ return new XoopsApi($params, $this->response, $this->module);
+ } else {
+ return $this;
+ }
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xmlrpcapi.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xmlrpcparser.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xmlrpcparser.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xmlrpcparser.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,969 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+require_once XOOPS_ROOT_PATH.'/class/xml/saxparser.php';
+require_once XOOPS_ROOT_PATH.'/class/xml/xmltaghandler.php';
+
+/**
+* Class RSS Parser
+*
+* This class offers methods to parse RSS Files
+*
+* @link http://www.xoops.org/ Latest release of this class
+* @package XOOPS
+* @copyright Copyright (c) 2001 xoops.org. All rights reserved.
+* @author Kazumi Ono <onokazu at xoops.org>
+* @version 1.6 ($Date$) $Revision$
+* @access public
+*/
+
+class XoopsXmlRpcParser extends SaxParser
+{
+
+ /**
+ *
+ *
+ *
+ *
+ * @access private
+ * @var array
+ */
+ var $_param;
+
+ /**
+ *
+ *
+ *
+ *
+ * @access private
+ * @var string
+ */
+ var $_methodName;
+
+ /**
+ *
+ *
+ *
+ *
+ * @access private
+ * @var array
+ */
+ var $_tempName;
+
+ /**
+ *
+ *
+ *
+ *
+ * @access private
+ * @var array
+ */
+ var $_tempValue;
+
+ /**
+ *
+ *
+ *
+ *
+ * @access private
+ * @var array
+ */
+ var $_tempMember;
+
+ /**
+ *
+ *
+ *
+ *
+ * @access private
+ * @var array
+ */
+ var $_tempStruct;
+
+ /**
+ *
+ *
+ *
+ *
+ * @access private
+ * @var array
+ */
+ var $_tempArray;
+
+ /**
+ *
+ *
+ *
+ *
+ * @access private
+ * @var array
+ */
+ var $_workingLevel = array();
+
+
+ /**
+ * Constructor of the class
+ *
+ *
+ *
+ *
+ * @access
+ * @author
+ * @see
+ */
+ function XoopsXmlRpcParser(&$input)
+ {
+ $this->SaxParser($input);
+ $this->addTagHandler(new RpcMethodNameHandler());
+ $this->addTagHandler(new RpcIntHandler());
+ $this->addTagHandler(new RpcDoubleHandler());
+ $this->addTagHandler(new RpcBooleanHandler());
+ $this->addTagHandler(new RpcStringHandler());
+ $this->addTagHandler(new RpcDateTimeHandler());
+ $this->addTagHandler(new RpcBase64Handler());
+ $this->addTagHandler(new RpcNameHandler());
+ $this->addTagHandler(new RpcValueHandler());
+ $this->addTagHandler(new RpcMemberHandler());
+ $this->addTagHandler(new RpcStructHandler());
+ $this->addTagHandler(new RpcArrayHandler());
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function setTempName($name)
+ {
+ $this->_tempName[$this->getWorkingLevel()] = $name;
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function getTempName()
+ {
+ return $this->_tempName[$this->getWorkingLevel()];
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function setTempValue($value)
+ {
+ if (is_array($value)) {
+ settype($this->_tempValue, 'array');
+ foreach ($value as $k => $v) {
+ $this->_tempValue[$k] = $v;
+ }
+ } elseif (is_string($value)) {
+ if (isset($this->_tempValue)) {
+ if (is_string($this->_tempValue)) {
+ $this->_tempValue .= $value;
+ }
+ } else {
+ $this->_tempValue = $value;
+ }
+ } else {
+ $this->_tempValue = $value;
+ }
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function getTempValue()
+ {
+ return $this->_tempValue;
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function resetTempValue()
+ {
+ unset($this->_tempValue);
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function setTempMember($name, $value)
+ {
+ $this->_tempMember[$this->getWorkingLevel()][$name] = $value;
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function getTempMember()
+ {
+ return $this->_tempMember[$this->getWorkingLevel()];
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function resetTempMember()
+ {
+ $this->_tempMember[$this->getCurrentLevel()] = array();
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function setWorkingLevel()
+ {
+ array_push($this->_workingLevel, $this->getCurrentLevel());
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function getWorkingLevel()
+ {
+ return $this->_workingLevel[count($this->_workingLevel) - 1];
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function releaseWorkingLevel()
+ {
+ array_pop($this->_workingLevel);
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function setTempStruct($member)
+ {
+ $key = key($member);
+ $this->_tempStruct[$this->getWorkingLevel()][$key] = $member[$key];
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function getTempStruct()
+ {
+ return $this->_tempStruct[$this->getWorkingLevel()];
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function resetTempStruct()
+ {
+ $this->_tempStruct[$this->getCurrentLevel()] = array();
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function setTempArray($value)
+ {
+ $this->_tempArray[$this->getWorkingLevel()][] = $value;
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function getTempArray()
+ {
+ return $this->_tempArray[$this->getWorkingLevel()];
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function resetTempArray()
+ {
+ $this->_tempArray[$this->getCurrentLevel()] = array();
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function setMethodName($methodName)
+ {
+ $this->_methodName = $methodName;
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function getMethodName()
+ {
+ return $this->_methodName;
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function setParam($value)
+ {
+ $this->_param[] = $value;
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function &getParam()
+ {
+ return $this->_param;
+ }
+}
+
+
+class RpcMethodNameHandler extends XmlTagHandler
+{
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function getName()
+ {
+ return 'methodName';
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function handleCharacterData(&$parser, &$data)
+ {
+ $parser->setMethodName($data);
+ }
+}
+
+class RpcIntHandler extends XmlTagHandler
+{
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function getName()
+ {
+ return array('int', 'i4');
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function handleCharacterData(&$parser, &$data)
+ {
+ $parser->setTempValue(intval($data));
+ }
+}
+
+class RpcDoubleHandler extends XmlTagHandler
+{
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function getName()
+ {
+ return 'double';
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function handleCharacterData(&$parser, &$data)
+ {
+ $data = (float)$data;
+ $parser->setTempValue($data);
+ }
+}
+
+class RpcBooleanHandler extends XmlTagHandler
+{
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function getName()
+ {
+ return 'boolean';
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function handleCharacterData(&$parser, &$data)
+ {
+ $data = (boolean)$data;
+ $parser->setTempValue($data);
+ }
+}
+
+class RpcStringHandler extends XmlTagHandler
+{
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function getName()
+ {
+ return 'string';
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function handleCharacterData(&$parser, &$data)
+ {
+ $parser->setTempValue(strval($data));
+ }
+}
+
+class RpcDateTimeHandler extends XmlTagHandler
+{
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function getName()
+ {
+ return 'dateTime.iso8601';
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function handleCharacterData(&$parser, &$data)
+ {
+ $matches = array();
+ if (!preg_match("/^([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})$/", $data, $matches)) {
+ $parser->setTempValue(time());
+ } else {
+ $parser->setTempValue(gmmktime($matches[4], $matches[5], $meatches[6], $matches[2], $matches[3], $matches[1]));
+ }
+ }
+}
+
+class RpcBase64Handler extends XmlTagHandler
+{
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function getName()
+ {
+ return 'base64';
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function handleCharacterData(&$parser, &$data)
+ {
+ $parser->setTempValue(base64_decode($data));
+ }
+}
+
+class RpcNameHandler extends XmlTagHandler
+{
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function getName()
+ {
+ return 'name';
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'member':
+ $parser->setTempName($data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+
+class RpcValueHandler extends XmlTagHandler
+{
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function getName()
+ {
+ return 'value';
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'member':
+ $parser->setTempValue($data);
+ break;
+ case 'data':
+ case 'array':
+ $parser->setTempValue($data);
+ break;
+ default:
+ break;
+ }
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function handleBeginElement(&$parser, &$attributes)
+ {
+ //$parser->resetTempValue();
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function handleEndElement(&$parser)
+ {
+ switch ($parser->getCurrentTag()) {
+ case 'member':
+ $parser->setTempMember($parser->getTempName(), $parser->getTempValue());
+ break;
+ case 'array':
+ case 'data':
+ $parser->setTempArray($parser->getTempValue());
+ break;
+ default:
+ $parser->setParam($parser->getTempValue());
+ break;
+ }
+ $parser->resetTempValue();
+ }
+}
+
+class RpcMemberHandler extends XmlTagHandler
+{
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function getName()
+ {
+ return 'member';
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function handleBeginElement(&$parser, &$attributes)
+ {
+ $parser->setWorkingLevel();
+ $parser->resetTempMember();
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function handleEndElement(&$parser)
+ {
+ $member =& $parser->getTempMember();
+ $parser->releaseWorkingLevel();
+ $parser->setTempStruct($member);
+ }
+}
+
+class RpcArrayHandler extends XmlTagHandler
+{
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function getName()
+ {
+ return 'array';
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function handleBeginElement(&$parser, &$attributes)
+ {
+ $parser->setWorkingLevel();
+ $parser->resetTempArray();
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function handleEndElement(&$parser)
+ {
+ $parser->setTempValue($parser->getTempArray());
+ $parser->releaseWorkingLevel();
+ }
+}
+
+class RpcStructHandler extends XmlTagHandler
+{
+
+ /**
+ *
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function getName()
+ {
+ return 'struct';
+ }
+
+ /**
+ *
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function handleBeginElement(&$parser, &$attributes)
+ {
+ $parser->setWorkingLevel();
+ $parser->resetTempStruct();
+ }
+
+ /**
+ *
+ *
+ * @access
+ * @author
+ * @param
+ * @return
+ * @see
+ */
+ function handleEndElement(&$parser)
+ {
+ $parser->setTempValue($parser->getTempStruct());
+ $parser->releaseWorkingLevel();
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xmlrpcparser.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xmlrpctag.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xmlrpctag.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xmlrpctag.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,326 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+class XoopsXmlRpcDocument
+{
+
+ var $_tags = array();
+
+ function XoopsXmlRpcDocument()
+ {
+
+ }
+
+ function add(&$tagobj)
+ {
+ $this->_tags[] =& $tagobj;
+ }
+
+ function render()
+ {
+ }
+
+}
+
+class XoopsXmlRpcResponse extends XoopsXmlRpcDocument
+{
+ function render()
+ {
+ $count = count($this->_tags);
+ $payload = '';
+ for ($i = 0; $i < $count; $i++) {
+ if (!$this->_tags[$i]->isFault()) {
+ $payload .= $this->_tags[$i]->render();
+ } else {
+ return '<?xml version="1.0"?><methodResponse>'.$this->_tags[$i]->render().'</methodResponse>';
+ }
+ }
+ return '<?xml version="1.0"?><methodResponse><params><param>'.$payload.'</param></params></methodResponse>';
+ }
+}
+
+class XoopsXmlRpcRequest extends XoopsXmlRpcDocument
+{
+
+ var $methodName;
+
+ function XoopsXmlRpcRequest($methodName)
+ {
+ $this->methodName = trim($methodName);
+ }
+
+ function render()
+ {
+ $count = count($this->_tags);
+ $payload = '';
+ for ($i = 0; $i < $count; $i++) {
+ $payload .= '<param>'.$this->_tags[$i]->render().'</param>';
+ }
+ return '<?xml version="1.0"?><methodCall><methodName>'.$this->methodName.'</methodName><params>'.$payload.'</params></methodCall>';
+ }
+}
+
+class XoopsXmlRpcTag
+{
+
+ var $_fault = false;
+
+ function XoopsXmlRpcTag()
+ {
+
+ }
+
+ function &encode(&$text)
+ {
+ $text = preg_replace(array("/\&([a-z\d\#]+)\;/i", "/\&/", "/\#\|\|([a-z\d\#]+)\|\|\#/i"), array("#||\\1||#", "&", "&\\1;"), str_replace(array("<", ">"), array("<", ">"), $text));
+ return $text;
+ }
+
+ function setFault($fault = true){
+ $this->_fault = (intval($fault) > 0) ? true : false;
+ }
+
+ function isFault()
+ {
+ return $this->_fault;
+ }
+
+ function render()
+ {
+ }
+}
+
+class XoopsXmlRpcFault extends XoopsXmlRpcTag
+{
+
+ var $_code;
+ var $_extra;
+
+ function XoopsXmlRpcFault($code, $extra = null)
+ {
+ $this->setFault(true);
+ $this->_code = intval($code);
+ $this->_extra = isset($extra) ? trim($extra) : '';
+ }
+
+ function render()
+ {
+ switch ($this->_code) {
+ case 101:
+ $string = 'Invalid server URI';
+ break;
+ case 102:
+ $string = 'Parser parse error';
+ break;
+ case 103:
+ $string = 'Module not found';
+ break;
+ case 104:
+ $string = 'User authentication failed';
+ break;
+ case 105:
+ $string = 'Module API not found';
+ break;
+ case 106:
+ $string = 'Method response error';
+ break;
+ case 107:
+ $string = 'Method not supported';
+ break;
+ case 108:
+ $string = 'Invalid parameter';
+ break;
+ case 109:
+ $string = 'Missing parameters';
+ break;
+ case 110:
+ $string = 'Selected blog application does not exist';
+ break;
+ case 111:
+ $string = 'Method permission denied';
+ break;
+ default:
+ $string = 'Method response error';
+ break;
+ }
+ $string .= "\n".$this->_extra;
+ return '<fault><value><struct><member><name>faultCode</name><value>'.$this->_code.'</value></member><member><name>faultString</name><value>'.$this->encode($string).'</value></member></struct></value></fault>';
+ }
+}
+
+class XoopsXmlRpcInt extends XoopsXmlRpcTag
+{
+
+ var $_value;
+
+ function XoopsXmlRpcInt($value)
+ {
+ $this->_value = intval($value);
+ }
+
+ function render()
+ {
+ return '<value><int>'.$this->_value.'</int></value>';
+ }
+}
+
+class XoopsXmlRpcDouble extends XoopsXmlRpcTag
+{
+
+ var $_value;
+
+ function XoopsXmlRpcDouble($value)
+ {
+ $this->_value = (float)$value;
+ }
+
+ function render()
+ {
+ return '<value><double>'.$this->_value.'</double></value>';
+ }
+}
+
+class XoopsXmlRpcBoolean extends XoopsXmlRpcTag
+{
+
+ var $_value;
+
+ function XoopsXmlRpcBoolean($value)
+ {
+ $this->_value = (!empty($value) && $value != false) ? 1 : 0;
+ }
+
+ function render()
+ {
+ return '<value><boolean>'.$this->_value.'</boolean></value>';
+ }
+}
+
+class XoopsXmlRpcString extends XoopsXmlRpcTag
+{
+
+ var $_value;
+
+ function XoopsXmlRpcString($value)
+ {
+ $this->_value = strval($value);
+ }
+
+ function render()
+ {
+ return '<value><string>'.$this->encode($this->_value).'</string></value>';
+ }
+}
+
+class XoopsXmlRpcDatetime extends XoopsXmlRpcTag
+{
+
+ var $_value;
+
+ function XoopsXmlRpcDatetime($value)
+ {
+ if (!is_numeric($value)) {
+ $this->_value = strtotime($value);
+ } else {
+ $this->_value = intval($value);
+ }
+ }
+
+ function render()
+ {
+ return '<value><dateTime.iso8601>'.gmstrftime("%Y%m%dT%H:%M:%S", $this->_value).'</dateTime.iso8601></value>';
+ }
+}
+
+class XoopsXmlRpcBase64 extends XoopsXmlRpcTag
+{
+
+ var $_value;
+
+ function XoopsXmlRpcBase64($value)
+ {
+ $this->_value = base64_encode($value);
+ }
+
+ function render()
+ {
+ return '<value><base64>'.$this->_value.'</base64></value>';
+ }
+}
+
+class XoopsXmlRpcArray extends XoopsXmlRpcTag
+{
+
+ var $_tags = array();
+
+ function XoopsXmlRpcArray()
+ {
+ }
+
+ function add(&$tagobj)
+ {
+ $this->_tags[] =& $tagobj;
+ }
+
+ function render()
+ {
+ $count = count($this->_tags);
+ $ret = '<value><array><data>';
+ for ($i = 0; $i < $count; $i++) {
+ $ret .= $this->_tags[$i]->render();
+ }
+ $ret .= '</data></array></value>';
+ return $ret;
+ }
+}
+
+class XoopsXmlRpcStruct extends XoopsXmlRpcTag{
+
+ var $_tags = array();
+
+ function XoopsXmlRpcStruct(){
+ }
+
+ function add($name, &$tagobj){
+ $this->_tags[] = array('name' => $name, 'value' => $tagobj);
+ }
+
+ function render(){
+ $count = count($this->_tags);
+ $ret = '<value><struct>';
+ for ($i = 0; $i < $count; $i++) {
+ $ret .= '<member><name>'.$this->encode($this->_tags[$i]['name']).'</name>'.$this->_tags[$i]['value']->render().'</member>';
+ }
+ $ret .= '</struct></value>';
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xmlrpctag.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xoopsapi.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xoopsapi.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xoopsapi.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,349 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+require_once XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpcapi.php';
+
+class XoopsApi extends XoopsXmlRpcApi
+{
+
+ function XoopsApi(&$params, &$response, &$module)
+ {
+ $this->XoopsXmlRpcApi($params, $response, $module);
+ }
+
+ function newPost()
+ {
+ if (!$this->_checkUser($this->params[1], $this->params[2])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ if (!$fields =& $this->_getPostFields(null, $this->params[0])) {
+ $this->response->add(new XoopsXmlRpcFault(106));
+ } else {
+ $missing = array();
+ foreach ($fields as $tag => $detail) {
+ if (!isset($this->params[3][$tag])) {
+ $data = $this->_getTagCdata($this->params[3]['xoops_text'], $tag, true);
+ if (trim($data) == ''){
+ if ($detail['required']) {
+ $missing[] = $tag;
+ }
+ } else {
+ $post[$tag] =& $data;
+ }
+ } else {
+ $post[$tag] =& $this->params[3][$tag];
+ }
+ }
+ if (count($missing) > 0) {
+ $msg = '';
+ foreach ($missing as $m) {
+ $msg .= '<'.$m.'> ';
+ }
+ $this->response->add(new XoopsXmlRpcFault(109, $msg));
+ } else {
+ // will be removed... don't worry if this looks bad
+ include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php';
+ $story = new NewsStory();
+ $error = false;
+ if (intval($this->params[4]) > 0) {
+ if (!$this->_checkAdmin()) {
+ // non admin users cannot publish
+ $error = true;
+ $this->response->add(new XoopsXmlRpcFault(111));
+ } else {
+ $story->setType('admin');
+ $story->setApproved(true);
+ $story->setPublished(time());
+ }
+ } else {
+ if (!$this->_checkAdmin()) {
+ $story->setType('user');
+ } else {
+ $story->setType('admin');
+ }
+ }
+ if (!$error) {
+ if (isset($post['categories']) && !empty($post['categories'][0])) {
+ $story->setTopicId(intval($post['categories'][0]['categoryId']));
+ } else {
+ $story->setTopicId(1);
+ }
+ $story->setTitle(addslashes(trim($post['title'])));
+ if (isset($post['moretext'])) {
+ $story->setBodytext(addslashes(trim($post['moretext'])));
+ }
+ if (!isset($post['hometext'])) {
+ $story->setHometext(addslashes(trim($this->params[3]['xoops_text'])));
+ } else {
+ $story->setHometext(addslashes(trim($post['hometext'])));
+ }
+ $story->setUid($this->user->getVar('uid'));
+ $story->setHostname($_SERVER['REMOTE_ADDR']);
+ if (!$this->_checkAdmin()) {
+ $story->setNohtml(1);
+ } else {
+ $story->setNohtml(0);
+ }
+ $story->setNosmiley(0);
+ $story->setNotifyPub(1);
+ $story->setTopicalign('R');
+ $ret = $story->store();
+ if (!$ret) {
+ $this->response->add(new XoopsXmlRpcFault(106));
+ } else {
+ $this->response->add(new XoopsXmlRpcString($ret));
+ }
+ }
+ }
+ }
+ }
+ }
+
+ function editPost()
+ {
+ if (!$this->_checkUser($this->params[1], $this->params[2])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ if (!$fields =& $this->_getPostFields($this->params[0])) {
+ } else {
+ $missing = array();
+ foreach ($fields as $tag => $detail) {
+ if (!isset($this->params[3][$tag])) {
+ $data = $this->_getTagCdata($this->params[3]['xoops_text'], $tag, true);
+ if (trim($data) == ''){
+ if ($detail['required']) {
+ $missing[] = $tag;
+ }
+ } else {
+ $post[$tag] = $data;
+ }
+ } else {
+ $post[$tag] = $this->params[3][$tag];
+ }
+ }
+ if (count($missing) > 0) {
+ $msg = '';
+ foreach ($missing as $m) {
+ $msg .= '<'.$m.'> ';
+ }
+ $this->response->add(new XoopsXmlRpcFault(109, $msg));
+ } else {
+ // will be removed... don't worry if this looks bad
+ include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php';
+ $story = new NewsStory($this->params[0]);
+ $storyid = $story->storyid();
+ if (empty($storyid)) {
+ $this->response->add(new XoopsXmlRpcFault(106));
+ } elseif (!$this->_checkAdmin()) {
+ $this->response->add(new XoopsXmlRpcFault(111));
+ } else {
+ $story->setTitle(addslashes(trim($post['title'])));
+ if (isset($post['moretext'])) {
+ $story->setBodytext(addslashes(trim($post['moretext'])));
+ }
+ if (!isset($post['hometext'])) {
+ $story->setHometext(addslashes(trim($this->params[3]['xoops_text'])));
+ } else {
+ $story->setHometext(addslashes(trim($post['hometext'])));
+ }
+ if ($this->params[4]) {
+ $story->setApproved(true);
+ $story->setPublished(time());
+ }
+ $story->setTopicalign('R');
+ if (!$story->store()) {
+ $this->response->add(new XoopsXmlRpcFault(106));
+ } else {
+ $this->response->add(new XoopsXmlRpcBoolean(true));
+ }
+ }
+ }
+ }
+ }
+ }
+
+ function deletePost()
+ {
+ if (!$this->_checkUser($this->params[1], $this->params[2])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ if (!$this->_checkAdmin()) {
+ $this->response->add(new XoopsXmlRpcFault(111));
+ } else {
+ // will be removed... don't worry if this looks bad
+ include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php';
+ $story = new NewsStory($this->params[0]);
+ if (!$story->delete()) {
+ $this->response->add(new XoopsXmlRpcFault(106));
+ } else {
+ $this->response->add(new XoopsXmlRpcBoolean(true));
+ }
+ }
+ }
+ }
+
+ // currently returns the same struct as in metaWeblogApi
+ function &getPost($respond=true)
+ {
+ if (!$this->_checkUser($this->params[1], $this->params[2])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ // will be removed... don't worry if this looks bad
+ include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php';
+ $story = new NewsStory($this->params[0]);
+ $ret = array('uid' => $story->uid(), 'published' => $story->published(), 'storyid' => $story->storyId(), 'title' => $story->title('Edit'), 'hometext' => $story->hometext('Edit'), 'moretext' => $story->bodytext('Edit'));
+ if (!$respond) {
+ return $ret;
+ } else {
+ if (!$ret) {
+ $this->response->add(new XoopsXmlRpcFault(106));
+ } else {
+ $struct = new XoopsXmlRpcStruct();
+ $content = '';
+ foreach ($ret as $key => $value) {
+ switch($key) {
+ case 'uid':
+ $struct->add('userid', new XoopsXmlRpcString($value));
+ break;
+ case 'published':
+ $struct->add('dateCreated', new XoopsXmlRpcDatetime($value));
+ break;
+ case 'storyid':
+ $struct->add('postid', new XoopsXmlRpcString($value));
+ $struct->add('link', new XoopsXmlRpcString(XOOPS_URL.'/modules/news/article.php?item_id='.$value));
+ $struct->add('permaLink', new XoopsXmlRpcString(XOOPS_URL.'/modules/news/article.php?item_id='.$value));
+ break;
+ case 'title':
+ $struct->add('title', new XoopsXmlRpcString($value));
+ break;
+ default :
+ $content .= '<'.$key.'>'.trim($value).'</'.$key.'>';
+ break;
+ }
+ }
+ $struct->add('description', new XoopsXmlRpcString($content));
+ $this->response->add($struct);
+ }
+ }
+ }
+ }
+
+ function &getRecentPosts($respond=true)
+ {
+ if (!$this->_checkUser($this->params[1], $this->params[2])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php';
+ if (isset($this->params[4]) && intval($this->params[4]) > 0) {
+ $stories =& NewsStory::getAllPublished(intval($this->params[3]), 0, $this->params[4]);
+ } else {
+ $stories =& NewsStory::getAllPublished(intval($this->params[3]));
+ }
+ $scount = count($stories);
+ $ret = array();
+ for ($i = 0; $i < $scount; $i++) {
+ $ret[] = array('uid' => $stories[$i]->uid(), 'published' => $stories[$i]->published(), 'storyid' => $stories[$i]->storyId(), 'title' => $stories[$i]->title('Edit'), 'hometext' => $stories[$i]->hometext('Edit'), 'moretext' => $stories[$i]->bodytext('Edit'));
+ }
+ if (!$respond) {
+ return $ret;
+ } else {
+ if (count($ret) == 0) {
+ $this->response->add(new XoopsXmlRpcFault(106, 'Found 0 Entries'));
+ } else {
+ $arr = new XoopsXmlRpcArray();
+ $count = count($ret);
+ for ($i = 0; $i < $count; $i++) {
+ $struct = new XoopsXmlRpcStruct();
+ $content = '';
+ foreach($ret[$i] as $key => $value) {
+ switch($key) {
+ case 'uid':
+ $struct->add('userid', new XoopsXmlRpcString($value));
+ break;
+ case 'published':
+ $struct->add('dateCreated', new XoopsXmlRpcDatetime($value));
+ break;
+ case 'storyid':
+ $struct->add('postid', new XoopsXmlRpcString($value));
+ $struct->add('link', new XoopsXmlRpcString(XOOPS_URL.'/modules/news/article.php?item_id='.$value));
+ $struct->add('permaLink', new XoopsXmlRpcString(XOOPS_URL.'/modules/news/article.php?item_id='.$value));
+ break;
+ case 'title':
+ $struct->add('title', new XoopsXmlRpcString($value));
+ break;
+ default :
+ $content .= '<'.$key.'>'.trim($value).'</'.$key.'>';
+ break;
+ }
+ }
+ $struct->add('description', new XoopsXmlRpcString($content));
+ $arr->add($struct);
+ unset($struct);
+ }
+ $this->response->add($arr);
+ }
+ }
+ }
+ }
+
+ function &getCategories($respond=true)
+ {
+ if (!$this->_checkUser($this->params[1], $this->params[2])) {
+ $this->response->add(new XoopsXmlRpcFault(104));
+ } else {
+ include_once XOOPS_ROOT_PATH.'/class/xoopstopic.php';
+ $db =& Database::getInstance();
+ $xt = new XoopsTopic($db->prefix('topics'));
+ $ret = $xt->getTopicsList();
+ if (!$respond) {
+ return $ret;
+ } else {
+ if (count($ret) == 0) {
+ $this->response->add(new XoopsXmlRpcFault(106, 'Found 0 Entries'));
+ } else {
+ $arr = new XoopsXmlRpcArray();
+ foreach ($ret as $topic_id => $topic_vars) {
+ $struct = new XoopsXmlRpcStruct();
+ $struct->add('categoryId', new XoopsXmlRpcString($topic_id));
+ $struct->add('categoryName', new XoopsXmlRpcString($topic_vars['title']));
+ $struct->add('categoryPid', new XoopsXmlRpcString($topic_vars['pid']));
+ $arr->add($struct);
+ unset($struct);
+ }
+ $this->response->add($arr);
+ }
+ }
+ }
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rpc/xoopsapi.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rss/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rss/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rss/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rss/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rss/xmlrss2parser.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rss/xmlrss2parser.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rss/xmlrss2parser.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,899 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+require_once(XOOPS_ROOT_PATH.'/class/xml/saxparser.php');
+require_once(XOOPS_ROOT_PATH.'/class/xml/xmltaghandler.php');
+
+class XoopsXmlRss2Parser extends SaxParser
+{
+ var $_tempArr = array();
+ var $_channelData = array();
+ var $_imageData = array();
+ var $_items = array();
+
+ function XoopsXmlRss2Parser(&$input)
+ {
+ $this->SaxParser($input);
+ $this->useUtfEncoding();
+ $this->addTagHandler(new XhldRssChannelHandler());
+ $this->addTagHandler(new XhldRssTitleHandler());
+ $this->addTagHandler(new XhldRssLinkHandler());
+ $this->addTagHandler(new XhldRssGeneratorHandler());
+ $this->addTagHandler(new XhldRssDescriptionHandler());
+ $this->addTagHandler(new XhldRssContentEncodedHandler());
+ $this->addTagHandler(new XhldRssCopyrightHandler());
+ $this->addTagHandler(new XhldRssNameHandler());
+ $this->addTagHandler(new XhldRssManagingEditorHandler());
+ $this->addTagHandler(new XhldRssLanguageHandler());
+ $this->addTagHandler(new XhldRssDcLanguageHandler());
+ $this->addTagHandler(new XhldRssLastBuildDateHandler());
+ $this->addTagHandler(new XhldRssWebMasterHandler());
+ $this->addTagHandler(new XhldRssDcCreatorHandler());
+ $this->addTagHandler(new XhldRssImageHandler());
+ $this->addTagHandler(new XhldRssUrlHandler());
+ $this->addTagHandler(new XhldRssWidthHandler());
+ $this->addTagHandler(new XhldRssHeightHandler());
+ $this->addTagHandler(new XhldRssItemHandler());
+ $this->addTagHandler(new XhldRssCategoryHandler());
+ $this->addTagHandler(new XhldRssPubDateHandler());
+ $this->addTagHandler(new XhldRssDcDateHandler());
+ $this->addTagHandler(new XhldRssCommentsHandler());
+ $this->addTagHandler(new XhldRssSourceHandler());
+ $this->addTagHandler(new XhldRssAuthorHandler());
+ $this->addTagHandler(new XhldRssGuidHandler());
+ $this->addTagHandler(new XhldRssTextInputHandler());
+ }
+
+ function setChannelData($name, &$value)
+ {
+ if (!isset($this->_channelData[$name])) {
+ $this->_channelData[$name] =& $value;
+ } else {
+ $this->_channelData[$name] .= $value;
+ }
+ }
+
+ function &getChannelData($name = null)
+ {
+ if (isset($name)) {
+ if (isset($this->_channelData[$name])) {
+ return $this->_channelData[$name];
+ }
+ return false;
+ }
+ return $this->_channelData;
+ }
+
+ function setImageData($name, &$value)
+ {
+ $this->_imageData[$name] =& $value;
+ }
+
+ function &getImageData($name = null)
+ {
+ if (isset($name)) {
+ if (isset($this->_imageData[$name])) {
+ return $this->_imageData[$name];
+ }
+ return false;
+ }
+ return $this->_imageData;
+ }
+
+ function setItems(&$itemarr)
+ {
+ $this->_items[] =& $itemarr;
+ }
+
+ function &getItems()
+ {
+ return $this->_items;
+ }
+
+ function setTempArr($name, &$value, $delim = '')
+ {
+ if (!isset($this->_tempArr[$name])) {
+ $this->_tempArr[$name] =& $value;
+ } else if( $name == 'pubdate' ) {
+ $this->_tempArr[$name] = $value;
+ } else {
+ $this->_tempArr[$name] .= $delim.$value;
+ }
+ }
+
+ function getTempArr()
+ {
+ return $this->_tempArr;
+ }
+
+ function resetTempArr()
+ {
+ unset($this->_tempArr);
+ $this->_tempArr = array();
+ }
+}
+
+class XhldRssChannelHandler extends XmlTagHandler
+{
+
+ function XhldRssChannelHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'channel';
+ }
+}
+
+class XhldRssTitleHandler extends XmlTagHandler
+{
+
+ function XhldRssTitleHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'title';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'channel':
+ $parser->setChannelData('title', $data);
+ break;
+ case 'image':
+ $parser->setImageData('title', $data);
+ break;
+ case 'item':
+ case 'textInput':
+ $parser->setTempArr('title', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class XhldRssLinkHandler extends XmlTagHandler
+{
+
+ function XhldRssLinkHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'link';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'channel':
+ $parser->setChannelData('link', $data);
+ break;
+ case 'image':
+ $parser->setImageData('link', $data);
+ break;
+ case 'item':
+ case 'textInput':
+ $parser->setTempArr('link', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class XhldRssDescriptionHandler extends XmlTagHandler
+{
+
+ function XhldRssDescriptionHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'description';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'channel':
+ $parser->setChannelData('description', $data);
+ break;
+ case 'image':
+ $parser->setImageData('description', $data);
+ break;
+ case 'item':
+ case 'textInput':
+ $parser->setTempArr('description', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class XhldRssContentEncodedHandler extends XmlTagHandler
+{
+
+ function XhldRssContentEncodedHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'content:encoded';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'channel':
+ $parser->setChannelData('content', $data);
+ break;
+ case 'image':
+ $parser->setImageData('content', $data);
+ break;
+ case 'item':
+ case 'textInput':
+ $parser->setTempArr('content', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class XhldRssGeneratorHandler extends XmlTagHandler
+{
+
+ function XhldRssGeneratorHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'generator';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'channel':
+ $parser->setChannelData('generator', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class XhldRssCopyrightHandler extends XmlTagHandler
+{
+
+ function XhldRssCopyrightHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'copyright';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'channel':
+ $parser->setChannelData('copyright', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class XhldRssNameHandler extends XmlTagHandler
+{
+
+ function XhldRssNameHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'name';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'textInput':
+ $parser->setTempArr('name', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class XhldRssManagingEditorHandler extends XmlTagHandler
+{
+
+ function XhldRssManagingEditorHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'managingEditor';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'channel':
+ $parser->setChannelData('editor', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class XhldRssLanguageHandler extends XmlTagHandler
+{
+
+ function XhldRssLanguageHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'language';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'channel':
+ $parser->setChannelData('language', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class XhldRssDcLanguageHandler extends XmlTagHandler
+{
+
+ function XhldRssDcLanguageHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'dc:language';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'channel':
+ $parser->setChannelData('language', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class XhldRssWebMasterHandler extends XmlTagHandler
+{
+
+ function XhldRssWebMasterHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'webMaster';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'channel':
+ $parser->setChannelData('webmaster', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class XhldRssDocsHandler extends XmlTagHandler
+{
+
+ function XhldRssDocsHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'docs';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'channel':
+ $parser->setChannelData('docs', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class XhldRssTtlHandler extends XmlTagHandler
+{
+
+ function XhldRssTtlHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'ttl';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'channel':
+ $parser->setChannelData('ttl', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class XhldRssTextInputHandler extends XmlTagHandler
+{
+
+ function XhldRssWebMasterHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'textInput';
+ }
+
+ function handleBeginElement(&$parser, &$attributes)
+ {
+ $parser->resetTempArr();
+ }
+
+ function handleEndElement(&$parser)
+ {
+ $parser->setChannelData('textinput', $parser->getTempArr());
+ }
+}
+
+class XhldRssLastBuildDateHandler extends XmlTagHandler
+{
+
+ function XhldRssLastBuildDateHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'lastBuildDate';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'channel':
+ $parser->setChannelData('lastbuilddate', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class XhldRssImageHandler extends XmlTagHandler
+{
+
+ function XhldRssImageHandler()
+ {
+ }
+
+ function getName()
+ {
+ return 'image';
+ }
+}
+
+class XhldRssUrlHandler extends XmlTagHandler
+{
+
+ function XhldRssUrlHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'url';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ if ($parser->getParentTag() == 'image') {
+ $parser->setImageData('url', $data);
+ }
+ }
+}
+
+class XhldRssWidthHandler extends XmlTagHandler
+{
+
+ function XhldRssWidthHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'width';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ if ($parser->getParentTag() == 'image') {
+ $parser->setImageData('width', $data);
+ }
+ }
+}
+
+class XhldRssHeightHandler extends XmlTagHandler
+{
+
+ function XhldRssHeightHandler()
+ {
+ }
+
+ function getName()
+ {
+ return 'height';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ if ($parser->getParentTag() == 'image') {
+ $parser->setImageData('height', $data);
+ }
+ }
+}
+
+class XhldRssItemHandler extends XmlTagHandler
+{
+
+ function XhldRssItemHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'item';
+ }
+
+ function handleBeginElement(&$parser, &$attributes)
+ {
+ $parser->resetTempArr();
+ }
+
+ function handleEndElement(&$parser)
+ {
+ $items =& $parser->getTempArr();
+ $parser->setItems( $items );
+ }
+}
+
+class XhldRssCategoryHandler extends XmlTagHandler
+{
+
+ function XhldRssCategoryHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'category';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'channel':
+ $parser->setChannelData('category', $data);
+ break;
+ case 'item':
+ $parser->setTempArr('category', $data, ', ');
+ default:
+ break;
+ }
+ }
+}
+
+class XhldRssCommentsHandler extends XmlTagHandler
+{
+
+ function XhldRssCommentsHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'comments';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ if ($parser->getParentTag() == 'item') {
+ $parser->setTempArr('comments', $data);
+ }
+ }
+}
+
+class XhldRssPubDateHandler extends XmlTagHandler
+{
+
+ function XhldRssPubDateHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'pubDate';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ $time = -1 ;
+ while( $time == -1 && $data != "" ) {
+ $time = strtotime( $data ) ;
+ $data = substr( $data , 0 , intval( strrpos( $data , ' ' ) ) ) ;
+ }
+ if( $time == -1 ) $time = time() ;
+ switch ($parser->getParentTag()) {
+ case 'channel':
+ $parser->setChannelData('pubdate', $time);
+ break;
+ case 'item':
+ $parser->setTempArr('pubdate', $time);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class XhldRssDcDateHandler extends XmlTagHandler
+{
+
+ function XhldRssDcDateHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'dc:date';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ $time = $this->dateW3cToUnix( $data ) ;
+ if( $time <= 0 ) $time = time() ;
+
+ switch ($parser->getParentTag()) {
+ case 'channel':
+ $parser->setChannelData('lastbuilddate', formatTimestamp( $time ) );
+ break;
+ case 'item':
+ $parser->setTempArr('pubdate', $time);
+ break;
+ default:
+ break;
+ }
+ }
+
+ function dateW3cToUnix( $w3cDT )
+ {
+ $w3cDT = strtoupper( $w3cDT ) ;
+
+ // for wrong format like dd-mm-yyyy hh:mm:ss
+ if( preg_match( '/^(\d{1,2})[-\/\.](\d{1,2})[-\/\.](\d{4})(.*)$/' , $w3cDT , $regs ) ) {
+ $w3cDT = "{$regs[3]}-{$regs[2]}-{$regs[1]}{$regs[4]}" ;
+ }
+
+ // get the timezone
+ $tzoffset = date( 'Z' ) ;
+ if( $pos = strrpos( $w3cDT , 'Z' ) ) {
+ // GMT
+ $localdatetime = substr( $w3cDT , 0 , $pos ) ;
+ } else if( ( $pos = strrpos( $w3cDT , '+' ) ) > 0 ) {
+ $hourmin = explode( ':' , substr( $w3cDT , $pos + 1 ) ) ;
+ if( ! empty( $hourmin[0] ) ) $tzoffset -= $hourmin[0] * 3600 ;
+ if( ! empty( $hourmin[1] ) ) $tzoffset -= $hourmin[1] * 60 ;
+ $localdatetime = substr( $w3cDT , 0 , $pos ) ;
+ } else if( ( $pos = strrpos( $w3cDT , '-' ) ) > 7 ) {
+ $hourmin = explode( ':' , substr( $w3cDT , $pos + 1 ) ) ;
+ if( ! empty( $hourmin[0] ) ) $tzoffset += $hourmin[0] * 3600 ;
+ if( ! empty( $hourmin[1] ) ) $tzoffset += $hourmin[1] * 60 ;
+ $localdatetime = substr( $w3cDT , 0 , $pos ) ;
+ } else {
+ // no timezone
+ $localdatetime = $w3cDT ;
+ }
+
+ $localunixtime = strtotime( str_replace( 'T' , ' ' , $localdatetime ) ) ;
+ if( $localunixtime == -1 ) return time() ;
+ else return $localunixtime + $tzoffset ;
+ }
+}
+
+class XhldRssGuidHandler extends XmlTagHandler
+{
+
+ function XhldRssGuidHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'guid';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ if ($parser->getParentTag() == 'item') {
+ $parser->setTempArr('guid', $data);
+ }
+ }
+}
+
+class XhldRssAuthorHandler extends XmlTagHandler
+{
+
+ function XhldRssAuthorHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'author';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ if ($parser->getParentTag() == 'item') {
+ $parser->setTempArr('author', $data);
+ }
+ }
+}
+
+class XhldRssDcCreatorHandler extends XmlTagHandler
+{
+
+ function XhldRssDcCreatorHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'dc:creator';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ if ($parser->getParentTag() == 'channel') {
+ $parser->setChannelData('webmaster', $data);
+ }
+ }
+}
+
+class XhldRssSourceHandler extends XmlTagHandler
+{
+
+ function XhldRssSourceHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'source';
+ }
+
+ function handleBeginElement(&$parser, &$attributes)
+ {
+ if ($parser->getParentTag() == 'item') {
+ $parser->setTempArr('source_url', $attributes['url']);
+ }
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ if ($parser->getParentTag() == 'item') {
+ $parser->setTempArr('source', $data);
+ }
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/rss/xmlrss2parser.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/saxparser.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xml/saxparser.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xml/saxparser.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,369 @@
+<?php
+// $Id$
+/*******************************************************************************
+ Location: <b>xml/SaxParser.class</b><br>
+ <br>
+ Provides basic functionality to read and parse XML documents. Subclasses
+ must implement all the their custom handlers by using add* function methods.
+ They may also use the handle*() methods to parse a specific XML begin and end
+ tags, but this is not recommended as it is more difficult.<br>
+ <br>
+ Copyright © 2001 eXtremePHP. All rights reserved.<br>
+ <br>
+ @author Ken Egervari<br>
+*******************************************************************************/
+
+class SaxParser
+{
+ var $level;
+ var $parser;
+
+ var $isCaseFolding;
+ var $targetEncoding;
+
+ /* Custom Handler Variables */
+ var $tagHandlers = array();
+
+ /* Tag stack */
+ var $tags = array();
+
+ /* Xml Source Input */
+ var $xmlInput;
+
+ var $errors = array();
+
+ /****************************************************************************
+ Creates a SaxParser object using a FileInput to represent the stream
+ of XML data to parse. Use the static methods createFileInput or
+ createStringInput to construct xml input source objects to supply
+ to the constructor, or the implementor can construct them individually.
+ ****************************************************************************/
+ function SaxParser(&$input)
+ {
+ $this->level = 0;
+ $this->parser = xml_parser_create('UTF-8');
+ xml_set_object($this->parser, $this);
+ $this->input =& $input;
+ $this->setCaseFolding(false);
+ $this->useUtfEncoding();
+ xml_set_element_handler($this->parser, 'handleBeginElement','handleEndElement');
+ xml_set_character_data_handler($this->parser, 'handleCharacterData');
+ xml_set_processing_instruction_handler($this->parser, 'handleProcessingInstruction');
+ xml_set_default_handler($this->parser, 'handleDefault');
+ xml_set_unparsed_entity_decl_handler($this->parser, 'handleUnparsedEntityDecl');
+ xml_set_notation_decl_handler($this->parser, 'handleNotationDecl');
+ xml_set_external_entity_ref_handler($this->parser, 'handleExternalEntityRef');
+ }
+
+ /*---------------------------------------------------------------------------
+ Property Methods
+ ---------------------------------------------------------------------------*/
+
+ function getCurrentLevel()
+ {
+ return $this->level;
+ }
+
+ /****************************************************************************
+ * @param $isCaseFolding
+ * @returns void
+ ****************************************************************************/
+ function setCaseFolding($isCaseFolding)
+ {
+ assert(is_bool($isCaseFolding));
+
+ $this->isCaseFolding = $isCaseFolding;
+ xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, $this->isCaseFolding);
+ }
+
+ /****************************************************************************
+ * @returns void
+ ****************************************************************************/
+ function useIsoEncoding()
+ {
+ $this->targetEncoding = 'ISO-8859-1';
+ xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $this->targetEncoding);
+ }
+
+ /****************************************************************************
+ * @returns void
+ ****************************************************************************/
+ function useAsciiEncoding()
+ {
+ $this->targetEncoding = 'US-ASCII';
+ xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $this->targetEncoding);
+ }
+
+ /****************************************************************************
+ * @returns void
+ ****************************************************************************/
+ function useUtfEncoding()
+ {
+ $this->targetEncoding = 'UTF-8';
+ xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $this->targetEncoding);
+ }
+
+ /****************************************************************************
+ Returns the name of the xml tag being parsed
+ * @returns string
+ ****************************************************************************/
+ function getCurrentTag()
+ {
+ return $this->tags[count($this->tags) - 1];
+ }
+
+ function getParentTag()
+ {
+ if (isset($this->tags[count($this->tags) - 2])) {
+ return $this->tags[count($this->tags) - 2];
+ }
+ return false;
+ }
+
+
+
+ /*---------------------------------------------------------------------------
+ Parser methods
+ ---------------------------------------------------------------------------*/
+
+ /****************************************************************************
+ * @returns void
+ ****************************************************************************/
+ function parse()
+ {
+ if (!is_resource($this->input)) {
+ if (!xml_parse($this->parser, $this->input)) {
+ $this->setErrors($this->getXmlError());
+ return false;
+ }
+ //if (!$fp = fopen($this->input, 'r')) {
+ // $this->setErrors('Could not open file: '.$this->input);
+ // return false;
+ //}
+ } else {
+ while ($data = fread($this->input, 4096)) {
+ if (!xml_parse($this->parser, str_replace("'", "'", $data), feof($this->input))) {
+ $this->setErrors($this->getXmlError());
+ fclose($this->input);
+ return false;
+ }
+ }
+ fclose($this->input);
+ }
+ return true;
+ }
+
+ /****************************************************************************
+ * @returns void
+ ****************************************************************************/
+ function free()
+ {
+ xml_parser_free($this->parser);
+
+ unset($this);
+ // $this = null; // for PHP5 compatibility
+ }
+
+ /****************************************************************************
+ * @private
+ * @returns string
+ ****************************************************************************/
+ function getXmlError()
+ {
+ return sprintf("XmlParse error: %s at line %d", xml_error_string(xml_get_error_code($this->parser)), xml_get_current_line_number($this->parser));
+ }
+
+ /*---------------------------------------------------------------------------
+ Custom Handler Methods
+ ---------------------------------------------------------------------------*/
+
+ /****************************************************************************
+ Adds a callback function to be called when a tag is encountered.<br>
+ Functions that are added must be of the form:<br>
+ <b>functionName( $attributes )</b>
+ * @param $tagName string. The name of the tag currently being parsed.
+ * @param $functionName string. The name of the function in XmlDocument's
+ subclass.
+ * @returns void
+ ****************************************************************************/
+ function addTagHandler(&$tagHandler)
+ {
+ $name = $tagHandler->getName();
+ if (is_array($name)) {
+ foreach ($name as $n) {
+ $this->tagHandlers[$n] =& $tagHandler;
+ }
+ } else {
+ $this->tagHandlers[$name] =& $tagHandler;
+ }
+ }
+
+
+ /*---------------------------------------------------------------------------
+ Private Handler Methods
+ ---------------------------------------------------------------------------*/
+
+ /****************************************************************************
+ Callback function that executes whenever a the start of a tag
+ occurs when being parsed.
+ * @param $parser int. The handle to the parser.
+ * @param $tagName string. The name of the tag currently being parsed.
+ * @param $attributesArray attay. The list of attributes associated with
+ the tag.
+ * @private
+ * @returns void
+ ****************************************************************************/
+ function handleBeginElement($parser, $tagName, $attributesArray)
+ {
+ array_push($this->tags, $tagName);
+ $this->level++;
+ if (isset($this->tagHandlers[$tagName]) && is_subclass_of($this->tagHandlers[$tagName], 'xmltaghandler')) {
+ $this->tagHandlers[$tagName]->handleBeginElement($this, $attributesArray);
+ } else {
+ $this->handleBeginElementDefault($parser, $tagName, $attributesArray);
+ }
+ }
+
+ /****************************************************************************
+ Callback function that executes whenever the end of a tag
+ occurs when being parsed.
+ * @param $parser int. The handle to the parser.
+ * @param $tagName string. The name of the tag currently being parsed.
+ * @private
+ * @returns void
+ ****************************************************************************/
+ function handleEndElement($parser, $tagName)
+ {
+ array_pop($this->tags);
+ if (isset($this->tagHandlers[$tagName]) && is_subclass_of($this->tagHandlers[$tagName], 'xmltaghandler')) {
+ $this->tagHandlers[$tagName]->handleEndElement($this);
+ } else {
+ $this->handleEndElementDefault($parser, $tagName);
+ }
+ $this->level--;
+ }
+
+ /****************************************************************************
+ Callback function that executes whenever character data is encountered
+ while being parsed.
+ * @param $parser int. The handle to the parser.
+ * @param $data string. Character data inside the tag
+ * @returns void
+ ****************************************************************************/
+ function handleCharacterData($parser, $data)
+ {
+ $tagHandler =& $this->tagHandlers[$this->getCurrentTag()];
+ if (isset($tagHandler) && is_subclass_of($tagHandler, 'xmltaghandler')) {
+ $tagHandler->handleCharacterData($this, $data);
+ } else {
+ $this->handleCharacterDataDefault($parser, $data);
+ }
+ }
+
+ /****************************************************************************
+ * @param $parser int. The handle to the parser.
+ * @returns void
+ ****************************************************************************/
+ function handleProcessingInstruction($parser, &$target, &$data)
+ {
+ /* if($target == 'php') {
+ eval($data);
+ } */
+ }
+
+ /****************************************************************************
+ * @param $parser int. The handle to the parser.
+ * @returns void
+ ****************************************************************************/
+ function handleDefault($parser, $data)
+ {
+
+ }
+
+ /****************************************************************************
+ * @param $parser int. The handle to the parser.
+ * @returns void
+ ****************************************************************************/
+ function handleUnparsedEntityDecl($parser, $entityName, $base, $systemId, $publicId, $notationName)
+ {
+
+ }
+
+ /****************************************************************************
+ * @param $parser int. The handle to the parser.
+ * @returns void
+ ****************************************************************************/
+ function handleNotationDecl($parser, $notationName, $base, $systemId, $publicId)
+ {
+
+ }
+
+ /****************************************************************************
+ * @param $parser int. The handle to the parser.
+ * @returns void
+ ****************************************************************************/
+ function handleExternalEntityRef($parser, $openEntityNames, $base, $systemId, $publicId)
+ {
+
+ }
+
+ /**
+ * The default tag handler method for a tag with no handler
+ *
+ * @abstract
+ */
+ function handleBeginElementDefault($parser, $tagName, $attributesArray)
+ {
+ }
+
+ /**
+ * The default tag handler method for a tag with no handler
+ *
+ * @abstract
+ */
+ function handleEndElementDefault($parser, $tagName)
+ {
+ }
+
+ /**
+ * The default tag handler method for a tag with no handler
+ *
+ * @abstract
+ */
+ function handleCharacterDataDefault($parser, $data)
+ {
+ }
+
+ /**
+ * Sets error messages
+ *
+ * @param $error string an error message
+ */
+ function setErrors($error)
+ {
+ $this->errors[] = trim($error);
+ }
+
+ /**
+ * Gets all the error messages
+ *
+ * @param $ashtml bool return as html?
+ * @return mixed
+ */
+ function &getErrors($ashtml = true)
+ {
+ if (!$ashtml) {
+ return $this->errors;
+ } else {
+ $ret = '';
+ if (count($this->errors) > 0) {
+ foreach ($this->errors as $error) {
+ $ret .= $error.'<br />';
+ }
+ }
+ return $ret;
+ }
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/saxparser.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/themesetparser.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xml/themesetparser.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xml/themesetparser.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,415 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+include_once XOOPS_ROOT_PATH.'/class/xml/saxparser.php';
+include_once XOOPS_ROOT_PATH.'/class/xml/xmltaghandler.php';
+
+class XoopsThemeSetParser extends SaxParser
+{
+ var $tempArr = array();
+ var $themeSetData = array();
+ var $imagesData = array();
+ var $templatesData = array();
+
+ function XoopsThemeSetParser(&$input)
+ {
+ $this->SaxParser($input);
+ $this->addTagHandler(new ThemeSetThemeNameHandler());
+ $this->addTagHandler(new ThemeSetDateCreatedHandler());
+ $this->addTagHandler(new ThemeSetAuthorHandler());
+ $this->addTagHandler(new ThemeSetDescriptionHandler());
+ $this->addTagHandler(new ThemeSetGeneratorHandler());
+ $this->addTagHandler(new ThemeSetNameHandler());
+ $this->addTagHandler(new ThemeSetEmailHandler());
+ $this->addTagHandler(new ThemeSetLinkHandler());
+ $this->addTagHandler(new ThemeSetTemplateHandler());
+ $this->addTagHandler(new ThemeSetImageHandler());
+ $this->addTagHandler(new ThemeSetModuleHandler());
+ $this->addTagHandler(new ThemeSetFileTypeHandler());
+ $this->addTagHandler(new ThemeSetTagHandler());
+ }
+
+ function setThemeSetData($name, &$value)
+ {
+ $this->themeSetData[$name] =& $value;
+ }
+
+ function &getThemeSetData($name=null)
+ {
+ if (isset($name)) {
+ if (isset($this->themeSetData[$name])) {
+ return $this->themeSetData[$name];
+ }
+ return false;
+ }
+ return $this->themeSetData;
+ }
+
+ function setImagesData(&$imagearr)
+ {
+ $this->imagesData[] =& $imagearr;
+ }
+
+ function &getImagesData()
+ {
+ return $this->imagesData;
+ }
+
+ function setTemplatesData(&$tplarr)
+ {
+ $this->templatesData[] =& $tplarr;
+ }
+
+ function &getTemplatesData()
+ {
+ return $this->templatesData;
+ }
+
+ function setTempArr($name, &$value, $delim='')
+ {
+ if (!isset($this->tempArr[$name])) {
+ $this->tempArr[$name] =& $value;
+ } else {
+ $this->tempArr[$name] .= $delim.$value;
+ }
+ }
+
+ function getTempArr()
+ {
+ return $this->tempArr;
+ }
+
+ function resetTempArr()
+ {
+ unset($this->tempArr);
+ $this->tempArr = array();
+ }
+}
+
+
+class ThemeSetDateCreatedHandler extends XmlTagHandler
+{
+
+ function ThemeSetDateCreatedHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'dateCreated';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'themeset':
+ $parser->setThemeSetData('date', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class ThemeSetAuthorHandler extends XmlTagHandler
+{
+ function ThemeSetAuthorHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'author';
+ }
+
+ function handleBeginElement(&$parser, &$attributes)
+ {
+ $parser->resetTempArr();
+ }
+
+ function handleEndElement(&$parser)
+ {
+ $parser->setCreditsData($parser->getTempArr());
+ }
+}
+
+class ThemeSetDescriptionHandler extends XmlTagHandler
+{
+ function ThemeSetDescriptionHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'description';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'template':
+ $parser->setTempArr('description', $data);
+ break;
+ case 'image':
+ $parser->setTempArr('description', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class ThemeSetGeneratorHandler extends XmlTagHandler
+{
+ function ThemeSetGeneratorHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'generator';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'themeset':
+ $parser->setThemeSetData('generator', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class ThemeSetNameHandler extends XmlTagHandler
+{
+ function ThemeSetNameHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'name';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'themeset':
+ $parser->setThemeSetData('name', $data);
+ break;
+ case 'author':
+ $parser->setTempArr('name', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class ThemeSetEmailHandler extends XmlTagHandler
+{
+ function ThemeSetEmailHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'email';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'author':
+ $parser->setTempArr('email', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class ThemeSetLinkHandler extends XmlTagHandler
+{
+ function ThemeSetLinkHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'link';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'author':
+ $parser->setTempArr('link', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class ThemeSetTemplateHandler extends XmlTagHandler
+{
+ function ThemeSetTemplateHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'template';
+ }
+
+ function handleBeginElement(&$parser, &$attributes)
+ {
+ $parser->resetTempArr();
+ $parser->setTempArr('name', $attributes['name']);
+ }
+
+ function handleEndElement(&$parser)
+ {
+ $parser->setTemplatesData($parser->getTempArr());
+ }
+}
+
+class ThemeSetImageHandler extends XmlTagHandler
+{
+ function ThemeSetImageHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'image';
+ }
+
+ function handleBeginElement(&$parser, &$attributes)
+ {
+ $parser->resetTempArr();
+ $parser->setTempArr('name', $attributes[0]);
+ }
+
+ function handleEndElement(&$parser)
+ {
+ $parser->setImagesData($parser->getTempArr());
+ }
+}
+
+class ThemeSetModuleHandler extends XmlTagHandler
+{
+ function ThemeSetModuleHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'module';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'template':
+ case 'image':
+ $parser->setTempArr('module', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class ThemeSetFileTypeHandler extends XmlTagHandler
+{
+ function ThemeSetFileTypeHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'fileType';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'template':
+ $parser->setTempArr('type', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+class ThemeSetTagHandler extends XmlTagHandler
+{
+ function ThemeSetTagHandler()
+ {
+
+ }
+
+ function getName()
+ {
+ return 'tag';
+ }
+
+ function handleCharacterData(&$parser, &$data)
+ {
+ switch ($parser->getParentTag()) {
+ case 'image':
+ $parser->setTempArr('tag', $data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/themesetparser.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/xmlatomparser.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xml/xmlatomparser.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xml/xmlatomparser.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,517 @@
+<?php
+class XmlAtomParser
+{
+ var $parser;
+
+ var $isCaseFolding;
+ var $targetEncoding;
+
+ var $errors = array();
+
+ var $_feed = array();
+ var $_entries = array();
+ var $_entry_num = 0;
+ var $_parent = array();
+ var $_parent_num = 0;
+ var $_uris = array();
+
+
+ function XmlAtomParser( $input )
+ {
+ $this->parser = xml_parser_create('UTF-8');
+ xml_set_object($this->parser, $this);
+ $this->input =& $input;
+ $this->setCaseFolding( true ) ;
+ $this->useUtfEncoding();
+
+ $this->_parent[0] = '' ;
+
+ xml_set_element_handler($this->parser, "atom_start_element", "atom_end_element");
+ xml_set_character_data_handler($this->parser, "atom_character_data");
+ xml_set_start_namespace_decl_handler($this->parser, "atom_ns_start");
+ xml_set_end_namespace_decl_handler($this->parser, "atom_ns_end");
+ }
+
+ function &getChannelData()
+ {
+ // emulating from ATOM to RSS
+ $error_level_stored = error_reporting() ;
+ error_reporting( $error_level_stored & ~ E_NOTICE ) ;
+ $channel = array(
+ 'title' => $this->_feed['title'] ,
+ 'link' => $this->_feed['link'] ,
+ 'lastbuilddate' => formatTimestamp( $this->_feed['modified'] ) ,
+ 'id' => $this->_feed['id'] ,
+ 'id' => $this->_feed['id'] ,
+ 'webmaster' => $this->_feed['author_name'] ,
+ 'generator' => $this->_feed['generator']
+ ) ;
+ error_reporting( $error_level_stored ) ;
+ return $channel ;
+ }
+
+ function &getImageData()
+ {
+ return array() ;
+ }
+
+ function &getItems()
+ {
+ // emulating from ATOM to RSS
+ $error_level_stored = error_reporting() ;
+ error_reporting( $error_level_stored & ~ E_NOTICE ) ;
+ $items = array() ;
+ foreach( $this->_entries as $entry ) {
+ $items[] = array(
+ 'title' => $entry['title'] ,
+ 'link' => $entry['link'] ,
+ 'id' => $entry['id'] ,
+ 'pubdate' => ! empty( $entry['updated'] ) ? $entry['updated'] : $entry['modified'] ,
+ 'description' => $entry['content']
+ ) ;
+ }
+ error_reporting( $error_level_stored ) ;
+ return $items;
+ }
+
+ /****************************************************************************
+ * @param $isCaseFolding
+ * @returns void
+ ****************************************************************************/
+ function setCaseFolding($isCaseFolding)
+ {
+ assert(is_bool($isCaseFolding));
+
+ $this->isCaseFolding = $isCaseFolding;
+ xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, $this->isCaseFolding);
+ }
+
+ /****************************************************************************
+ * @returns void
+ ****************************************************************************/
+ function useIsoEncoding()
+ {
+ $this->targetEncoding = 'ISO-8859-1';
+ xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $this->targetEncoding);
+ }
+
+ /****************************************************************************
+ * @returns void
+ ****************************************************************************/
+ function useAsciiEncoding()
+ {
+ $this->targetEncoding = 'US-ASCII';
+ xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $this->targetEncoding);
+ }
+
+ /****************************************************************************
+ * @returns void
+ ****************************************************************************/
+ function useUtfEncoding()
+ {
+ $this->targetEncoding = 'UTF-8';
+ xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $this->targetEncoding);
+ }
+
+
+ /****************************************************************************
+ * @returns void
+ ****************************************************************************/
+ function parse()
+ {
+ if( ! xml_parse( $this->parser, $this->input ) ) {
+ $this->setErrors($this->getXmlError());
+ return false;
+ }
+ return true;
+ }
+
+ /****************************************************************************
+ * @returns void
+ ****************************************************************************/
+ function free()
+ {
+ xml_parser_free($this->parser);
+
+ unset($this);
+ }
+
+
+ /****************************************************************************
+ * @private
+ * @returns string
+ ****************************************************************************/
+ function getXmlError()
+ {
+ return sprintf("XmlParse error: %s at line %d", xml_error_string(xml_get_error_code($this->parser)), xml_get_current_line_number($this->parser));
+ }
+
+
+ /**
+ * Sets error messages
+ *
+ * @param $error string an error message
+ */
+ function setErrors($error)
+ {
+ $this->errors[] = trim($error);
+ }
+
+ /**
+ * Gets all the error messages
+ *
+ * @param $ashtml bool return as html?
+ * @return mixed
+ */
+ function &getErrors($ashtml = true)
+ {
+ if (!$ashtml) {
+ return $this->errors;
+ } else {
+ $ret = '';
+ if (count($this->errors) > 0) {
+ foreach ($this->errors as $error) {
+ $ret .= $error."<br />\n";
+ }
+ }
+ return $ret;
+ }
+ }
+
+
+
+ //---------------------------------------------------------
+ // start element handler
+ //---------------------------------------------------------
+ function atom_start_element($parser, $name, $attrs)
+ {
+ $parent = $this->_parent[$this->_parent_num];
+
+ $parent_num_prev = $this->_parent_num - 1;
+ if ($parent_num_prev < 0) $parent_num_prev = 0;
+ $parent_prev = $this->_parent[$parent_num_prev];
+
+ $name_ns = split(':',$name);
+ $name_wk = array_pop($name_ns);
+ $uri1 = implode($name_ns,":");
+
+ $name_low = strtolower( $name_wk );
+
+ $flag = 0;
+ foreach($this->_uris as $uri2)
+ {
+ if ($uri1 == $uri2)
+ {
+ $flag = 1;
+ break;
+ }
+ }
+
+ // FEED
+ if ( $name_wk == 'FEED' )
+ {
+ $this->_parent_num = 0;
+ $this->_parent[0] = $name_wk;
+ return;
+ }
+
+ // CONTENT
+ if (($parent_prev == 'ENTRY')&&($parent == 'CONTENT'))
+ {
+ $data = '';
+
+ if (($name_wk == 'P')||($name_wk == 'BR'))
+ {
+ $data .= "<br />\n";
+ }
+ else if ($name_wk == 'A')
+ {
+ $href = '';
+ $target = '';
+ if ( isset($attrs['HREF']) ) $href = $attrs['HREF'];
+ if ( isset($attrs['TARGET']) ) $target = "target=\"{$attrs['TARGET']}\" ";
+
+ $data .= "<a href=\"$href\" $target >";
+
+ }
+ else if ($name_wk == 'IMG')
+ {
+ $src = '';
+ $width = '';
+ $height = '';
+ $border = 0;
+ if ( isset($attrs['SRC']) ) $src = $attrs['SRC'];
+ if ( isset($attrs['BORDER']) ) $border = $attrs['BORDER'];
+ if ( isset($attrs['WIDTH']) ) $width = "width=\"{$attrs['WIDTH']}\" ";
+ if ( isset($attrs['HEIGHT']) ) $height = "hight=\"{$attrs['HEIGHT']}\" ";
+
+ $data .= "<img src=\"$src\" border=\"$border\" $width $height />";
+ }
+
+ $this->_entries[$this->_entry_num]['content'] .= $data;
+ return;
+ }
+
+ // LINK
+ if ( $name_wk == 'LINK' )
+ {
+ $rel = '';
+ $href = '';
+ if ( isset($attrs['REL']) ) $rel = $attrs['REL'];
+ if ( isset($attrs['HREF']) ) $href = $attrs['HREF'];
+
+ if ( strtolower($rel) != 'alternate' ) return;
+
+ if ( $parent == 'FEED' )
+ {
+ $this->_feed[$name_low] = $href;
+ }
+ else if ( $parent == 'ENTRY' )
+ {
+ $this->_entries[$this->_entry_num][$name_low] = $href;
+ }
+ }
+
+ // increment parent
+ if ( $flag || empty($uri1) )
+ {
+ $this->_parent_num ++;
+ $this->_parent[$this->_parent_num] = $name_wk;
+ }
+
+ }
+
+ //---------------------------------------------------------
+ // end element handler
+ //---------------------------------------------------------
+ function atom_end_element($parser, $name)
+ {
+ $parent = $this->_parent[$this->_parent_num];
+
+ $parent_num_prev = $this->_parent_num - 1;
+ if ($parent_num_prev < 0) $parent_num_prev = 0;
+ $parent_prev = $this->_parent[$parent_num_prev];
+
+ $name_ns = split(':',$name);
+ $name_wk = array_pop($name_ns);
+ $uri1 = implode($name_ns,":");
+
+ $flag = 0;
+ foreach($this->_uris as $uri2)
+ {
+ if ($uri1 == $uri2)
+ {
+ $flag = 1;
+ break;
+ }
+ }
+
+ // CONTENT
+ if (($parent_prev == 'ENTRY')&&($parent == 'CONTENT'))
+ {
+ if ($name_wk == 'A')
+ {
+ $this->_entries[$this->_entry_num]['content'] .= "</a>";
+ }
+
+ if ($name_wk != 'CONTENT')
+ {
+ return;
+ }
+ }
+
+ // decrement parent
+ if (( $flag || empty($uri1) )&&( $parent == $name_wk ))
+ {
+ $this->_parent_num --;
+ if ($this->_parent_num < 0) $this->_parent_num = 0;
+
+ if ($name_wk == 'ENTRY')
+ {
+ $this->_entry_num ++;
+ }
+ }
+
+ }
+
+ //---------------------------------------------------------
+ // character data handler
+ //---------------------------------------------------------
+ function atom_character_data($parser, $data)
+ {
+ $parent_0 = '';
+ $parent_1 = '';
+ $parent_2 = '';
+ if ( isset($this->_parent[0]) ) $parent_0 = $this->_parent[0];
+ if ( isset($this->_parent[1]) ) $parent_1 = $this->_parent[1];
+ if ( isset($this->_parent[2]) ) $parent_2 = $this->_parent[2];
+
+ $current = $this->_parent[$this->_parent_num];
+ $current_low = strtolower( $current );
+ $data = trim($data);
+
+ if ($parent_0 != 'FEED') return;
+
+ switch($parent_1)
+ {
+ // ENTRY
+ case 'ENTRY':
+ switch($parent_2)
+ {
+
+ // ENTRY AUTHOR
+ case 'AUTHOR':
+ switch($current)
+ {
+ case 'NAME':
+ case 'URL':
+ case 'EMAIL':
+ $key = 'author_'.$current_low;
+ if ( isset( $this->_entries[$this->_entry_num][$key] ) )
+ {
+ $this->_entries[$this->_entry_num][$key] .= $data;
+ }
+ else
+ {
+ $this->_entries[$this->_entry_num][$key] = $data;
+ }
+ break;
+ }
+ break;
+
+ // ENTRY others
+ default:
+ switch($current)
+ {
+ case 'TITLE':
+ case 'SUMMARY':
+ case 'SUBJECT':
+ case 'ID':
+ case 'CONTENT':
+ if ( isset( $this->_entries[$this->_entry_num][$current_low] ) )
+ {
+ $this->_entries[$this->_entry_num][$current_low] .= $data;
+ }
+ else
+ {
+ $this->_entries[$this->_entry_num][$current_low] = $data;
+ }
+ break;
+ case 'MODIFIED':
+ case 'ISSUED':
+ case 'CREATED':
+ case 'UPDATED':
+ $this->_entries[$this->_entry_num][$current_low] = $this->dateW3cToUnix( $data ) ;
+ break ;
+ }
+ break;
+ }
+ break;
+
+ // FEED AUTHOR
+ case 'AUTHOR':
+ switch($current)
+ {
+ case 'NAME':
+ case 'URL':
+ case 'EMAIL':
+ $key = 'author_'.$current_low;
+ if ( isset( $this->_feed[$key] ) )
+ {
+ $this->_feed[$key] .= $data;
+ }
+ else
+ {
+ $this->_feed[$key] = $data;
+ }
+ break;
+ }
+ break;
+
+ // FEED others
+ default:
+ switch($current)
+ {
+ case 'TITLE':
+ case 'ID':
+ case 'GENERATOR':
+ case 'COPYRIGHT':
+ case 'TAGLINE':
+ if ( isset( $this->_feed[$current_low] ) )
+ {
+ $this->_feed[$current_low] .= $data;
+ }
+ else
+ {
+ $this->_feed[$current_low] = $data;
+ }
+ break;
+ case 'MODIFIED':
+ case 'ISSUED':
+ case 'CREATED':
+ case 'UPDATED':
+ $this->_feed[$current_low] = $this->dateW3cToUnix( $data ) ;
+ break ;
+ }
+ break;
+ }
+
+ }
+
+ //---------------------------------------------------------
+ // start namespace handler
+ //---------------------------------------------------------
+ function atom_ns_start($parser, $prefix, $uri)
+ {
+ // echo "nss;$prefix;$uri <br>\n";
+
+ array_push($this->_uris, strtoupper($uri));
+ }
+
+ //---------------------------------------------------------
+ // end namespace handler
+ //---------------------------------------------------------
+ function atom_ns_end($parser, $prefix)
+ {
+ array_pop($this->_uris);
+ }
+
+
+ function dateW3cToUnix( $w3cDT )
+ {
+ $w3cDT = strtoupper( $w3cDT ) ;
+
+ // for wrong format like dd-mm-yyyy hh:mm:ss
+ if( preg_match( '/^(\d{1,2})[-\/\.](\d{1,2})[-\/\.](\d{4})(.*)$/' , $w3cDT , $regs ) ) {
+ $w3cDT = "{$regs[3]}-{$regs[2]}-{$regs[1]}{$regs[4]}" ;
+ }
+
+ // get the timezone
+ $tzoffset = date( 'Z' ) ;
+ if( $pos = strrpos( $w3cDT , 'Z' ) ) {
+ // GMT
+ $localdatetime = substr( $w3cDT , 0 , $pos ) ;
+ } else if( ( $pos = strrpos( $w3cDT , '+' ) ) > 0 ) {
+ $hourmin = explode( ':' , substr( $w3cDT , $pos + 1 ) ) ;
+ if( ! empty( $hourmin[0] ) ) $tzoffset -= $hourmin[0] * 3600 ;
+ if( ! empty( $hourmin[1] ) ) $tzoffset -= $hourmin[1] * 60 ;
+ $localdatetime = substr( $w3cDT , 0 , $pos ) ;
+ } else if( ( $pos = strrpos( $w3cDT , '-' ) ) > 7 ) {
+ $hourmin = explode( ':' , substr( $w3cDT , $pos + 1 ) ) ;
+ if( ! empty( $hourmin[0] ) ) $tzoffset += $hourmin[0] * 3600 ;
+ if( ! empty( $hourmin[1] ) ) $tzoffset += $hourmin[1] * 60 ;
+ $localdatetime = substr( $w3cDT , 0 , $pos ) ;
+ } else {
+ // no timezone
+ $localdatetime = $w3cDT ;
+ }
+
+ $localunixtime = strtotime( str_replace( 'T' , ' ' , $localdatetime ) ) ;
+ if( $localunixtime == -1 ) return time() ;
+ else return $localunixtime + $tzoffset ;
+ }
+
+
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/xmlatomparser.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/xmltaghandler.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xml/xmltaghandler.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xml/xmltaghandler.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,56 @@
+<?php
+// $Id$
+/*******************************************************************************
+ Location: <b>xml/XmlTagHandler</b><br>
+ <br>
+ XmlTagHandler<br>
+ <br>
+ Copyright © 2001 eXtremePHP. All rights reserved.<br>
+ <br>
+ @author Ken Egervari, Remi Michalski<br>
+*******************************************************************************/
+
+class XmlTagHandler
+{
+
+ /****************************************************************************
+
+ ****************************************************************************/
+ function XmlTagHandler()
+ {
+ }
+
+ /****************************************************************************
+
+ ****************************************************************************/
+ function getName()
+ {
+ return '';
+ }
+
+ /****************************************************************************
+
+ ****************************************************************************/
+ function handleBeginElement(&$parser, &$attributes)
+ {
+
+ }
+
+ /****************************************************************************
+
+ ****************************************************************************/
+ function handleEndElement(&$parser)
+ {
+
+ }
+
+ /****************************************************************************
+
+ ****************************************************************************/
+ function handleCharacterData(&$parser, &$data)
+ {
+
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xml/xmltaghandler.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsblock.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsblock.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsblock.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,43 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * this file is for backward compatibility only
+ *
+ **/
+/**
+ * load the new block class
+ **/
+require_once XOOPS_ROOT_PATH.'/kernel/block.php';
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsblock.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopscomments.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopscomments.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopscomments.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,350 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+include_once XOOPS_ROOT_PATH."/class/xoopstree.php";
+require_once XOOPS_ROOT_PATH.'/class/xoopsobject.php';
+include_once XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/comment.php';
+
+class XoopsComments extends XoopsObject
+{
+ var $ctable;
+ var $db;
+
+ function XoopsComments($ctable, $id=null)
+ {
+ $this->ctable = $ctable;
+ $this->db =& Database::getInstance();
+ $this->XoopsObject();
+ $this->initVar('comment_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('item_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('order', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('mode', XOBJ_DTYPE_OTHER, null, false);
+ $this->initVar('subject', XOBJ_DTYPE_TXTBOX, null, false, 255);
+ $this->initVar('comment', XOBJ_DTYPE_TXTAREA, null, false, null);
+ $this->initVar('ip', XOBJ_DTYPE_OTHER, null, false);
+ $this->initVar('pid', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('date', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('nohtml', XOBJ_DTYPE_INT, 1, false);
+ $this->initVar('nosmiley', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('noxcode', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('user_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('icon', XOBJ_DTYPE_OTHER, null, false);
+ $this->initVar('prefix', XOBJ_DTYPE_OTHER, null, false);
+ if ( !empty($id) ) {
+ if ( is_array($id) ) {
+ $this->assignVars($id);
+ } else {
+ $this->load(intval($id));
+ }
+ }
+ }
+
+ function load($id)
+ {
+ $sql = "SELECT * FROM ".$this->ctable." WHERE comment_id=".$id."";
+ $arr = $this->db->fetchArray($this->db->query($sql));
+ $this->assignVars($arr);
+ }
+
+ function store()
+ {
+ if ( !$this->cleanVars() ) {
+ return false;
+ }
+ foreach ( $this->cleanVars as $k=>$v ) {
+ $$k = $v;
+ }
+ $isnew = false;
+ if ( empty($comment_id ) ) {
+ $isnew = true;
+ $comment_id = $this->db->genId($this->ctable."_comment_id_seq");
+ $sql = sprintf("INSERT INTO %s (comment_id, pid, item_id, date, user_id, ip, subject, comment, nohtml, nosmiley, noxcode, icon) VALUES (%u, %u, %u, %u, %u, '%s', '%s', '%s', %u, %u, %u, '%s')", $this->ctable, $comment_id, $pid, $item_id, time(), $user_id, $ip, $subject, $comment, $nohtml, $nosmiley, $noxcode, $icon);
+ } else {
+ $sql = sprintf("UPDATE %s SET subject = '%s', comment = '%s', nohtml = %u, nosmiley = %u, noxcode = %u, icon = '%s' WHERE comment_id = %u", $this->ctable, $subject, $comment, $nohtml, $nosmiley, $noxcode, $icon, $comment_id);
+ }
+ if ( !$result = $this->db->query($sql) ) {
+ //echo $sql;
+ return false;
+ }
+ if ( empty($comment_id) ) {
+ $comment_id = $this->db->getInsertId();
+ }
+ if ( $isnew != false ) {
+ $sql = sprintf("UPDATE %s SET posts = posts+1 WHERE uid = %u", $this->db->prefix("users"), $user_id);
+ if (!$result = $this->db->query($sql)) {
+ echo "Could not update user posts.";
+ }
+ }
+ return $comment_id;
+ }
+
+ function delete()
+ {
+ $sql = sprintf("DELETE FROM %s WHERE comment_id = %u", $this->ctable, $this->getVar('comment_id'));
+ if ( !$result = $this->db->query($sql) ) {
+ return false;
+ }
+ $sql = sprintf("UPDATE %s SET posts = posts-1 WHERE uid = %u", $this->db->prefix("users"), $this->getVar("user_id"));
+ if ( !$result = $this->db->query($sql) ) {
+ echo "Could not update user posts.";
+ }
+ $mytree = new XoopsTree($this->ctable, "comment_id", "pid");
+ $arr = $mytree->getAllChild($this->getVar("comment_id"), "comment_id");
+ $size = count($arr);
+ if ( $size > 0 ) {
+ for ( $i = 0; $i < $size; $i++ ) {
+ $sql = sprintf("DELETE FROM %s WHERE comment_bid = %u", $this->ctable, $arr[$i]['comment_id']);
+ if ( !$result = $this->db->query($sql) ) {
+ echo "Could not delete comment.";
+ }
+ $sql = sprintf("UPDATE %s SET posts = posts-1 WHERE uid = %u", $this->db->prefix("users"), $arr[$i]['user_id']);
+ if ( !$result = $this->db->query($sql) ) {
+ echo "Could not update user posts.";
+ }
+ }
+ }
+ return ($size + 1);
+ }
+
+ function &getCommentTree()
+ {
+ $mytree = new XoopsTree($this->ctable, "comment_id", "pid");
+ $ret = array();
+ $tarray = $mytree->getChildTreeArray($this->getVar("comment_id"), "comment_id");
+ foreach ( $tarray as $ele ) {
+ $ret[] = new XoopsComments($this->ctable,$ele);
+ }
+ return $ret;
+ }
+
+ function getAllComments($criteria=array(), $asobject=true, $orderby="comment_id ASC", $limit=0, $start=0)
+ {
+ $ret = array();
+ $where_query = "";
+ if ( is_array($criteria) && count($criteria) > 0 ) {
+ $where_query = " WHERE";
+ foreach ( $criteria as $c ) {
+ $where_query .= " $c AND";
+ }
+ $where_query = substr($where_query, 0, -4);
+ }
+ if ( !$asobject ) {
+ $sql = "SELECT comment_id FROM ".$this->ctable."$where_query ORDER BY $orderby";
+ $result = $this->db->query($sql,$limit,$start);
+ while ( $myrow = $this->db->fetchArray($result) ) {
+ $ret[] = $myrow['comment_id'];
+ }
+ } else {
+ $sql = "SELECT * FROM ".$this->ctable."".$where_query." ORDER BY $orderby";
+ $result = $this->db->query($sql,$limit,$start);
+ while ( $myrow = $this->db->fetchArray($result) ) {
+ $ret[] = new XoopsComments($this->ctable,$myrow);
+ }
+ }
+ //echo $sql;
+ return $ret;
+ }
+
+ /* Methods below will be moved to maybe another class? */
+ function printNavBar($item_id, $mode="flat", $order=1)
+ {
+ global $xoopsConfig, $xoopsUser;
+ $url = parse_url($_SERVER['REQUEST_URI']);
+ echo "<form method='get' action='".$url['path']."'><table width='100%' border='0' cellspacing='1' cellpadding='2'><tr><td class='bg1' align='center'><select name='mode'><option value='nocomments'";
+ if ( $mode == "nocomments" ) {
+ echo " selected='selected'";
+ }
+ echo ">". _NOCOMMENTS ."</option><option value='flat'";
+ if ($mode == 'flat') {
+ echo " selected='selected'";
+ }
+ echo ">". _FLAT ."</option><option value='thread'";
+ if ( $mode == "thread" || $mode == "" ) {
+ echo " selected='selected'";
+ }
+ echo ">". _THREADED ."</option></select><select name='order'><option value='0'";
+ if ( $order != 1 ) {
+ echo " selected='selected'";
+ }
+ echo ">". _OLDESTFIRST ."</option><option value='1'";
+ if ( $order == 1 ) {
+ echo " selected='selected'";
+ }
+ echo ">". _NEWESTFIRST ."</option></select><input type='hidden' name='item_id' value='".intval($item_id)."' /><input type='submit' value='". _CM_REFRESH ."' />";
+ if ( $xoopsConfig['anonpost'] == 1 || $xoopsUser ) {
+ if ($mode != "flat" || $mode != "nocomments" || $mode != "thread" ) {
+ $mode = "flat";
+ }
+ echo " <input type='button' onclick='location=\"newcomment.php?item_id=".intval($item_id)."&order=".intval($order)."&mode=".$mode."\"' value='"._CM_POSTCOMMENT."' />";
+ }
+ echo "</td></tr></table></form>";
+ }
+
+ function showThreadHead()
+ {
+ openThread();
+ }
+
+ function showThreadPost($order, $mode, $adminview=0, $color_num=1)
+ {
+ global $xoopsConfig, $xoopsUser;
+ $edit_image = "";
+ $reply_image = "";
+ $delete_image = "";
+ $post_date = formatTimestamp($this->getVar("date"),"m");
+ if ( $this->getVar("user_id") != 0 ) {
+ $poster = new XoopsUser($this->getVar("user_id"));
+ if ( !$poster->isActive() ) {
+ $poster = 0;
+ }
+ } else {
+ $poster = 0;
+ }
+ if ( $this->getVar("icon") != null && $this->getVar("icon") != "" ) {
+ $subject_image = "<a name='".$this->getVar("comment_id")."' id='".$this->getVar("comment_id")."'></a><img src='".XOOPS_URL."/images/subject/".$this->getVar("icon")."' alt='' />";
+ } else {
+ $subject_image = "<a name='".$this->getVar("comment_id")."' id='".$this->getVar("comment_id")."'></a><img src='".XOOPS_URL."/images/icons/no_posticon.gif' alt='' />";
+ }
+ if ( $adminview ) {
+ $ip_image = "<img src='".XOOPS_URL."/images/icons/ip.gif' alt='".$this->getVar("ip")."' />";
+ } else {
+ $ip_image = "<img src='".XOOPS_URL."/images/icons/ip.gif' alt='' />";
+ }
+ if ( $adminview || ($xoopsUser && $this->getVar("user_id") == $xoopsUser->getVar("uid")) ) {
+ $edit_image = "<a href='editcomment.php?comment_id=".$this->getVar("comment_id")."&mode=".$mode."&order=".intval($order)."'><img src='".XOOPS_URL."/images/icons/edit.gif' alt='"._EDIT."' /></a>";
+ }
+ if ( $xoopsConfig['anonpost'] || $xoopsUser ) {
+ $reply_image = "<a href='replycomment.php?comment_id=".$this->getVar("comment_id")."&mode=".$mode."&order=".intval($order)."'><img src='".XOOPS_URL."/images/icons/reply.gif' alt='"._REPLY."' /></a>";
+ }
+ if ( $adminview ) {
+ $delete_image = "<a href='deletecomment.php?comment_id=".$this->getVar("comment_id")."&mode=".$mode."&order=".intval($order)."'><img src='".XOOPS_URL."/images/icons/delete.gif' alt='"._DELETE."' /></a>";
+ }
+
+ if ( $poster ) {
+ $text = $this->getVar("comment");
+ if ( $poster->getVar("attachsig") ) {
+ $text .= "<p><br />_________________<br />". $poster->user_sig()."</p>";
+ }
+ $reg_date = _CM_JOINED;
+ $reg_date .= formatTimestamp($poster->getVar("user_regdate"),"s");
+ $posts = _CM_POSTS;
+ $posts .= $poster->getVar("posts");
+ $user_from = _CM_FROM;
+ $user_from .= $poster->getVar("user_from");
+ $rank = $poster->rank();
+ if ( $rank['image'] != "" ) {
+ $rank['image'] = "<img src='".XOOPS_UPLOAD_URL."/".$rank['image']."' alt='' />";
+ }
+ $avatar_image = "<img src='".XOOPS_UPLOAD_URL."/".$poster->getVar("user_avatar")."' alt='' />";
+ if ( $poster->isOnline() ) {
+ $online_image = "<span style='color:#ee0000;font-weight:bold;'>"._ONLINE."</span>";
+ } else {
+ $online_image = "";
+ }
+ $profile_image = "<a href='".XOOPS_URL."/userinfo.php?uid=".$poster->getVar("uid")."'><img src='".XOOPS_URL."/images/icons/profile.gif' alt='"._PROFILE."' /></a>";
+ if ( $xoopsUser ) {
+ $pm_image = "<a href='javascript:openWithSelfMain(\"".XOOPS_URL."/pmlite.php?send2=1&to_userid=".$poster->getVar("uid")."\",\"pmlite\",450,370);'><img src='".XOOPS_URL."/images/icons/pm.gif' alt='".sprintf(_SENDPMTO,$poster->getVar("uname", "E"))."' /></a>";
+ } else {
+ $pm_image = "";
+ }
+ if ( $poster->getVar("user_viewemail") ) {
+ $email_image = "<a href='mailto:".$poster->getVar("email", "E")."'><img src='".XOOPS_URL."/images/icons/email.gif' alt='".sprintf(_SENDEMAILTO,$poster->getVar("uname", "E"))."' /></a>";
+ } else {
+ $email_image = "";
+ }
+ $posterurl = $poster->getVar("url");
+ if ( $posterurl != "" ) {
+ $www_image = "<a href='$posterurl' target='_blank'><img src='".XOOPS_URL."/images/icons/www.gif' alt='"._VISITWEBSITE."' /></a>";
+ } else {
+ $www_image = "";
+ }
+ if ( $poster->getVar("user_icq") != "" ) {
+ $icq_image = "<a href='http://wwp.icq.com/scripts/search.dll?to=".$poster->getVar("user_icq", "E")."'><img src='".XOOPS_URL."/images/icons/icq_add.gif' alt='"._ADD."' /></a>";
+ } else {
+ $icq_image = "";
+ }
+ if ( $poster->getVar("user_aim") != "" ) {
+ $aim_image = "<a href='aim:goim?screenname=".$poster->getVar("user_aim", "E")."&message=Hi+".$poster->getVar("user_aim")."+Are+you+there?'><img src='".XOOPS_URL."/images/icons/aim.gif' alt='aim' /></a>";
+ } else {
+ $aim_image = "";
+ }
+ if ( $poster->getVar("user_yim") != "" ) {
+ $yim_image = "<a href='http://edit.yahoo.com/config/send_webmesg?.target=".$poster->getVar("user_yim", "E")."&.src=pg'><img src='".XOOPS_URL."/images/icons/yim.gif' alt='yim' /></a>";
+ } else {
+ $yim_image = "";
+ }
+ if ( $poster->getVar("user_msnm") != "" ) {
+ $msnm_image = "<a href='".XOOPS_URL."/userinfo.php?uid=".$poster->getVar("uid")."'><img src='".XOOPS_URL."/images/icons/msnm.gif' alt='msnm' /></a>";
+ } else {
+ $msnm_image = "";
+ }
+ showThread($color_num, $subject_image, $this->getVar("subject"), $text, $post_date, $ip_image, $reply_image, $edit_image, $delete_image, $poster->getVar("uname"), $rank['title'], $rank['image'], $avatar_image, $reg_date, $posts, $user_from, $online_image, $profile_image, $pm_image, $email_image, $www_image, $icq_image, $aim_image, $yim_image, $msnm_image);
+ } else {
+ showThread($color_num, $subject_image, $this->getVar("subject"), $this->getVar("comment"), $post_date, $ip_image, $reply_image, $edit_image, $delete_image, $xoopsConfig['anonymous']);
+ }
+ }
+
+ function showThreadFoot()
+ {
+ closeThread();
+ }
+
+ function showTreeHead($width="100%")
+ {
+ echo "<table border='0' class='outer' cellpadding='0' cellspacing='0' align='center' width='$width'><tr class='bg3' align='center'><td colspan='3'>". _CM_REPLIES ."</td></tr><tr class='bg3' align='left'><td width='60%' class='fg2'>". _CM_TITLE ."</td><td width='20%' class='fg2'>". _CM_POSTER ."</td><td class='fg2'>". _CM_POSTED ."</td></tr>";
+ }
+
+ function showTreeItem($order, $mode, $color_num)
+ {
+ if ( $color_num == 1 ) {
+ $bg = 'even';
+ } else {
+ $bg = 'odd';
+ }
+ $prefix = str_replace(".", " ", $this->getVar("prefix"));
+ $date = formatTimestamp($this->getVar("date"),"m");
+ if ( $this->getVar("icon") != "" ) {
+ $icon = "subject/".$this->getVar("icon", "E");
+ } else {
+ $icon = "icons/no_posticon.gif";
+ }
+ $url = parse_url($_SERVER['REQUEST_URI']);
+ echo "<tr class='$bg' align='left'><td>".$prefix."<img src='".XOOPS_URL."/images/".$icon."'> <a href='".$url['path']."?item_id=".$this->getVar("item_id")."&comment_id=".$this->getVar("comment_id")."&mode=".$mode."&order=".$order."#".$this->getVar("comment_id")."'>".$this->getVar("subject")."</a></td><td><a href='".XOOPS_URL."/userinfo.php?uid=".$this->getVar("user_id")."'>".XoopsUser::getUnameFromId($this->getVar("user_id"))."</a></td><td>".$date."</td></tr>";
+ }
+
+ function showTreeFoot()
+ {
+ echo "</table><br />";
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopscomments.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/dhtmltextarea.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/dhtmltextarea.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/dhtmltextarea.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,61 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+/**
+ * Pseudo class
+ *
+ * @author phppp (D.J.)
+ * @copyright copyright (c) 2005 XOOPS.org
+ */
+
+class FormDhtmlTextArea extends XoopsFormDhtmlTextArea
+{
+ /**
+ * Constructor
+ *
+ * @param array $configs Editor Options
+ * @param binary $checkCompatible true - return false on failure
+ */
+ function FormDhtmlTextArea($configs, $checkCompatible = false)
+ {
+ if(!empty($configs)) foreach($configs as $key => $val){
+ ${$key} = $val;
+ $this->$key = $val;
+ }
+ $this->XoopsFormDhtmlTextArea("", $name, empty($value)?"":$value, empty($rows)?5:$rows, empty($cols)?50:$cols, empty($hiddentext)?"xoopsHiddenText":$hiddentext);
+ }
+
+ function setConfig($configs)
+ {
+ foreach($configs as $key=>$val){
+ $this->$key = $val;
+ }
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/dhtmltextarea.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/editor_registry.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/editor_registry.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/editor_registry.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,54 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+/**
+ * XOOPS editor registry
+ *
+ * @author phppp (D.J.)
+ * @copyright copyright (c) 2005 XOOPS.org
+ *
+ */
+global $xoopsConfig;
+
+$current_path = __FILE__;
+if ( DIRECTORY_SEPARATOR != "/" ) $current_path = str_replace( strpos( $current_path, "\\\\", 2 ) ? "\\\\" : DIRECTORY_SEPARATOR, "/", $current_path);
+$root_path = dirname($current_path);
+
+if(file_exists($root_path."/language/".$xoopsConfig['language'].".php")){
+ include_once($root_path."/language/".$xoopsConfig['language'].".php");
+}else{
+ include_once($root_path."/language/english.php");
+}
+
+return $config = array(
+ "name" => "dhtmltextarea",
+ "class" => "FormDhtmlTextArea",
+ "file" => $root_path."/dhtmltextarea.php",
+ "title" => _XOOPS_EDITOR_DHTMLTEXTAREA,
+ "order" => 2,
+ "nohtml"=> 1
+ );
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/editor_registry.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/language/english.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/language/english.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/language/english.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,36 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+/*
+ * Assocated with editor_registry.php
+ */
+define("_XOOPS_EDITOR_DHTMLTEXTAREA", "DHTML Form");
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/language/english.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/language/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/language/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/language/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/dhtmltextarea/language/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/class/borderfieldset.class.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/class/borderfieldset.class.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/class/borderfieldset.class.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,124 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+class WysiwygBorderFieldset
+{
+ var $url;
+ var $skin;
+ var $onchange;
+
+ function WysiwygBorderFieldset($url,$skin,$onchange)
+ {
+ $this->setUrl($url);
+ $this->setSkin($skin);
+ $this->setOnchange($onchange);
+ }
+
+ function getonchange(){return $this->onchange;}
+ function setonchange($onchange){$this->onchange = $onchange;}
+ function getUrl(){return $this->url;}
+ function setUrl($url){$this->url = $url;}
+ function getSkin(){return $this->skin;}
+ function setSkin($skin){$this->skin = $skin;}
+ function display(){echo $this->_renderBorders();}
+
+ function _renderBorders()
+ {
+ $url=$this->getUrl();
+ $onchange=$this->getOnchange();
+ $skin=$this->getSkin();
+ $option='<option value="" selected="selected">-</option>
+ <option value="none">none</option>
+ <option value="dotted">dotted</option>
+ <option value="dashed">dashed</option>
+ <option value="solid">solid</option>
+ <option value="double">double</option>
+ <option value="groove">groove</option>
+ <option value="ridge">ridge</option>
+ <option value="outset">outset</option>';
+ $units='<option value="px">px</option>
+ <option value="em">em</option>
+ <option value="ex">ex</option>
+ <option value="cm" >cm</option>
+ <option value="mm">mm</option>
+ <option value="pc">pc</option>
+ <option value="in">in</option>
+ <option value="pt">pt</option>';
+
+ $borders='
+ <table border="0" cellspacing="0" cellpadding="2">
+ <tr>
+ <td>'._XK_BORDERLEFT.'</td>
+ <td>
+ <select class="'.$skin.'Input" id="borderLeftStyle" onchange="'.$onchange.'">'.$option.'</select>
+ <input type="text" class="'.$skin.'Input" id="borderLeftWidth" maxlength="4" onchange="'.$onchange.'" onkeypress="return onlyNumbers(event,this.id);" />
+ <select class="'.$skin.'Input" id="borderLeftUnits" onchange="'.$onchange.'">'.$units.'</select>
+ <img style="height:16px;width:10px;" alt="'._XK_FORECOLOR.'" id="borderLeft" title="'._XK_FORECOLOR.'" src="'.XOOPS_URL.'/'.$url.'/skins/'.$skin.'/popup.gif" onclick="XK_color(\'borderLeft\')"/>
+ <input type="text" class="'.$skin.'Input" id="borderLeftColor" maxlength="7" onchange="'.$onchange.'" onkeypress="return onlyHexNumbers(event,this.id);" />
+ </td>
+ </tr>
+ <tr>
+ <td>'._XK_BORDERRIGHT.'</td>
+ <td>
+ <select class="'.$skin.'Input" id="borderRightStyle" onchange="'.$onchange.'">'.$option.'</select>
+ <input type="text" class="'.$skin.'Input" id="borderRightWidth" maxlength="4" onchange="'.$onchange.'" onkeypress="return onlyNumbers(event,this.id);" />
+ <select class="'.$skin.'Input" id="borderRightUnits" onchange="'.$onchange.'">'.$units.'</select>
+ <img style="height:16px;width:10px;" alt="'._XK_FORECOLOR.'" id="borderRight" title="'._XK_FORECOLOR.'" src="'.XOOPS_URL.'/'.$url.'/skins/'.$skin.'/popup.gif" onclick="XK_color(\'borderRight\')"/>
+ <input type="text" class="'.$skin.'Input" id="borderRightColor" maxlength="7" onchange="'.$onchange.'" onkeypress="return onlyHexNumbers(event,this.id);" />
+ </td>
+ </tr>
+ <tr>
+ <td>'._XK_BORDERTOP.'</td>
+ <td>
+ <select class="'.$skin.'Input" id="borderTopStyle" onchange="'.$onchange.'">'.$option.'</select>
+ <input type="text" class="'.$skin.'Input" id="borderTopWidth" maxlength="4" onchange="'.$onchange.'" onkeypress="return onlyNumbers(event,this.id);" />
+ <select class="'.$skin.'Input" id="borderTopUnits" onchange="'.$onchange.'">'.$units.'</select>
+ <img style="height:16px;width:10px;" alt="'._XK_FORECOLOR.'" id="borderTop" title="'._XK_FORECOLOR.'" src="'.XOOPS_URL.'/'.$url.'/skins/'.$skin.'/popup.gif" onclick="XK_color(\'borderTop\')"/>
+ <input type="text" class="'.$skin.'Input" id="borderTopColor" maxlength="7" onchange="'.$onchange.'" onkeypress="return onlyHexNumbers(event,this.id);" />
+ </td>
+ </tr>
+ <tr>
+ <td>'._XK_BORDERBOTTOM.'</td>
+ <td>
+ <select class="'.$skin.'Input" id="borderBottomStyle" onchange="'.$onchange.'">'.$option.'</select>
+ <input type="text" class="'.$skin.'Input" id="borderBottomWidth" maxlength="4" onchange="'.$onchange.'" onkeypress="return onlyNumbers(event,this.id);" />
+ <select class="'.$skin.'Input" id="borderBottomUnits" onchange="'.$onchange.'">'.$units.'</select>
+ <img style="height:16px;width:10px;" alt="'._XK_FORECOLOR.'" id="borderBottom" title="'._XK_FORECOLOR.'" src="'.XOOPS_URL.'/'.$url.'/skins/'.$skin.'/popup.gif" onclick="XK_color(\'borderBottom\')"/>
+ <input type="text" class="'.$skin.'Input" id="borderBottomColor" maxlength="7" onchange="'.$onchange.'" onkeypress="return onlyHexNumbers(event,this.id);" />
+ </td>
+ </tr>
+ </table>';
+ return $borders;
+}
+}
+
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/class/borderfieldset.class.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/class/colorpalette.class.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/class/colorpalette.class.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/class/colorpalette.class.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,92 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+class WysiwygColorPalette
+{
+
+ var $onclick;
+ var $id;
+ var $url;
+ var $skin;
+
+
+ function WysiwygColorPalette($onclick,$id,$url,$skin)
+ {
+ $this->setonclick($onclick);
+ $this->setUrl($url);
+ $this->setId($id);
+ $this->setSkin($skin);
+ }
+
+ function getonclick(){return $this->onclick;}
+ function setonclick($onclick){$this->onclick = $onclick;}
+ function getId(){return $this->id;}
+ function setId($id){$this->id = $id;}
+ function getUrl(){return $this->url;}
+ function setUrl($url){$this->url = $url;}
+ function getSkin(){return $this->skin;}
+ function setSkin($skin){$this->skin = $skin;}
+
+ function _renderColorPalette()
+ {
+ $id=$this->getId();
+ $function=$this->getonclick();
+ $skin=$this->getSkin();
+ $imgurl=$this->getUrl().'/skins/'.$skin;
+ $colors=Array('#000000','#993300','#333300','#003300','#333366','#000099','#333399','#333333','#660000','#FF6600','#999900','#009900','#009999','#0000FF','#666699','#666666','#FF0000','#FF9900','#99CC00','#339966','#33CCCC','#3366FF','#660099','#999999','#FF00FF','#FFCC00','#FFFF00','#00FF00','#00FFFF','#00CCFF','#993366','#CCCCCC','#FF99CC','#FFCC99','#FFFF99','#CCFFCC','#CCFFFF','#99CCFF','#CC99FF','#FFFFFF');
+
+ $text='<div name="XoopsKToolbarDivs" id="colorPalette'.$id.'" class="'.$skin.'ColorPickerD" style="display:none;">';
+
+ $text.=' <div style="float:left;">';
+ $text.=' <input class="'.$skin.'colorpickerPreview" type="text" id="colortextf'.$id.'" size="8" maxlength="8" />';
+ $text.=' <input class="'.$skin.'colorpickerHEX" type="text" id="showc'.$id.'" maxlength="8" />';
+ $text.=' </div>';
+
+ $text.=' <img style="float:right;margin:2px;" alt="" src="'.$imgurl.'/none.gif" onmousedown="'.$function.'(\''.$id.'\',\'\')"/>';
+
+ $text.=' <br style="clear:both;" />
+ <div class="'.$skin.'ColorsContainer">';
+
+ foreach ($colors as $color)
+ {
+ $text.='
+ <div class="'.$skin.'Colors" style="background-color:'.$color.';border:1px solid #D7D7D7;" onmouseout="this.style.border=\'1px solid #D7D7D7\'" onmousedown="'.$function.'(\''.$id.'\',\''.$color.'\');this.style.border=\'1px solid #D7D7D7\'" onmouseover="XK_over(\''.$id.'\',\''.$color.'\');this.style.border=\'1px solid #000075\'"></div>';
+ }
+ $text.=' </div>
+ </div>';
+
+ $text.='<input type="hidden" id="coloroption'.$id.'"/>';
+ return $text;
+ }
+
+ function display(){echo $this->_renderColorPalette();}
+}
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/class/colorpalette.class.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/class/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/class/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/class/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/class/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/dialogs.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/dialogs.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/dialogs.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,512 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+/**
+ *
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Samuels
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+
+/**
+ * A textarea with wysiwyg buttons
+ *
+ * @author Samuels
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage form
+ */
+
+$dialog = isset($_GET['dialog']) ? $_GET['dialog'] : 'none';
+$skin = isset($_GET['skin']) ? $_GET['skin'] : 'default';
+$id = isset($_GET['id']) ? $_GET['id'] : '';
+
+/* The path is specified */
+include_once(dirname(__FILE__) .'/../../../mainfile.php');
+include_once(dirname(__FILE__) .'/preferences.php');
+$url = _XK_P_PATH;
+
+/* Check skin */
+if(!in_array($skin, array("default", "common", "xp"))){
+ include_once(XOOPS_ROOT_PATH."/class/xoopslists.php");
+ $skin_list = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH._XK_P_PATH.'/skins/');
+ if(!in_array($skin, $skin_list)){
+ $skins = array_keys($skin_list);
+ $skin = $skins[0];
+ }
+}
+
+if(file_exists(XOOPS_ROOT_PATH.''.$url.'/language/'.$xoopsConfig['language'].'.php')){
+ include_once(XOOPS_ROOT_PATH.''.$url.'/language/'.$xoopsConfig['language'].'.php');
+}else{
+ include_once(XOOPS_ROOT_PATH.''.$url.'/language/english.php');
+}
+
+echo "<!DOCTYPE html PUBLIC '//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>";
+echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'._LANGCODE.'" lang="'._LANGCODE.'">';
+echo '<head>';
+echo '<meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" />';
+echo '<meta http-equiv="content-language" content="'._LANGCODE.'" />';
+echo '<script type="text/javascript" src="'.XOOPS_URL.''.$url.'/include/js/dialogs.js"></script>';
+
+switch ($dialog)
+{
+ case 'smilies':
+ echo '<link rel="stylesheet" type="text/css" media="all" href="'.getcss($xoopsConfig['theme_set']).'" />';
+ echo '</head><body style="width:100%;">
+ <table width="100%" class="outer">
+ <tr>
+ <th colspan="3">'._MSC_SMILIES.'</th>
+ </tr>
+ <tr class="head">
+ <td>'._MSC_CODE.'</td>
+ <td>'._MSC_EMOTION.'</td>
+ <td>'._XK_IMAGE.'</td>
+ </tr>';
+ if ($getsmiles = $xoopsDB->query('SELECT * FROM '.$xoopsDB->prefix('smiles'))) {
+ $rcolor = 'even';
+ while ( $smile = $xoopsDB->fetchArray($getsmiles) ) {
+ echo "<tr class='$rcolor'><td>".$smile['code']."</td><td>".$smile['emotion']."</td><td><img onmouseover='style.cursor=\"hand\"' onclick=\"sendSmilie('".$id."','".XOOPS_UPLOAD_URL."/".$smile['smile_url']."')\" src='".XOOPS_UPLOAD_URL."/".$smile['smile_url']."' alt='' /></td></tr>";
+ $rcolor = ($rcolor == 'even') ? 'odd' : 'even';
+ }
+ } else {
+ echo "Could not retrieve data from the database.";
+ }
+ echo '</table>'._MSC_CLICKASMILIE;
+ echo '</body></html>';
+ break;
+
+ case 'pastespecial':
+ echo '
+ <title>'._XK_PASTESPECIAL.'</title>
+ <link href="'.XOOPS_URL.''.$url.'/skins/'.$skin.'/'.$skin.'.css" rel="stylesheet" type="text/css" />
+ </head>
+ <body scroll=no class="'.$skin.'PropsBody" onload="document.getElementById(\'iframe\').contentWindow.document.designMode=\'on\';">';
+ echo ''._XK_PASTEINSTRUCTIONS.'<br />
+ <iframe class="'.$skin.'pasteSIframe" id="iframe" frameborder=0;></iframe>';
+ echo '<br />';
+ echo '<input class="'.$skin.'Input2" type="submit" value="'._XK_REMOVE_WORDF.'" onclick="XK_doClean(\'word\')">';
+ echo '<input class="'.$skin.'Input2" type="submit" value="'._XK_REMOVE_ALLF.'" onclick="XK_doClean(\'all\')">';
+ echo '<br /><input type="checkbox" id="checkClose" checked>'._XK_CLOSE_APASTE.'';
+ echo '<br /><br />';
+ echo ' <input class="'.$skin.'SubmitInput" type="submit" value="Ok" onclick="XK_updateIframe(\''.$id.'\')">
+ <input class="'.$skin.'SubmitInput" type="submit" value="Close" onclick="window.close();">';
+ echo '</body></html>';
+ break;
+
+ case 'table':
+ echo '<link rel="stylesheet" type="text/css" media="all" href="'.getcss($xoopsConfig['theme_set']).'" />';
+ echo '<title>'._XK_INSERTTABLE.'</title>';
+ echo'</head><body style="width:100%;">';
+
+ include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
+ $sform = new XoopsThemeForm( _XK_INSERTTABLE, "table", xoops_getenv( 'PHP_SELF' ) );
+ $sform->addElement( new XoopsFormText( _XK_ROWS, 'rows', 4, 4, '2' ), true );
+ $sform->addElement( new XoopsFormText( _XK_COLS, 'columns', 4, 4, '2' ), true );
+ $sform->addElement( new XoopsFormText( _XK_WIDTH, 'width_value', 4, 4, '100' ), true );
+ $sform->addElement( new XoopsFormText( _XK_HEIGHT, 'height_value', 4, 4, '100' ), true );
+ $sform->addElement( new XoopsFormText( _XK_BORDER, 'border', 4, 4, '1' ), true );
+ $sform->addElement( new XoopsFormText( _XK_SPACING, 'cell_spacing', 4, 4, '1' ), true );
+ $sform->addElement( new XoopsFormText( _XK_PADDING, 'cell_padding', 4, 4, '1' ), true );
+ $button_tray = new XoopsFormElementTray( '', '' );
+ $button_submit = new XoopsFormButton( '', '', _SUBMIT, 'button' );
+ $button_submit->setExtra( 'onclick="sendTable(\''.$id.'\')"' );
+ $button_cancel = new XoopsFormButton( '', '', _CANCEL, 'button' );
+ $button_cancel->setExtra( 'onclick="window.close()"' );
+ $button_tray->addElement( $button_submit );
+ $button_tray->addElement( $button_cancel );
+ $sform->addElement( $button_tray );
+ $sform->display();
+
+ echo '</body></html>';
+
+ break;
+
+ case 'cellProps':
+ include_once XOOPS_ROOT_PATH.''.$url."/class/colorpalette.class.php";
+ include_once XOOPS_ROOT_PATH.''.$url."/class/borderfieldset.class.php";
+ echo ' <title>'._XK_CELLPROPS.'</title>
+ <link href="'.XOOPS_URL.'/'.$url.'/skins/'.$skin.'/'.$skin.'.css" rel="stylesheet" type="text/css" />
+ </head>';
+ echo '<body scroll=no class="'.$skin.'PropsBody" onload="initCellProps(\''.$id.'\')" >';
+ $uni='<option value="px">px</option>
+ <option value="em">em</option>
+ <option value="ex">ex</option>
+ <option value="cm">cm</option>
+ <option value="mm">mm</option>
+ <option value="pc">pc</option>
+ <option value="in">in</option>
+ <option value="pt">pt</option>';
+
+ $units=$uni.'<option value="%">%</option>';
+
+ $palette= new WysiwygColorPalette('XK_CC','',XOOPS_URL.'/'.$url, $skin);
+ $palette->display();
+ echo '<form name="form1" method="post" action="">';
+ $borders=new WysiwygBorderFieldset($url,$skin,'cellPreview()');
+
+ echo '
+ <div class="'.$skin.'selectedTab" onclick="SelectTab(this,\'a\',\''.$skin.'\');">'._XK_OTHERS.'</div>
+ <div class="'.$skin.'notSelectedTab" onclick="SelectTab(this,\'b\',\''.$skin.'\');">'._XK_BORDERS.'</div>
+ <div class="'.$skin.'notSelectedTab" onclick="SelectTab(this,\'c\',\''.$skin.'\');">'._XK_CELLPADDING.'</div>
+ <div class="'.$skin.'notSelectedTab" onclick="SelectTab(this,\'d\',\''.$skin.'\');cellPreview();">'._XK_PREVIEW.'</div>';
+ echo '
+ <div class="'.$skin.'downTabContainer">
+
+ <div class="'.$skin.'divTabContent" id="a">
+ <table border="0" cellspacing="0" cellpadding="2">
+ <tr>
+ <td>'._XK_WIDTH.'</td>
+ <td><input type="text" class="'.$skin.'Input" id="cellWidth" onkeypress="return onlyNumbers(event,this.id);" /><select class="'.$skin.'Input" id="widthUnits" >'.$units.'</select></td>
+ </tr>
+ <tr>
+ <td>'._XK_HEIGHT.'</td>
+ <td><input type="text" class="'.$skin.'Input" id="cellHeight" onkeypress="return onlyNumbers(event,this.id);" /><select class="'.$skin.'Input" id="heightUnits" >'.$units.'</select></td>
+ </tr>
+ <tr>
+ <td>'._XK_FORECOLOR.'</td>
+ <td><input type="text" class="'.$skin.'Input" id="bgColor" /><img style="height:16px;width:10px;" alt="'._XK_FORECOLOR.'" id="bg" title="'._XK_FORECOLOR.'" src="'.XOOPS_URL.'/'.$url.'/skins/'.$skin.'/popup.gif" onclick="XK_color(\'bg\')"/></td>
+ </tr>
+ <tr>
+ <td>'._XK_IMGBACK.'</td>
+ <td><input type="text" class="'.$skin.'Input" id="backgroundImage" /><img style="height:16px;width:10px;" alt="'._XK_INSERTIMAGEM.'" id="bg" title="'._XK_INSERTIMAGEM.'" src="'.XOOPS_URL.'/'.$url.'/skins/'.$skin.'/popup.gif"onclick="openWithSelfMain(\''.XOOPS_URL.'/imagemanager.php?target='.$id.'&wysiwyg=1\',\'imgmanager\',400,430)"/></td>
+ </tr>
+ <tr>
+ <td>'._XK_CLASS.'</td>
+ <td><input type="text" class="'.$skin.'Input" id="class" /></td>
+ </tr>
+ </table>
+ </div>
+
+ <div class="'.$skin.'divTabContent" style="display:none" id="b">';
+ $borders->display();
+ echo'</div>
+
+ <div class="'.$skin.'divTabContent" style="display:none" id="c">
+
+ <table border="0" cellspacing="0" cellpadding="2">
+ <tr>
+ <td>'._XK_BORDERLEFT.'</td>
+ <td><input type="text" class="'.$skin.'Input" id="paddingLeft" onkeypress="return onlyNumbers(event,this.id);" /><select class="'.$skin.'Input" id="paddingLeftUnits" >'.$uni.'</select></td>
+ </tr>
+ <tr>
+ <td>'._XK_BORDERRIGHT.'</td>
+ <td><input type="text" class="'.$skin.'Input" id="paddingRight" onkeypress="return onlyNumbers(event,this.id);" /><select class="'.$skin.'Input" id="paddingRightUnits" >'.$uni.'</select></td>
+ </tr>
+ <tr>
+ <td>'._XK_BORDERTOP.'</td>
+ <td><input type="text" class="'.$skin.'Input" id="paddingTop" onkeypress="return onlyNumbers(event,this.id);" /><select class="'.$skin.'Input" id="paddingTopUnits" >'.$uni.'</select></td>
+ </tr>
+ <tr>
+ <td>'._XK_BORDERBOTTOM.'</td>
+ <td><input type="text" class="'.$skin.'Input" id="paddingBottom" onkeypress="return onlyNumbers(event,this.id);" /><select class="'.$skin.'Input" id="paddingBottomUnits" >'.$uni.'</select></td>
+ </tr>
+ </table>
+ </div>
+
+ <div class="'.$skin.'divTabContent" style="display:none" id="d">
+ <div align="center" class="'.$skin.'cellPreviewDiv">
+ <table border="0" id="previewCell">
+ <tr>
+ <td id="PreviewCell2">test</td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </div>';
+
+ echo'<br style="clear:both;" />
+ <input class="'.$skin.'SubmitInput" type="button" value="Ok" onclick="sendCell(\''.$id.'\')"/>
+ <input class="'.$skin.'SubmitInput" type="reset" value="Reset" onclick="cellPreview()"/>
+ </form>
+ </body>
+ </html>
+ ';
+
+ break;
+
+ case 'tableProps':
+ include_once XOOPS_ROOT_PATH.''.$url."/class/colorpalette.class.php";
+ echo ' <title>'._XK_TABLEPROPS.'</title>
+ <link href="'.XOOPS_URL.'/'.$url.'/skins/'.$skin.'/'.$skin.'.css" rel="stylesheet" type="text/css" />
+ </head>';
+ echo '<body scroll=no class="'.$skin.'PropsBody" onload="initTableProps(\''.$id.'\')" >';
+
+ $palette= new WysiwygColorPalette('XK_TableC','', XOOPS_URL.'/'.$url, $skin);
+ $palette->display();
+
+ echo '<form name="form1" method="post" action="">';
+ echo '
+ <div class="'.$skin.'selectedTab" onclick="SelectTab(this,\'a\',\''.$skin.'\');">'._XK_OTHERS.'</div>
+ <div class="'.$skin.'notSelectedTab" onclick="SelectTab(this,\'b\',\''.$skin.'\');">'._XK_FORECOLOR.'</div>
+ <div class="'.$skin.'notSelectedTab" onclick="SelectTab(this,\'c\',\''.$skin.'\');tablePreview();">'._XK_PREVIEW.'</div>';
+
+ echo'
+ <div class="'.$skin.'downTabContainer">
+
+ <div class="'.$skin.'divTabContent" id="a">
+ <table border="0" cellspacing="0" cellpadding="2">
+ <tr>
+ <td>'._XK_WIDTH.'</td>
+ <td><input type="text" class="'.$skin.'Input" id="width" /></td>
+ </tr>
+ <tr>
+ <td>'._XK_HEIGHT.'</td>
+ <td><input type="text" class="'.$skin.'Input" id="height" /></td>
+ </tr>
+ <tr>
+ <td>'._XK_BORDER.'</td>
+ <td><input type="text" class="'.$skin.'Input" id="border"onkeypress="return onlyNumbers(event,this.id);"/></td>
+ </tr>
+ <tr>
+ <td>'._XK_PADDING.'</td>
+ <td><input type="text" class="'.$skin.'Input" id="padding"onkeypress="return onlyNumbers(event,this.id);"/></td>
+ </tr>
+ <tr>
+ <td>'._XK_SPACING.'</td>
+ <td><input type="text" class="'.$skin.'Input" id="spacing"onkeypress="return onlyNumbers(event,this.id);"/></td>
+ </tr>
+ <tr>
+ <td>'._XK_CLASS.'</td>
+ <td><input type="text" class="'.$skin.'Input" id="class"/></td>
+ </tr>
+ <tr>
+ <td>'._XK_BCOLLPASE.'</td>
+ <td><input type="checkbox" id="collapse" onclick="tablePreview()"/></td>
+ </tr>
+ </table>
+ </div>
+
+ <div class="'.$skin.'divTabContent" style="display:none;" id="b">
+ <table border="0" cellspacing="0" cellpadding="2">
+ <tr>
+ <td>'._XK_FORECOLOR.'</td>
+ <td><input type="text" class="'.$skin.'Input" id="bgColor" maxlength="7"/><img style="height:16px;width:10px;" alt="'._XK_FORECOLOR.'" id="bg" title="'._XK_FORECOLOR.'" src="'.XOOPS_URL.'/'.$url.'/skins/'.$skin.'/popup.gif" onclick="XK_color(\'bg\')"/></td>
+ </tr>
+ <tr>
+ <td>'._XK_BORDERCOLOR.'</td>
+ <td><input type="text" class="'.$skin.'Input" id="bordertColor" maxlength="7" /><img style="height:16px;width:10px;" alt="'._XK_BORDERCOLOR.'" id="bordert" title="'._XK_BORDERCOLOR.'" src="'.XOOPS_URL.'/'.$url.'/skins/'.$skin.'/popup.gif" onclick="XK_color(\'bordert\')"/></td>
+ </tr>
+ <tr>
+ <td>'._XK_IMGBACK.'</td>
+ <td><input type="text" class="'.$skin.'Input" id="backgroundImage"/><img style="height:16px;width:10px;" alt="'._XK_INSERTIMAGEM.'" id="bi" title="'._XK_INSERTIMAGEM.'" src="'.XOOPS_URL.'/'.$url.'/skins/'.$skin.'/popup.gif"onclick="openWithSelfMain(\''.XOOPS_URL.'/imagemanager.php?target='.$id.'&wysiwyg=1\',\'imgmanager\',400,430)"/></td>
+ </tr>
+ </table>
+ </div>
+
+ <div class="'.$skin.'divTabContent" style="display:none;" id="c">
+ <div align="center" class="'.$skin.'tablePreviewDiv">
+ <br />
+ <table border="0" id="previewTable">
+ <tr>
+ <td>test</td><td>test</td>
+ </tr>
+ <tr>
+ <td>test</td><td>test</td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+ </div>
+ <br style="clear:both;" />
+ <input class="'.$skin.'SubmitInput" type="button" value="Ok" onclick="sendTableProps(\''.$id.'\')"/>
+ <input class="'.$skin.'SubmitInput" type="reset" value="Reset" onclick="tablePreview()"/>
+ </form>
+ </body></html>';
+ break;
+
+ case 'imageProps':
+ include_once XOOPS_ROOT_PATH.''.$url."/class/colorpalette.class.php";
+ include_once XOOPS_ROOT_PATH.''.$url."/class/borderfieldset.class.php";
+ echo ' <title>'._XK_IMAGEPROPS.'</title>
+ <link href="'.XOOPS_URL.''.$url.'/skins/'.$skin.'/'.$skin.'.css" rel="stylesheet" type="text/css" />
+ </head>';
+ echo '<body scroll=no class="'.$skin.'PropsBody" onload="initImageProps(\''.$id.'\')" >';
+ $units='<option value="px">px</option>
+ <option value="em">em</option>
+ <option value="ex">ex</option>
+ <option value="cm" >cm</option>
+ <option value="mm">mm</option>
+ <option value="pc">pc</option>
+ <option value="in">in</option>
+ <option value="pt">pt</option>';
+ $borders=new WysiwygBorderFieldset($url,$skin,'imagePreview()');
+ $palette= new WysiwygColorPalette('XK_ImgPrev','', XOOPS_URL.'/'.$url, $skin);
+ $palette->display();
+ echo'<form name="form1" method="post" action="">';
+
+
+ echo '
+ <div class="'.$skin.'selectedTab" onclick="SelectTab(this,\'a\',\''.$skin.'\');">'._XK_OTHERS.'</div>
+ <div class="'.$skin.'notSelectedTab" onclick="SelectTab(this,\'b\',\''.$skin.'\');">'._XK_BORDERS.'</div>
+ <div class="'.$skin.'notSelectedTab" onclick="SelectTab(this,\'c\',\''.$skin.'\');">'._XK_MARGINS.'</div>
+ <div class="'.$skin.'notSelectedTab" onclick="SelectTab(this,\'d\',\''.$skin.'\');imagePreview();">'._XK_PREVIEW.'</div>';
+
+ echo'
+ <div class="'.$skin.'downTabContainer">
+
+ <div class="'.$skin.'divTabContent" id="a">
+ <table border="0" cellspacing="0" cellpadding="2">
+ <tr>
+ <td>'._XK_IMAGEALIGN.'</td>
+ <td><select class="'.$skin.'Input" id="align" >
+ <option value="">-</option>
+ <option value="baseline">'._XK_BASELINE.'</option>
+ <option value="top">'._XK_TOP.'</option>
+ <option value="middle">'._XK_MIDDLE.'</option>
+ <option value="bottom">'._XK_BOTTOM.'</option>
+ <option value="texttop">'._XK_TEXTTOP.'</option>
+ <option value="absmiddle">'._XK_ABSMIDDLE.'</option>
+ <option value="absbottom">'._XK_ABSBOTTOM.'</option>
+ <option value="left">'._XK_LEFT.'</option>
+ <option value="right">'._XK_RIGHT.'</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>'._XK_WIDTH.'</td>
+ <td>
+ <input onkeypress="return onlyNumbers(event,this.id);" type="text" class="'.$skin.'Input" id="width"/>
+ </td>
+ </tr>
+ <tr>
+ <td>'._XK_HEIGHT.'</td>
+ <td>
+ <input onkeypress="return onlyNumbers(event,this.id);" type="text" class="'.$skin.'Input" id="height"/>
+ </td>
+ </tr>
+ <tr>
+ <td>'._XK_ALT.'</td>
+ <td>
+ <input type="text" class="'.$skin.'Input4" id="alt" />
+ </td>
+ </tr>
+ <tr>
+ <td>'._XK_SRC.'</td>
+ <td>
+ <input type="text" class="'.$skin.'Input4" id="src" />
+ </td>
+ </tr>
+ <tr>
+ <td>'._XK_CLASS.'</td>
+ <td>
+ <input type="text" class="'.$skin.'Input" id="className"/>
+ </td>
+ </tr>
+
+ </table>
+ </div>
+
+ <div class="'.$skin.'divTabContent" style="display:none" id="b">';
+ $borders->display();
+ echo'</div>
+
+ <div class="'.$skin.'divTabContent" style="display:none" id="c">
+ <table border="0" cellspacing="0" cellpadding="2">
+ <tr>
+ <td>'._XK_LEFT.'</td>
+ <td><input maxlength="5" type="text" class="'.$skin.'Input" id="marginLeft" onkeypress="return onlyNumbers(event,this.id);" /><select class="'.$skin.'Input" id="marginLeftUnits">'.$units.'</select></td>
+ </tr>
+ <tr>
+ <td>'._XK_RIGHT.'</td>
+ <td><input maxlength="5" type="text" class="'.$skin.'Input" id="marginRight" onkeypress="return onlyNumbers(event,this.id);" /><select class="'.$skin.'Input" id="marginRightUnits">'.$units.'</select></td>
+ </tr>
+ <tr>
+ <td>'._XK_TOP.'</td>
+ <td><input maxlength="5" type="text" class="'.$skin.'Input" id="marginTop" onkeypress="return onlyNumbers(event,this.id);" /><select class="'.$skin.'Input" id="marginTopUnits">'.$units.'</select></td>
+ </tr>
+ <tr>
+ <td>'._XK_HSPACE.'</td>
+ <td><input onkeypress="return onlyNumbers(event,this.id);" type="text" class="'.$skin.'Input" id="hspace"/></td>
+ </tr>
+ <tr>
+ <td>'._XK_VSPACE.'</td>
+ <td><input onkeypress="return onlyNumbers(event,this.id);" type="text" class="'.$skin.'Input" id="vspace"/></td>
+ </tr>
+ <tr>
+ <td>'._XK_BOTTOM.'</td>
+ <td><input maxlength="5" type="text" class="'.$skin.'Input" id="marginBottom" onkeypress="return onlyNumbers(event,this.id);" /><select class="'.$skin.'Input" id="marginBottomUnits">'.$units.'</select></td>
+ </tr>
+ </table>
+ </div>
+
+ <div class="'.$skin.'divTabContent" style="display:none;" id="d">
+ <div style="height:160px;overflow:auto;">
+ <img id="previewimage" alt="" src="'.XOOPS_URL.'/'.$url.'/skins/common/xoops.gif" width="61" height="61"/>En un lugar de la Mancha, de cuyo nombre no quiero acordarme, no hace mucho tiempo que vivía un hidalgo de noble cuna, que poseía un antiguo escudo, una lanza en astillero, un rocín flaco y un galgo corredor. Era de condición modesta; y así, las tres partes de su hacienda...
+ <br style="clear:both;" />
+ </div>
+ </div>
+
+ </div>
+ <br style="clear:both;" />
+ <input class="'.$skin.'SubmitInput" type="button" value="Ok" onclick="sendImage(\''.$id.'\')"/>
+ </form>
+ </body>
+ </html>';
+ break;
+
+ case 'createLink':
+
+ echo '<link rel="stylesheet" type="text/css" media="all" href="'.getcss($xoopsConfig['theme_set']).'" />';
+ echo'</head>
+ <body class="'.$skin.'PropsBody" style="width:100%;" onLoad="XK_MakeAnchorSelect(\''.$id.'\')">';
+
+ include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
+ $sform = new XoopsThemeForm( _XK_EDITIMAGE, 'linkform', xoops_getenv( 'PHP_SELF' ) );
+ $sform->addElement( new XoopsFormText( 'Url', 'url', 20, 100, '' ), true );
+ $select= new XoopsFormSelect( 'Anchor', 'anchor', '', 1,false);
+ $select->setExtra( 'onchange="XK_disableUrlTextField(this.options[this.selectedIndex].value)"' );
+ $sform->addElement($select);
+ $sform->addElement( new XoopsFormSelect( 'Open', 'open', '', 1,false), true );
+ $button_tray = new XoopsFormElementTray( '', '' );
+ $button_submit = new XoopsFormButton( '', '', _SUBMIT, 'button' );
+ $button_submit->setExtra( 'onclick="sendLink(\''.$id.'\')"' );
+ $button_cancel = new XoopsFormButton( '', '', _CANCEL, 'button' );
+ $button_cancel->setExtra( 'onclick="window.close()"' );
+ $button_tray->addElement( $button_submit );
+ $button_tray->addElement( $button_cancel );
+ $sform->addElement( $button_tray );
+ $sform->display();
+
+ break;
+
+ default:
+ echo '</head><body onload="window.close()">';
+ echo 'ERROR';
+ echo '</body></html>';
+ break;
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/dialogs.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/editor_registry.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/editor_registry.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/editor_registry.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,53 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+/**
+ * XOOPS editor registry
+ *
+ * @author phppp (D.J.)
+ * @copyright copyright (c) 2005 XOOPS.org
+ *
+ */
+global $xoopsConfig;
+
+$current_path = __FILE__;
+if ( DIRECTORY_SEPARATOR != "/" ) $current_path = str_replace( strpos( $current_path, "\\\\", 2 ) ? "\\\\" : DIRECTORY_SEPARATOR, "/", $current_path);
+$root_path = dirname($current_path);
+
+if(file_exists($root_path."/language/".$xoopsConfig['language'].".php")){
+ include_once($root_path."/language/".$xoopsConfig['language'].".php");
+}else{
+ include_once($root_path."/language/english.php");
+}
+
+return $config = array(
+ "name" => "koivi",
+ "class" => "XoopsFormWysiwygTextArea",
+ "file" => $root_path."/formwysiwygtextarea.php",
+ "title" => _XOOPS_EDITOR_KOIVI,
+ "order" => 3
+ );
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/editor_registry.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/formwysiwygtextarea.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/formwysiwygtextarea.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/formwysiwygtextarea.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,722 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+/**
+* A textarea with wysiwyg buttons
+*
+* @author Samuels
+* @copyright copyright (c) 2000-2003 XOOPS.org
+* @package kernel
+* @subpackage form
+*/
+
+include_once(dirname(__FILE__) . '/preferences.php');
+
+
+class XoopsFormWysiwygTextArea extends XoopsFormElement {
+ var $options;
+ var $value;
+ var $width = "100%";
+ var $height = "400px";
+ var $url;
+ var $skin;
+ var $fonts;
+ var $direction;
+
+ /**
+ * Constructor
+ *
+ * @param array $configs Editor Options
+ * @param binary $checkCompatible true - return false on failure
+ */
+ function XoopsFormWysiwygTextArea($configs, $checkCompatible = false)
+ {
+ if(!empty($configs)) {
+ foreach($configs as $key => $val) {
+ if (method_exists($this, 'set'.Ucfirst($key))) {
+ $this->{'set'.Ucfirst($key)}($val);
+ }else{
+ $this->$key = $val;
+ }
+ }
+ }
+ if($checkCompatible && !$this->isCompatible()) {
+ return false;
+ }
+ }
+
+ function setConfig($configs)
+ {
+ foreach($configs as $key=>$val){
+ $this->$key = $val;
+ }
+ }
+ function getDirection()
+ {
+ if(empty($this->direction)){
+ $this->direction = _XK_P_TDIRECTION;
+ }
+ return $this->direction;
+ }
+ function setDirection($direction)
+ {
+ $this->direction = $direction;
+ }
+ function getSkin()
+ {
+ if(empty($this->skin)){
+ $this->skin = _XK_P_SKIN;
+ }
+ return $this->skin;
+ }
+ function setSkin($skin)
+ {
+ $this->skin = $skin;
+ }
+ function getUrl()
+ {
+ if(empty($this->url)){
+ $this->url = _XK_P_PATH;
+ }
+ return $this->url;
+ }
+ function setUrl($value)
+ {
+ $this->url = $value;
+ }
+ function getValue()
+ {
+ return $this->value;
+ }
+ function setValue($value)
+ {
+ $this->value = $value;
+ }
+ function setWidth($width)
+ {
+ if(!empty($width)){
+ $this->width = $width;
+ }
+ }
+ function getWidth()
+ {
+ return $this->width;
+ }
+ function setHeight($height)
+ {
+ if(!empty($height)){
+ $this->height = $height;
+ }
+ }
+ function getHeight()
+ {
+ return $this->height;
+ }
+ function getFonts()
+ {
+ if(empty($this->fonts) || count($this->fonts)==0){
+ $this->fonts = array('Courier New' => 'Courier New, Courier, monospace', 'MS Serif' => 'MS Serif, New York, serif', 'Verdana' => 'Verdana, Geneva, Arial, Helvetica, sans-serif');
+ }
+ return $this->fonts;
+ }
+
+ function setFonts($fonts)
+ {
+ if(is_array($fonts)){
+ $myts =& MyTextSanitizer::getInstance();
+ foreach($fonts as $key => $val){
+ $key =& $myts->htmlSpecialChars($key);
+ $val =& $myts->htmlSpecialChars($val);
+ $this->fonts[$key] = $val;
+ }
+ }
+ }
+
+ function getOptions()
+ {
+ if(empty($this->options) || count($this->options)==0){
+ $this->options = explode(",", _XK_P_FULLTOOLBAR);
+ }
+ return $this->options;
+ }
+
+ function setOptions($options)
+ {
+ if ($options == 'small'){
+ $this->options = explode(",", _XK_P_SMALLTOOLBAR);
+ }elseif(is_array($options)){
+ $this->options = $options;
+ }
+ }
+
+ function getThemeCSS()
+ {
+ global $xoopsConfig;
+ if (getcss($xoopsConfig['theme_set']))return getcss($xoopsConfig['theme_set']);
+ else return '';
+ }
+
+ function setThemeCSS($themeCss)
+ {
+ $this->themeCss = $themeCss;
+ }
+
+ /**
+ * Prepare HTML for output
+ *
+ * @return string HTML
+ */
+ function render()
+ {
+ // include files
+ include_once XOOPS_ROOT_PATH . '' . $this->getUrl() . '/include/functions.inc.php';
+ static $koivi_js_loaded = false;
+ static $koivi_tabletools_loaded = false;
+
+ if(isset($GLOBALS["KOIVI_FONTLIST"])){
+ $this->setFonts($GLOBALS["KOIVI_FONTLIST"]);
+ }
+ $url = XOOPS_URL . '' . $this->getUrl();
+ $skinUrl = $url . '/skins/' . $this->getSkin();
+ $isie = checkBrowser();
+ $toggleMode = false;
+ $themeCss = false;
+ $colorPalette = false;
+ $extraDivs = '';
+
+ if (!$koivi_js_loaded) {
+ $form = '<script language="JavaScript" type="text/javascript" src="' . $url . '/include/js/cntextmenu.js"></script>';
+ $form .= '<script language="JavaScript" type="text/javascript" src="' . $url . '/include/js/editor.js"></script>';
+ $form .= '<script language="JavaScript" type="text/javascript" src="' . $url . '/include/js/xhtml.js"></script>';
+ $koivi_js_loaded = true;
+ } else {
+ $form = '';
+ }
+ if (in_array('createtable', $this->getOptions()) && $koivi_tabletools_loaded == false) {
+ $form .= '<script language="JavaScript" type="text/javascript" src="' . $url . '/include/js/table_tools.js"></script>';
+ $koivi_tabletools_loaded = true;
+ }
+
+ $form .= '<link href="' . $skinUrl . '/' . $this->getSkin() . '.css" rel="Stylesheet" type="text/css" />
+ <div id="alleditor' . $this->getName() . '" style="width:' . $this->getWidth() . ';border:1px solid silver;">
+ <div id="toolbar' . $this->getName() . '" class="' . $this->getSkin() . 'toolbarBackCell">';
+
+ if (in_array('floating', $this->getOptions())) {
+ $form .= ' <div class="' . $this->getSkin() . 'editorStatus">
+ <img alt="" src="' . $skinUrl . '/minimize.gif" onclick="XK_hideToolbar(\'' . $this->getName() . '\',\'' . $skinUrl . '\')" />
+ <img id="floatButton' . $this->getName() . '" alt="' . _XK_FLOAT . '" title="' . _XK_FLOAT . '" src="' . $skinUrl . '/floating.gif" onclick="XK_floatingToolbar(\'' . $this->getName() . '\',\'' . $this->getSkin() . '\')"/>
+ <img id="maximizeButton' . $this->getName() . '" alt="' . _XK_FLOAT . '" title="' . _XK_FLOAT . '" src="' . $skinUrl . '/fullscreen.gif" onclick="XK_maximizeEditor(\'' . $this->getName() . '\')"/>
+ </div>';
+ }
+
+ $form .= '<div id="buttons' . $this->getName() . '" class="' . $this->getSkin() . 'toolBar">';
+
+ foreach ($this->getOptions() as $tool) {
+ switch (strtolower($tool)) {
+ case "bold":
+ $form .= '<img alt="' . _XK_BOLD . '" title="' . _XK_BOLD . '" src="' . $skinUrl . '/bold.gif" onmousedown="XK_doTextFormat(\'bold\',\'\',\'' . $this->getName() . '\')" />';
+ break;
+
+ case "cellalign":
+ $form .= '<img alt="' . _XK_CELLALIGN . '" title="' . _XK_CELLALIGN . '" src="' . $skinUrl . '/cellalign.gif"/>';
+ $form .= '<img alt="' . _XK_CELLALIGN . '" title="' . _XK_CELLALIGN . '" id="cellpropbutton' . $this->getName() . '" src="' . $skinUrl . '/popup.gif" onclick="XK_useTableDivs(\'' . $this->getName() . '\',\'align\')"/>';
+ $extraDivs .= $this->_renderCellAlign();
+ break;
+
+ case "cellborders":
+ $form .= '<img alt="' . _XK_CELLPROPS . '" title="' . _XK_CELLPROPS . '" src="' . $skinUrl . '/cellborders.gif" onmousedown="XK_TTools(\'' . $this->getName() . '\',\'' . $url . '/dialogs.php?id=' . $this->getName() . '&dialog=cellProps&skin=' . $this->getSkin() . '&url=' . $this->getUrl() . '\',\'table\',400,260)"/>';
+ $form .= '<img alt="' . _XK_CELLALIGN . '" title="' . _XK_CELLALIGN . '" id="cbbutton' . $this->getName() . '" src="' . $skinUrl . '/popup.gif" onclick="XK_useTableDivs(\'' . $this->getName() . '\',\'borders\')"/>';
+ $extraDivs .= $this->_renderCellBorders();
+ break;
+
+ case "cellcolor":
+ $form .= '<img alt="' . _XK_FORECOLOR . '" id="cellcolor' . $this->getName() . '" title="' . _XK_FORECOLOR . '" src="' . $skinUrl . '/cellcolor.gif" onclick="XK_color(\'' . $this->getName() . '\',\'cellcolor\',\'cellcolor\')"/>';
+ $colorPalette = true;
+ break;
+
+ case "code":
+ $form .= '<img alt="' . _XK_CODE . '" title="' . _XK_CODE . '" src="' . $skinUrl . '/code.gif" onmousedown="XK_doTextFormat(\'Code\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "copy":
+ $form .= '<img alt="' . _XK_COPY . '" title="' . _XK_COPY . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'copy\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "createlink":
+ $form .= '<img alt="' . _XK_CREATELINK . '" title="' . _XK_CREATELINK . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'createlink\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "createtable":
+ $form .= '<img alt="' . _XK_INSERTTABLE . '" title="' . _XK_INSERTTABLE . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_openPopup(\'' . $url . '/dialogs.php?id=' . $this->getName() . '&dialog=table&url=' . $this->getUrl() . '\',\'table\',400,290)"/>';
+ $form .= '<img alt="' . _XK_CREATEQUICKTABLE . '" id="tablebutton' . $this->getName() . '" title="' . _XK_CREATEQUICKTABLE . '" src="' . $skinUrl . '/popup.gif" onclick="XK_showHideDiv(\'' . $this->getName() . '\',\'tablebutton\',\'tablepicker\')"/>';
+ $extraDivs .= $this->_renderQuickTable();
+ break;
+
+ case "cut":
+ $form .= '<img alt="' . _XK_CUT . '" title="' . _XK_CUT . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'cut\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "fontname":
+ $form .= '<select id="fontname' . $this->getName() . '" class="' . $this->getSkin() . 'selectInput" onchange="XK_doTextFormat(\'fontname\',this.options[this.selectedIndex].value,\'' . $this->getName() . '\')"><option value="">' . _XK_FONT . '</option>';
+ foreach ($this->getFonts() as $fontname => $font) {
+ $form .= '<option value="' . $font . '">' . $fontname . '</option>';
+ }
+ $form .= '</select>';
+
+ break;
+
+ case "fontsize":
+ $form .= '
+ <select id="fontsize' . $this->getName() . '" class="' . $this->getSkin() . 'selectInput" onchange="XK_doTextFormat(\'fontsize\',this.options[this.selectedIndex].value,\'' . $this->getName() . '\')"">
+ <option value="">' . _XK_FONT_SIZE . '</option>
+ <option value="-2">' . _XK_FONT_XSMALL . '</option>
+ <option value="-1">' . _XK_FONT_SMALL . '</option>
+ <option value="+0">' . _XK_FONT_MEDIUM . '</option>
+ <option value="+1">' . _XK_FONT_LARGE . '</option>
+ <option value="+2">' . _XK_FONT_XLARGE . '</option>
+ <option value="+4">' . _XK_FONT_XXLARGE . '</option>
+ </select>';
+ break;
+
+ case "forecolor":
+ $form .= '<img alt="' . _XK_FORECOLOR . '" id="forecolor' . $this->getName() . '" title="' . _XK_FORECOLOR . '" src="' . $skinUrl . '/forecolor.gif" onclick="XK_color(\'' . $this->getName() . '\',\'forecolor\',\'forecolor\')"/>';
+ $colorPalette = true;
+ break;
+
+ case "formatblock":
+ $form .= '
+ <select id="formatblock' . $this->getName() . '" class="' . $this->getSkin() . 'selectInput" onchange="XK_doTextFormat(\'formatblock\',this.options[this.selectedIndex].value,\'' . $this->getName() . '\')">
+ <option value="">' . _XK_FONT_FORMAT . '</option>
+ <option value="<p>">' . _XK_FONT_NONE . '</option>
+ <option value="<h1>">' . _XK_FONT_HEADING1 . '</option>
+ <option value="<h2>">' . _XK_FONT_HEADING2 . '</option>
+ <option value="<h3>">' . _XK_FONT_HEADING3 . '</option>
+ <option value="<h4>">' . _XK_FONT_HEADING4 . '</option>
+ <option value="<h5>">' . _XK_FONT_HEADING5 . '</option>
+ <option value="<h6>">' . _XK_FONT_HEADING6 . '</option>
+ <option value="<p>">' . _XK_FONT_PARAGRAPH . '</option>
+ <option value="<pre>">' . _XK_FONT_FORMATTED . '</option>
+ <option value="<address>">' . _XK_FONT_ADDRESS . '</option>
+ </select>';
+
+ break;
+
+ case "hilitecolor":
+ $form .= '<img alt="' . _XK_HILITECOLOR . '" id="hilitecolor' . $this->getName() . '" title="' . _XK_HILITECOLOR . '" src="' . $skinUrl . '/hilitecolor.gif" onclick="XK_color(\'' . $this->getName() . '\',\'hilitecolor\',\'hilitecolor\')"/>';
+ $colorPalette = true;
+ break;
+
+ case "imagemanager":
+ $form .= '<img alt="' . _XK_INSERTIMAGEM . '" title="' . _XK_INSERTIMAGEM . '" onmouseover="style.cursor=\'hand\'" onmousedown="javascript:openWithSelfMain(\'' . XOOPS_URL . '/imagemanager.php?target=' . $this->getName() . '&wysiwyg=1\',\'imgmanager\',400,430);" src="' . $skinUrl . '/imagemanager.gif"/>';
+ break;
+
+ case "imageproperties":
+ $form .= '<img alt="' . _XK_EDITIMAGE . '" title="' . _XK_EDITIMAGE . '" src="' . $skinUrl . '/imageprops.gif" onmousedown="XK_openPopup(\'' . $url . '/dialogs.php?id=' . $this->getName() . '&dialog=imageProps&url=' . $this->getUrl() . '&skin=' . $this->getSkin() . '\',\'table\',400,260)"/>';
+ break;
+
+ case "indent":
+ $form .= '<img alt="' . _XK_INDENT . '" title="' . _XK_INDENT . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'indent\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "inserthorizontalrule":
+ $form .= '<img alt="' . _XK_INSERTHORIZONTALRULE . '" title="' . _XK_INSERTHORIZONTALRULE . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'inserthorizontalrule\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case 'insertanchor':
+ $form .= '<img alt="' . _XK_INSERTANCHOR . '" title="' . _XK_INSERTANCHOR . '" src="' . $skinUrl . '/insertanchor.gif" onmousedown="XK_insertAnchor(\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "insertdate":
+ $form .= '<img alt="' . _XK_INSERTDATE . '" title="' . _XK_INSERTDATE . '" src="' . $skinUrl . '/insertdate.gif" onmousedown="XK_insertDate(\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "insertimage":
+ $form .= '<img alt="' . _XK_INSERTIMAGE . '" title="' . _XK_INSERTIMAGE . '" src="' . $skinUrl . '/insertimage.gif" onmousedown="XK_doTextFormat(\'insertimage\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "insertorderedlist":
+ $form .= '<img alt="' . _XK_INSERTORDEREDLIST . '" title="' . _XK_INSERTORDEREDLIST . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'insertorderedlist\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "insertunorderedlist":
+ $form .= '<img alt="' . _XK_INSERTUNORDEREDLIST . '" title="' . _XK_INSERTUNORDEREDLIST . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'insertunorderedlist\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "insertsymbols":
+ $form .= $this->_renderInsertSymbols();
+ break;
+
+ case "italic":
+ $form .= '<img alt="' . _XK_ITALIC . '" title="' . _XK_ITALIC . '" src="' . $skinUrl . '/italic.gif" onmousedown="XK_doTextFormat(\'italic\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "justifycenter":
+ $form .= '<img alt="' . _XK_JUSTIFYCENTER . '" title="' . _XK_JUSTIFYCENTER . '" src="' . $skinUrl . '/justifycenter.gif" onmousedown="XK_doTextFormat(\'justifycenter\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "justifyfull":
+ $form .= '<img alt="' . _XK_JUSTIFYFULL . '" title="' . _XK_JUSTIFYFULL . '" src="' . $skinUrl . '/justifyfull.gif" onmousedown="XK_doTextFormat(\'justifyfull\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "justifyleft":
+ $form .= '<img alt="' . _XK_JUSTIFYLEFT . '" title="' . _XK_JUSTIFYLEFT . '" src="' . $skinUrl . '/justifyleft.gif" onmousedown="XK_doTextFormat(\'justifyleft\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "justifyright":
+ $form .= '<img alt="' . _XK_JUSTIFYRIGHT . '" title="' . _XK_JUSTIFYRIGHT . '" src="' . $skinUrl . '/justifyright.gif" onmousedown="XK_doTextFormat(\'justifyright\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "ltr":
+ $form .= '<img alt="' . _XK_LEFTTORIGHT . '" title="' . _XK_LEFTTORIGHT . '" src="' . $skinUrl . '/ltr.gif" onmousedown="XK_textDirection(\'ltr\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "newline":
+ $form .= '<br />';
+ break;
+
+ case 'newparagraph':
+ if ($isie)$form .= '<input class="' . $this->getSkin() . 'checkbox" type="checkbox" alt="' . _XK_NEWPARAGRAPH . '" title="' . _XK_NEWPARAGRAPH . '" id="ptagenabled' . $this->getName() . '" onclick="XK_destroyPTag(\'' . $this->getName() . '\')">';
+ break;
+
+ case "outdent":
+ $form .= '<img alt="' . _XK_OUTDENT . '" title="' . _XK_OUTDENT . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'outdent\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "paste":
+ $form .= '<img alt="' . _XK_PASTE . '" title="' . _XK_PASTE . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'paste\',null,\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "pastespecial":
+ $form .= '<img alt="' . _XK_PASTESPECIAL . '" title="' . _XK_PASTESPECIAL . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="document.getElementById(\'iframe' . $this->getName() . '\').contentWindow.focus();openWithSelfMain(\'' . $url . '/dialogs.php?id=' . $this->getName() . '&skin=' . $this->getSkin() . '&dialog=pastespecial&url=' . $this->getUrl() . '\',\'pastespecial\',350,280);"/>';
+ break;
+
+ case 'print':
+ $form .= '<img alt="' . _XK_PRINT . '" title="' . _XK_PRINT . '" src="' . $skinUrl . '/print.gif" onmousedown="XK_print(\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "quote":
+ $form .= '<img alt="' . _XK_QUOTE . '" title="' . _XK_QUOTE . '" src="' . $skinUrl . '/quote.gif" onmousedown="XK_doTextFormat(\'Quote\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "redo":
+ $form .= '<img alt="' . _XK_REDO . '" title="' . _XK_REDO . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'redo\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "rtl":
+ $form .= '<img alt="' . _XK_RIGHTTOLEFT . '" title="' . _XK_RIGHTTOLEFT . '" src="' . $skinUrl . '/rtl.gif" onmousedown="XK_textDirection(\'rtl\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "separator":
+ $form .= '<img alt="|" src="' . $skinUrl . '/separator.gif"/>';
+ break;
+
+ case 'spellcheck':
+ $form .= '<img alt="' . _XK_SPELLCHECK . '" title="' . _XK_SPELLCHECK . '" src="' . $skinUrl . '/spellcheck.gif" onmousedown="XK_checkspell()"/>';
+ break;
+
+ case "strikethrough":
+ $form .= '<img alt="' . _XK_STRIKETHROUGH . '" title="' . _XK_STRIKETHROUGH . '" src="' . $skinUrl . '/strikethrough.gif" onmousedown="XK_doTextFormat(\'strikethrough\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "subscript":
+ $form .= '<img alt="' . _XK_SUBSCRIPT . '" title="' . _XK_SUBSCRIPT . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'subscript\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "superscript":
+ $form .= '<img alt="' . _XK_SUPERSCRIPT . '" title="' . _XK_SUPERSCRIPT . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'superscript\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "removeformat":
+ $form .= '<img alt="' . _XK_REMOVEFORMAT . '" title="' . _XK_REMOVEFORMAT . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'removeformat\',\'\',\'' . $this->getName() . '\')"/>';
+ $form .= '<img alt="' . _XK_REMOVE_DESC . '" title="' . _XK_REMOVE_DESC . '" id="rformatbutton' . $this->getName() . '" src="' . $skinUrl . '/popup.gif" onclick="XK_showHideDiv(\'' . $this->getName() . '\',\'rformatbutton\',\'RemoveFormat\')"/>';
+ $extraDivs .= $this->_renderCleanFormats();
+ break;
+
+ case "themecss":
+ $themeCss = true;
+ break;
+
+ case "tableprops":
+ $form .= '<img alt="' . _XK_TABLEPROPS . '" title="' . _XK_TABLEPROPS . '" src="' . $skinUrl . '/tableprops.gif" onmousedown="XK_TTools(\'' . $this->getName() . '\',\'' . $url . '/dialogs.php?id=' . $this->getName() . '&dialog=tableProps&skin=' . $this->getSkin() . '&url=' . $this->getUrl() . '\',\'table\',400,260)"/>';
+ $form .= '<img alt="' . _XK_TABLETOOLS . '" title="' . _XK_TABLETOOLS . '" id="tpropbutton' . $this->getName() . '" src="' . $skinUrl . '/popup.gif" onclick="XK_useTableOps(\'TableOps\',\'' . $this->getName() . '\')"/>';
+ $extraDivs .= $this->_renderTableProps();
+ break;
+
+ case "toggleborders":
+ $form .= '<img alt="' . _XK_TABLEBORDERS_TOGGLE . '" title="' . _XK_TABLEBORDERS_TOGGLE . '" src="' . $skinUrl . '/toggletableborders.gif" onmousedown="XK_toggleBorders(\'' . $this->getName() . '\',\'document.body\')"/>';
+ break;
+
+ case "togglemode":
+ $toggleMode = true;
+ break;
+
+ case "underline":
+ $form .= '<img alt="' . _XK_UNDERLINE . '" title="' . _XK_UNDERLINE . '" src="' . $skinUrl . '/underline.gif" onmousedown="XK_doTextFormat(\'underline\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "undo":
+ $form .= '<img alt="' . _XK_UNDO . '" title="' . _XK_UNDO . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'undo\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ case "unlink":
+ $form .= '<img alt="' . _XK_UNLINK . '" title="' . _XK_UNLINK . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'unlink\',\'\',\'' . $this->getName() . '\')"/>';
+ break;
+
+ default:
+ break;
+ }
+ }
+ $form .= '</div></div>
+ <iframe class="' . $this->getSkin() . 'wIframe" id="iframe' . $this->getName() . '"style="height:' . $this->getHeight() . ';" frameBorder="0"></iframe>
+ <textarea wrap=soft id="' . $this->getName() . '" name="' . $this->getName() . '" rows="1" cols="1" style="display:none; width:' . $this->getWidth() . '; height:' . $this->getHeight() . '">' . $this->getValue() . '</textarea>
+ <div class="' . $this->getSkin() . 'statusBar">
+ <div class="' . $this->getSkin() . 'smileysBar">' . $this->_renderWysiwygSmileys() . '</div>';
+
+ $form .= '<div class="' . $this->getSkin() . 'htmlBar">';
+ if ($toggleMode)$form .= '<div class="' . $this->getSkin() . 'htmlBar"><input type="checkbox" alt="' . _XK_TOGLE_MODE . '" title="' . _XK_TOGLE_MODE . '" onclick="XK_doToggleView(\'' . $this->getName() . '\')" />HTML</div>';
+ if ($themeCss)$form .= '<div class="' . $this->getSkin() . 'htmlBar"><input type="checkbox" alt="' . _XK_ENABLECSS_MODE . '" title="' . _XK_ENABLECSS_MODE . '" id="cssEnabled' . $this->getName() . '" onclick="XK_appendXoopsCss(\'' . $this->getName() . '\',\'' . $this->getThemeCSS() . '\')" />CSS </div>';
+ $form .= '</div>';
+ $form .= '</div>';
+ // Render additional DIV'S
+ if ($colorPalette) {
+ include_once XOOPS_ROOT_PATH . '' . $this->getUrl() . '/class/colorpalette.class.php';
+ $palette = new WysiwygColorPalette('XK_applyColor', $this->getName(), $url, $this->getSkin());
+ $extraDivs .= $palette->_renderColorPalette();
+ }
+
+ $extraDivs .= $this->_renderContextMenu();
+
+ $form .= $extraDivs;
+ $form .= '<input type="hidden" value="off" id="borderstoggle' . $this->getName() . '"/>';
+ $form .= '<img alt="" width="0" height="0" src="' . $url . '/skins/common/blank.gif" onload="XK_init(\'' . $this->getName() . '\',\'' . $isie . '\',\'' . $url . '\',\'' . $this->getDirection() . '\')"/>';
+ $form .= '</div>';
+ return $form;
+ }
+
+ function _renderWysiwygSmileys()
+ {
+ $myts = &MyTextSanitizer::getInstance();
+ $url = XOOPS_URL . '' . $this->getUrl();
+ $ret = '';
+ $db = &Database::getInstance();
+ $result = $db->query('SELECT * FROM ' . $db->prefix('smiles') . ' WHERE display=1');
+ while ($smiles = $db->fetchArray($result)) {
+ $ret .= '<img onmousedown="XK_InsertImage(\'' . $this->getName() . '\',\'' . XOOPS_UPLOAD_URL . '/' . htmlspecialchars($smiles["smile_url"], ENT_QUOTES) . '\',\'\');" src="' . XOOPS_UPLOAD_URL . '/' . htmlspecialchars($smiles["smile_url"], ENT_QUOTES) . '" alt="" />';
+ }
+
+ $ret .= ' [<a href="#moresmiley" onmousedown="javascript:openWithSelfMain(\'' . $url . '/dialogs.php?id=' . $this->getName() . '&dialog=smilies&url=' . $this->getUrl() . '\',\'smilies\',300,475);">' . _MORE . '</a>]';
+ return $ret;
+ }
+
+ function _renderTableProps()
+ {
+ $url = XOOPS_URL . '' . $this->getUrl();
+ $skinUrl = $url . '/skins/' . $this->getSkin();
+ $ret = '
+ <div name="XoopsKToolbarDivs" id="TableOps' . $this->getName() . '" class="' . $this->getSkin() . 'tablePropsD" style="display:none;">
+ <img title="' . _XK_INSERTCELL . '" alt="' . _XK_INSERTCELL . '" src="' . $skinUrl . '/insertcell.gif" onmousedown="XK_useTableOps(\'insertCell\',\'' . $this->getName() . '\');" /><br />
+ <img title="' . _XK_DELCELL . '" alt="' . _XK_DELCELL . '" src="' . $skinUrl . '/delcell.gif" onmousedown="XK_useTableOps(\'deleteCell\',\'' . $this->getName() . '\');" /><br />
+
+ <img title="' . _XK_INSERTROW . '" alt="' . _XK_INSERTROW . '" src="' . $skinUrl . '/insertrow.gif" onmousedown="XK_useTableOps(\'insertRow\',\'' . $this->getName() . '\');" /><br />
+ <img title="' . _XK_DELROW . '" alt="' . _XK_DELROW . '" src="' . $skinUrl . '/delrow.gif" onmousedown="XK_useTableOps(\'deleteRow\',\'' . $this->getName() . '\');" /><br />
+ <img title="' . _XK_MOREROWSPAN . '" alt="' . _XK_MOREROWSPAN . '" src="' . $skinUrl . '/morerowspan.gif" onmousedown="XK_useTableOps(\'increaseRowSpan\',\'' . $this->getName() . '\');" /><br />
+ <img title="' . _XK_LESSROWSPAN . '" alt="' . _XK_LESSROWSPAN . '" src="' . $skinUrl . '/lessspan.gif" onmousedown="XK_useTableOps(\'decreaseRowSpan\',\'' . $this->getName() . '\');" /><br />
+
+ <img title="' . _XK_INSERTCOL . '" alt="' . _XK_INSERTCOL . '" src="' . $skinUrl . '/insertcol.gif" onmousedown="XK_useTableOps(\'insertCol\',\'' . $this->getName() . '\');" /><br />
+ <img title="' . _XK_DELCOL . '" alt="' . _XK_DELCOL . '" src="' . $skinUrl . '/delcol.gif" onmousedown="XK_useTableOps(\'deleteCol\',\'' . $this->getName() . '\');" /><br />
+ <img title="' . _XK_MORECOLSPAN . '" alt="' . _XK_MORECOLSPAN . '" src="' . $skinUrl . '/morespan.gif" onmousedown="XK_useTableOps(\'increaseSpan\',\'' . $this->getName() . '\');" /><br />
+ <img title="' . _XK_LESSCOLSPAN . '" alt="' . _XK_LESSCOLSPAN . '" src="' . $skinUrl . '/lessspan.gif" onmousedown="XK_useTableOps(\'decreaseSpan\',\'' . $this->getName() . '\');" />
+ </div>
+ ';
+
+ return $ret;
+ }
+
+ function _renderCellAlign()
+ {
+ $url = XOOPS_URL . '' . $this->getUrl();
+ $skinUrl = $url . '/skins/' . $this->getSkin();
+ $mouseover = 'onmouseover="this.style.background=\'#B6BDD2\';" onmouseout="this.style.background=\'#FFFFFF\';"';
+
+ $ret = '<div name="XoopsKToolbarDivs" class="' . $this->getSkin() . 'cellAlignD" id="CellAlign' . $this->getName() . '" style="display: none;">
+ <table border="0" cellspacing="8" cellpadding="0" style="width:80px;">
+ <tr>
+ <td ' . $mouseover . ' ><img alt="' . _XK_CELLALIGNLEFTTOP . '" title="' . _XK_CELLALIGNLEFTTOP . '" src="' . $skinUrl . '/lefttop.gif" onmousedown="XK_cellAlign(\'' . $this->getName() . '\',\'left\',\'top\')"/></td>
+ <td ' . $mouseover . '><img alt="' . _XK_CELLALIGNCENTERTOP . '" title="' . _XK_CELLALIGNCENTERTOP . '" src="' . $skinUrl . '/centertop.gif" onmousedown="XK_cellAlign(\'' . $this->getName() . '\',\'center\',\'top\')"/></td>
+ <td ' . $mouseover . '><img alt="' . _XK_CELLALIGNRIGHTTOP . '" title="' . _XK_CELLALIGNRIGHTTOP . '" src="' . $skinUrl . '/righttop.gif" onmousedown="XK_cellAlign(\'' . $this->getName() . '\',\'right\',\'top\')"/></td>
+ </tr>
+ <tr>
+ <td ' . $mouseover . '><img alt="' . _XK_CELLALIGNLEFTMIDDLE . '" title="' . _XK_CELLALIGNLEFTMIDDLE . '" src="' . $skinUrl . '/leftmiddle.gif" onmousedown="XK_cellAlign(\'' . $this->getName() . '\',\'left\',\'middle\')"/></td>
+ <td ' . $mouseover . '><img alt="' . _XK_CELLALIGNCENTERMIDDLE . '" title="' . _XK_CELLALIGNCENTERMIDDLE . '" src="' . $skinUrl . '/centermiddle.gif" onmousedown="XK_cellAlign(\'' . $this->getName() . '\',\'center\',\'middle\')"/></td>
+ <td ' . $mouseover . '><img alt="' . _XK_CELLALIGNRIGHTMIDDLE . '" title="' . _XK_CELLALIGNRIGHTMIDDLE . '" src="' . $skinUrl . '/rightcenter.gif" onmousedown="XK_cellAlign(\'' . $this->getName() . '\',\'right\',\'middle\')"/></td>
+ </tr>
+ <tr>
+ <td ' . $mouseover . '><img alt="' . _XK_CELLALIGNLEFTBOTTOM . '" title="' . _XK_CELLALIGNLEFTBOTTOM . '" src="' . $skinUrl . '/leftbottom.gif" onmousedown="XK_cellAlign(\'' . $this->getName() . '\',\'left\',\'bottom\')"/></td>
+ <td ' . $mouseover . '><img alt="' . _XK_CELLALIGNCENTERBOTTOM . '" title="' . _XK_CELLALIGNCENTERBOTTOM . '" src="' . $skinUrl . '/centerbottom.gif" onmousedown="XK_cellAlign(\'' . $this->getName() . '\',\'center\',\'bottom\')"/></td>
+ <td ' . $mouseover . '><img alt="' . _XK_CELLALIGNRIGHTBOTTOM . '" title="' . _XK_CELLALIGNRIGHTBOTTOM . '" src="' . $skinUrl . '/rightbottom.gif" onmousedown="XK_cellAlign(\'' . $this->getName() . '\',\'right\',\'bottom\')"/></td>
+ </tr>
+ </table>
+ </div>';
+
+ return $ret;
+ }
+
+ function _renderCleanFormats()
+ {
+ $url = XOOPS_URL . '' . $this->getUrl();
+ $skinUrl = $url . '/skins/' . $this->getSkin();
+ $mouseover = 'onmouseover="this.style.background=\'#B6BDD2\';" onmouseout="this.style.background=\'#FFFFFF\';"';
+
+ $ret = '<div name="XoopsKToolbarDivs" class="' . $this->getSkin() . 'ClearFormatsD" id="RemoveFormat' . $this->getName() . '" style="display: none;">
+ <div ' . $mouseover . ' onmousedown="XK_removeFormat(\'' . $this->getName() . '\',\'lineBreaks\');" class="' . $this->getSkin() . 'DivOption">' . _XK_REMOVE_LINEBREAKS . '</div>
+ <div ' . $mouseover . ' onmousedown="XK_removeFormat(\'' . $this->getName() . '\',\'span\');" class="' . $this->getSkin() . 'DivOption">' . _XK_REMOVE_SPANF . '</div>
+ <div ' . $mouseover . ' onmousedown="XK_removeFormat(\'' . $this->getName() . '\',\'font\');" class="' . $this->getSkin() . 'DivOption">' . _XK_REMOVE_FONTF . '</div>
+ <div ' . $mouseover . ' onmousedown="XK_removeFormat(\'' . $this->getName() . '\',\'word\');" class="' . $this->getSkin() . 'DivOption">' . _XK_REMOVE_WORDF . '</div>
+ <div ' . $mouseover . ' onmousedown="XK_removeFormat(\'' . $this->getName() . '\',\'empty\');" class="' . $this->getSkin() . 'DivOption">' . _XK_REMOVE_EMPTYF . '</div>
+ <div ' . $mouseover . ' onmousedown="XK_removeFormat(\'' . $this->getName() . '\',\'all\');" class="' . $this->getSkin() . 'DivOption">' . _XK_REMOVE_ALLF . '</div>
+ </div>';
+
+ return $ret;
+ }
+
+ function _renderCellBorders()
+ {
+ $url = XOOPS_URL . '' . $this->getUrl();
+ $skinUrl = $url . '/skins/' . $this->getSkin();
+ $ret = '<div name="XoopsKToolbarDivs" class="' . $this->getSkin() . 'cellBordersD" style="display:none;" id="CellBorders' . $this->getName() . '">
+ <table border="0" cellspacing="8" cellpadding="0" width=100%>
+ <tr >
+ <td onmousedown="XK_quickBorders(\'' . $this->getName() . '\',\'all\',\'Black\')" style="border:1px solid black;" onmouseover="this.style.background=\'#B6BDD2\';" onmouseout="this.style.background=\'#FFFFFF\';"> </td>
+ <td onmousedown="XK_quickBorders(\'' . $this->getName() . '\',\'left\',\'Black\')" style="border:1px dotted silver; border-left:1px solid black;" onmouseover="this.style.background=\'#B6BDD2\';" onmouseout="this.style.background=\'#FFFFFF\';"> </td>
+ <td onmousedown="XK_quickBorders(\'' . $this->getName() . '\',\'right\',\'Black\')" style="border:1px dotted silver;border-right:1px solid black;" onmouseover="this.style.background=\'#B6BDD2\';" onmouseout="this.style.background=\'#FFFFFF\';"> </td>
+ </tr>
+ <tr >
+ <td onmousedown="XK_quickBorders(\'' . $this->getName() . '\',\'none\',\'Black\')" style="border:1px dotted silver;" onmouseover="this.style.background=\'#B6BDD2\';" onmouseout="this.style.background=\'#FFFFFF\';"> </td>
+ <td onmousedown="XK_quickBorders(\'' . $this->getName() . '\',\'top\',\'Black\')" style="border:1px dotted silver;border-top:1px solid black;" onmouseover="this.style.background=\'#B6BDD2\';" onmouseout="this.style.background=\'#FFFFFF\';"> </td>
+ <td onmousedown="XK_quickBorders(\'' . $this->getName() . '\',\'bottom\',\'Black\')" style="border:1px dotted silver;border-bottom:1px solid black;" onmouseover="this.style.background=\'#B6BDD2\';" onmouseout="this.style.background=\'#FFFFFF\';"> </td>
+ </tr>
+ </table>
+ </div>';
+
+ return $ret;
+ }
+
+ function _renderContextMenu()
+ {
+ $url = XOOPS_URL . '' . $this->getUrl();
+ $skinUrl = $url . '/skins/' . $this->getSkin();
+
+ $mouseover = 'onmouseover="this.style.background=\'#B6BDD2\';" onmouseout="this.style.background=\'none\';"';
+
+ $ret = '<div name="XoopsKToolbarDivs" id="xkcontextmenu' . $this->getName() . '" class="' . $this->getSkin() . 'contextMenu" style="display:none;">';
+
+ $ret .= ' <div ' . $mouseover . ' onmousedown="this.style.background=\'none\';XK_doTextFormat(\'cut\',\'\',\'' . $this->getName() . '\')" ><img alt="" src="' . $skinUrl . '/cut.gif" />' . _XK_CUT . '</div>
+ <div ' . $mouseover . ' onmousedown="this.style.background=\'none\';XK_doTextFormat(\'copy\',\'\',\'' . $this->getName() . '\')" ><img alt="" src="' . $skinUrl . '/copy.gif" />' . _XK_COPY . '</div>
+ <div ' . $mouseover . ' onmousedown="this.style.background=\'none\';XK_doTextFormat(\'paste\',\'\',\'' . $this->getName() . '\')" ><img alt="" src="' . $skinUrl . '/paste.gif" />' . _XK_PASTE . '</div>';
+
+ $ret .= ' <div class="' . $this->getSkin() . 'contextLast" ' . $mouseover . ' onmousedown="this.style.background=\'none\';XK_doTextFormat(\'removeformat\',\'\',\'' . $this->getName() . '\')" ><img alt="" src="' . $skinUrl . '/removeformat.gif"/>' . _XK_REMOVEFORMAT . '</div>
+ <div id="xklinkcontext' . $this->getName() . '" style="display:none;" class="' . $this->getSkin() . 'contextLast" ' . $mouseover . ' onmousedown="this.style.background=\'none\';XK_doTextFormat(\'unlink\',\'\',\'' . $this->getName() . '\')" ><img alt="" src="' . $skinUrl . '/unlink.gif" />' . _XK_UNLINK . '</div>
+ <div id="xkimagecontext' . $this->getName() . '" class="' . $this->getSkin() . 'contextLast" ' . $mouseover . ' style="display:none;" onmousedown="this.style.background=\'none\';XK_openPopup(\'' . $url . '/dialogs.php?id=' . $this->getName() . '&dialog=imageProps&url=' . $this->getUrl() . '&skin=' . $this->getSkin() . '\',\'table\',400,260)"><img alt="" src="' . $skinUrl . '/imageprops.gif" />' . _XK_EDITIMAGE . '</div>
+ <div id="xktablecontext' . $this->getName() . '" style="display:none;">
+
+ <div ' . $mouseover . ' onmousedown="this.style.background=\'none\';XK_TTools(\'' . $this->getName() . '\',\'' . $url . '/dialogs.php?id=' . $this->getName() . '&dialog=tableProps&skin=' . $this->getSkin() . '&url=' . $this->getUrl() . '\',\'table\',400,260)" ><img alt="" " src="' . $skinUrl . '/tableprops.gif" />' . _XK_TABLEPROPS . '</div>
+ <div class="' . $this->getSkin() . 'contextLast" ' . $mouseover . ' onmousedown="this.style.background=\'none\';XK_TTools(\'' . $this->getName() . '\',\'' . $url . '/dialogs.php?id=' . $this->getName() . '&dialog=cellProps&skin=' . $this->getSkin() . '&url=' . $this->getUrl() . '\',\'table\',400,260)" ><img alt="" src="' . $skinUrl . '/cellborders.gif" />' . _XK_CELLPROPS . '</div>
+
+ <div ' . $mouseover . ' onmousedown="this.style.background=\'none\';XK_useTableOps(\'insertCell\',\'' . $this->getName() . '\');" ><img alt="" src="' . $skinUrl . '/insertcell.gif" />' . _XK_INSERTCELL . '</div>
+ <div class="' . $this->getSkin() . 'contextLast" ' . $mouseover . ' onmousedown="this.style.background=\'none\';XK_useTableOps(\'deleteCell\',\'' . $this->getName() . '\');" ><img alt="" src="' . $skinUrl . '/delcell.gif" />' . _XK_DELCELL . '</div>
+
+ <div ' . $mouseover . ' onmousedown="this.style.background=\'none\';XK_useTableOps(\'insertRow\',\'' . $this->getName() . '\');" ><img alt="" src="' . $skinUrl . '/insertrow.gif" />' . _XK_INSERTROW . '</div>
+ <div ' . $mouseover . ' onmousedown="this.style.background=\'none\';XK_useTableOps(\'deleteRow\',\'' . $this->getName() . '\');" ><img alt="" src="' . $skinUrl . '/delrow.gif" />' . _XK_DELROW . '</div>
+ <div ' . $mouseover . ' onmousedown="this.style.background=\'none\';XK_useTableOps(\'increaseRowSpan\',\'' . $this->getName() . '\');" ><img alt="" src="' . $skinUrl . '/morerowspan.gif" />' . _XK_MOREROWSPAN . '</div>
+ <div class="' . $this->getSkin() . 'contextLast" ' . $mouseover . ' onmousedown="this.style.background=\'none\';XK_useTableOps(\'decreaseRowSpan\',\'' . $this->getName() . '\');" ><img alt="" src="' . $skinUrl . '/lessspan.gif" />' . _XK_LESSROWSPAN . '</div>
+
+ <div ' . $mouseover . ' onmousedown="this.style.background=\'none\';XK_useTableOps(\'insertCol\',\'' . $this->getName() . '\');" ><img alt="" src="' . $skinUrl . '/insertcol.gif" />' . _XK_INSERTCOL . '</div>
+ <div ' . $mouseover . ' onmousedown="this.style.background=\'none\';XK_useTableOps(\'deleteCol\',\'' . $this->getName() . '\');" ><img alt="" src="' . $skinUrl . '/delcol.gif" />' . _XK_DELCOL . '</div>
+ <div ' . $mouseover . ' onmousedown="this.style.background=\'none\';XK_useTableOps(\'increaseSpan\',\'' . $this->getName() . '\');" ><img alt="" src="' . $skinUrl . '/morespan.gif" />' . _XK_MORECOLSPAN . '</div>
+ <div class="' . $this->getSkin() . 'contextLast" ' . $mouseover . ' onmousedown="this.style.background=\'none\';XK_useTableOps(\'decreaseSpan\',\'' . $this->getName() . '\');" ><img alt="" src="' . $skinUrl . '/lessspan.gif" />' . _XK_LESSCOLSPAN . '</div>
+ </div>';
+ $ret .= '</div>';
+
+ return $ret;
+ }
+
+ function _renderQuickTable()
+ {
+ $url = XOOPS_URL . '' . $this->getUrl();
+ $ret = '<div name="XoopsKToolbarDivs" class="' . $this->getSkin() . 'quickTableD" style=" display:none; " id="tablepicker' . $this->getName() . '">';
+ $ret .= '<table style="width:80px;" >';
+ for ($i = 1;$i < 8;$i++) {
+ $ret .= '<tr>';
+
+ for ($j = 1;$j < 8;$j++) {
+ $ret .= '<td class=\'' . $this->getSkin() . 'tdPicker\' id="' . $this->getName() . '-' . $i . '-' . $j . '" bgcolor="#FFFFFF" onmouseover="XK_tableOver(\'' . $this->getName() . '\',\'' . $i . '\',\'' . $j . '\')" onmouseout="XK_tableOut(\'' . $this->getName() . '\',\'' . $i . '\',\'' . $j . '\')" onmousedown="XK_tableClick(\'' . $this->getName() . '\',\'' . $i . '\',\'' . $j . '\')"><img alt="" width="5" height="5" src="' . $url . '/skins/common/blank.gif" /></td>';
+ }
+
+ $ret .= '</tr>';
+ }
+ $ret .= '</table></div>';
+ return $ret;
+ }
+
+ function _renderInsertSymbols()
+ {
+ $url = XOOPS_URL . '' . $this->getUrl();
+ $symbols = Array("{", "|", "}", "~", "€", "‘", "’", "“", "”", "–", "—", "¡", "¢", "£", "¤", "¥", "¦", "§", "¨", "©", "ª", "«", "¬", "®", "¯", "°", "±", "²", "³", "´", "µ", "¶", "·", "¸", "¹", "º", "»", "¼", "½", "¾", "¿", "À", "Á", "Â", "Ã", "Ä", "Å", "Æ", "Ç", "È", "É", "Ê", "Ë", "Ì", "Í", "Î", "Ï", "Ð", "Ñ", "Ò", "Ó", "Ô", "Õ", "Ö", "×", "Ø", "Ù", "Ú", "Û", "Ü", "Ý", "Þ", "ß", "à", "á", "â", "ã", "ä", "å", "æ", "ç", "è", "é", "ê", "ë", "ì", "í", "î", "ï", "ð"!
, "ñ", "ò", "ó", "ô", "õ", "ö", "÷", "ø", "ù", "ú", "û", "ü", "ü", "ý", "þ", "ÿ") ;
+ $length = sizeof($symbols);
+
+ $i = 0;
+ $ret = ' <select id="insertsymbol' . $this->getName() . '" class="' . $this->getSkin() . 'selectInput" name="select' . $this->getName() . '" onchange=\'XK_insertSymbol(this.options[this.selectedIndex].value, "' . $this->getName() . '")\'>';
+ $ret .= '<option value="" selected="selected">' . _XK_SYMBOLS . '</option>';
+ while ($i < $length) {
+ $ret .= '<option value="' . $symbols[$i] . '">' . $symbols[$i] . '</option>';
+ $i++;
+ }
+ $ret .= '</select>';
+ return $ret;
+ }
+ /**
+ * Check if compatible
+ *
+ * @return
+ */
+ function isCompatible()
+ {
+ if ( !is_readable(XOOPS_ROOT_PATH . _XK_P_PATH. "/include/functions.inc.php")) {
+ return false;
+ }
+ include_once(XOOPS_ROOT_PATH . _XK_P_PATH. "/include/functions.inc.php");
+ return checkBrowser(false);
+ }
+}
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/formwysiwygtextarea.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/I.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/I.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/L.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/L.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/Link.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/Link.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/Lminus.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/Lminus.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/Lplus.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/Lplus.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/T.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/T.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/Tminus.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/Tminus.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/Tplus.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/Tplus.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/blank.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/blank.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/class.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/class.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/classFolder.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/classFolder.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/classGhost.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/classGhost.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/error.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/error.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/extends.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/extends.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/file.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/file.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/folderClosed.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/folderClosed.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/folderOpened.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/folderOpened.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/goTop.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/goTop.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/help-book.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/help-book.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/helpIndex.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/helpIndex.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/iconClass.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/iconClass.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/iconFile.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/iconFile.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/iconGhostClass.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/iconGhostClass.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/methodConstructor.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/methodConstructor.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/methodDestructor.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/methodDestructor.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/methodPrivate.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/methodPrivate.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/methodProtected.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/methodProtected.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/methodPublic.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/methodPublic.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/minus.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/minus.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/msgError.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/msgError.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/msgFatalError.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/msgFatalError.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/msgHint.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/msgHint.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/msgInformation.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/msgInformation.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/msgWarning.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/msgWarning.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/plus.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/plus.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/propertyPrivate.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/propertyPrivate.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/propertyProtected.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/propertyProtected.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/propertyPublic.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/propertyPublic.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/spacer.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/images/spacer.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/functions.inc.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/functions.inc.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/functions.inc.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,125 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+/*
+function getMainfile($url)
+{
+
+ $mpath='';
+ for ($i=0;$i<strlen($url);$i++)
+ {
+ if ($url[$i]=='/')$mpath.='../';
+ }
+ return $mpath.'mainfile.php';
+}
+
+function getLanguage($url)
+{
+ global $xoopsConfig;
+ if(file_exists(XOOPS_ROOT_PATH.''.$url.'/language/'.$xoopsConfig['language'].'.php'))
+ return ''.XOOPS_ROOT_PATH.''.$url.'/language/'.$xoopsConfig['language'].'.php';
+ else return ''.XOOPS_ROOT_PATH.''.$url.'/language/english.php';
+}
+
+
+function CheckBrowser($get_isie=true)
+{
+ global $_SERVER;
+
+ $comp=false;
+ $isie=false;
+
+ if(eregi("msie",$_SERVER['HTTP_USER_AGENT']) && !eregi("opera",$_SERVER['HTTP_USER_AGENT']) )
+ {
+ $val = explode(" ",stristr($_SERVER['HTTP_USER_AGENT'],"msie"));
+ if((float)str_replace(";","",$val[1])>=5.5)$comp=true;
+ $isie=true;
+ }
+ elseif(eregi("mozilla",$_SERVER['HTTP_USER_AGENT']) && eregi("rv:[0-9]\.[0-9]\.[0-9]",$_SERVER['HTTP_USER_AGENT']) && !eregi("netscape",$_SERVER['HTTP_USER_AGENT']))
+ {
+ $val = explode(" ",stristr($_SERVER['HTTP_USER_AGENT'],"rv:"));
+ eregi("rv:[0-9]\.[0-9]\.[0-9]",$_SERVER['HTTP_USER_AGENT'],$val);
+ $version = str_replace("rv:","",$val[0]);
+ if ($version>1.3)$comp=true;
+ }
+ elseif(eregi("mozilla",$_SERVER['HTTP_USER_AGENT']) && eregi("rv:[0-9].[0-9][a-b]",$_SERVER['HTTP_USER_AGENT']) && !eregi("netscape",$_SERVER['HTTP_USER_AGENT']))
+ {
+ $val = explode(" ",stristr($_SERVER['HTTP_USER_AGENT'],"rv:"));
+ eregi("rv:[0-9].[0-9][a-b]",$_SERVER['HTTP_USER_AGENT'],$val);
+ $version = str_replace("rv:","",$val[0]);
+ if ($version>1.3)$comp=true;
+ }
+ elseif(eregi("netscape",$_SERVER['HTTP_USER_AGENT']))
+ {
+ $val = explode("Netscape/",$_SERVER['HTTP_USER_AGENT']);
+ $version = str_replace(" (ax)","",$val[1]);
+ if($version>=7.1)$comp=true;
+ }
+
+ if($get_isie)return($isie);
+ else return $comp;
+}*/
+
+function CheckBrowser($get_isie=true)
+{
+ global $_SERVER;
+
+ $comp=false;
+ $isie=false;
+
+ if(eregi("opera",$_SERVER['HTTP_USER_AGENT']))
+ {
+ $comp=false;
+ $isie=false;
+ }
+ elseif(eregi("msie",$_SERVER['HTTP_USER_AGENT']))
+ {
+ $val = explode(" ",stristr($_SERVER['HTTP_USER_AGENT'],"msie"));
+ if((float)str_replace(";","",$val[1])>=5.5)$comp=true;
+ $isie=true;
+ }
+ elseif(eregi("mozilla",$_SERVER['HTTP_USER_AGENT']))
+ {
+ $comp=true;
+ $isie=false;
+ }
+ elseif(eregi("netscape",$_SERVER['HTTP_USER_AGENT']))
+ {
+ $val = explode("Netscape/",$_SERVER['HTTP_USER_AGENT']);
+ $version = str_replace(" (ax)","",$val[1]);
+ if($version>=7.1)$comp=true;
+ $isie=false;
+ }
+
+ if($get_isie)return($isie);
+ else return $comp;
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/functions.inc.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/cntextmenu.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/cntextmenu.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/cntextmenu.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,108 @@
+/*
+* Samuels [Xoops Project]
+*
+*
+// $Id: cntextmenu.js,v 1.1.2.1 2005/06/04 02:11:53 phppp Exp $
+*
+*/
+//Simple class to handle context menus
+
+function XK_contextMenu(id)
+{
+ this.id=id;
+ this.menu=document.getElementById("xkcontextmenu"+id);
+ this.editor=document.getElementById("iframe"+id);
+ var self = this;
+
+ XK_attachEvent(this.editor.contentWindow.document,"contextmenu", function(event){return self.show(isie?self.editor.contentWindow.event:event)});
+};
+
+XK_contextMenu.prototype.visible = function()
+{
+ if (this.menu.style.display!="none")return true;
+ else return false;
+};
+
+XK_contextMenu.prototype.show = function(e)
+{
+ this.visible=true;
+ this.menu.style.display="block";
+
+ //set menu position
+ this.setPos(e);
+
+ //set the visible options
+ this.setOptions(e);
+
+ //stop event propagation
+ XK_cancelBubble(e);
+};
+
+XK_contextMenu.prototype.setPos = function(e)
+{
+ if (e.pageX || e.pageY)
+ {
+ posx = e.pageX;
+ posy = e.pageY;
+ }
+ else if (e.clientX || e.clientY){
+ posx = e.clientX;
+ posy = e.clientY;
+ if (isie){
+ posx += document.body.scrollLeft;
+ posy += document.body.scrollTop;
+ }
+ }
+
+ //get real position
+ posx=posx+XK_getOffsetLeft(this.editor);
+ posy=posy+XK_getOffsetTop(this.editor);
+ if(!isie)posy-=this.editor.contentWindow.document.body.scrollTop;
+
+ //make sure it fits
+ if ( posx+this.menu.offsetWidth > document.body.clientWidth ) posx -= this.menu.offsetWidth ;
+ //if ( posy+this.menu.offsetHeight > document.body.clientHeight ) posy -= this.menu.offsetHeight ;
+
+ // posx and posy contain the mouse position relative to the document
+ this.menu.style.left=posx+"px";
+ this.menu.style.top=posy+"px";
+};
+
+XK_contextMenu.prototype.setOptions = function(e)
+{
+ //set default visibility to all options
+ this.refresh();
+
+ var element=isie?e.srcElement:e.target;
+
+ //show options depending the context
+ while (element)
+ {
+ tag=element.tagName?element.tagName.toLowerCase():'';
+ //img
+ if(tag =='img'&&(XK_getImg(this.id)!=null)){this.setOptionVisible("xkimagecontext");return;}
+
+ //table
+ if(tag =='table')this.setOptionVisible("xktablecontext");
+
+ //link
+ if(tag =='a')this.setOptionVisible("xklinkcontext");
+
+ element = element.parentNode ;
+ }
+};
+
+XK_contextMenu.prototype.setOptionVisible = function(optionId)
+{
+ document.getElementById(optionId+this.id).style.display="block";
+};
+XK_contextMenu.prototype.setOptionHidden = function(optionId)
+{
+ document.getElementById(optionId+this.id).style.display="none";
+};
+XK_contextMenu.prototype.refresh = function()
+{
+ this.setOptionHidden("xkimagecontext");
+ this.setOptionHidden("xktablecontext");
+ this.setOptionHidden("xklinkcontext");
+};
\ No newline at end of file
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/dialogs.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/dialogs.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/dialogs.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,530 @@
+/*
+* Samuels [Xoops Project]
+* based on Justin Koivisto [W.A. Fisher Interactive] Koivi editor
+*
+*
+// $Id: dialogs.js,v 1.1.2.1 2005/06/04 02:11:53 phppp Exp $
+*
+*/
+
+window.opener = window.opener?window.opener:window.dialogArguments;
+
+function SelectTab(div,divContent,skin)
+{
+ if (div.className==skin+'selectedTab')return;
+ tags = document.getElementsByTagName('div');
+ for(i = 0; i<tags.length; i++)
+ {
+ if (tags[i].className==skin+'selectedTab')
+ {
+ tags[i].className=skin+'notSelectedTab';
+ div.className=skin+'selectedTab';
+ }
+ else if(tags[i].parentNode.className==skin+'downTabContainer')
+ {
+ tags[i].style.display="none";
+ }
+
+ }
+ document.getElementById(divContent).style.display="";
+ return;
+}
+
+function XK_doClean(option)
+{
+ var doc=document.getElementById('iframe').contentWindow;
+ var text=doc.document.body.innerHTML;
+ if(option=='word')text=window.opener.XK_cleanWORD(text);
+ else text= text.replace(/<\/?[^>]*>/gi,'');
+ doc.document.body.innerHTML=text;
+};
+
+function XK_updateIframe(id)
+{
+ var doc=document.getElementById('iframe').contentWindow;
+ html=doc.document.body.innerHTML;
+ window.opener.XK_insertHTML(html,id);
+ if(document.getElementById('checkClose').checked)window.close();
+ else window.focus();
+};
+
+function XK_disableUrlTextField(value)
+{
+ var urlSelect=document.getElementById('url');
+ var openSelect=document.getElementById('open');
+
+ if (value!=''){urlSelect.disabled=true;openSelect.disabled=true;}
+ else{ urlSelect.disabled=false;openSelect.disabled=false;}
+
+};
+
+function sendSmilie(id,src)
+{
+ window.opener.XK_InsertImage(id,src,'');
+ window.close();
+};
+
+//table
+
+function sendTable(id)
+{
+ var table = new Object();
+ table["rows"] = document.getElementById('rows').value;
+ table["columns"] = document.getElementById('columns').value;
+ table["width"] = document.getElementById('width_value').value;
+ table["height"] = document.getElementById('height_value').value;
+ table["border"] = document.getElementById('border').value;
+ table["spacing"] = document.getElementById('cell_spacing').value;
+ table["padding"] = document.getElementById('cell_padding').value;
+ window.opener.XK_createTable(id,table);
+ window.close();
+};
+
+//table props
+function sendTableProps(id)
+{
+ var table=new Object();
+ table=tableValues();
+ window.opener.XK_tableProp(id,table);
+ window.close();
+};
+
+function tableValues()
+{
+ var table = new Object();
+
+ table["width"] = document.getElementById('width').value;
+ table["height"] = document.getElementById('height').value;
+ table["border"] = document.getElementById('border').value;
+
+ table["bgColor"] = document.getElementById('bgColor').value;
+ table["backgroundImage"] = document.getElementById('backgroundImage').value;
+ table["borderColor"] = document.getElementById('bordertColor').value;
+
+ table["cellSpacing"] = document.getElementById('spacing').value;
+ table["cellPadding"] = document.getElementById('padding').value;
+
+ table["className"] = document.getElementById('class').value;
+
+ table["collapse"] = (document.getElementById('collapse').checked)?"collapse":"";
+
+ return table;
+};
+
+
+
+function initTableProps(id)
+{
+ var table = window.opener.XK_tableProp(id,null);
+ if (table.width==null)window.close();
+ document.getElementById('width').value = table.width;
+ document.getElementById('height').value = (table.height)?table.height:'';
+ document.getElementById('border').value = table.border;
+ document.getElementById('spacing').value = table.cellSpacing;
+ document.getElementById('padding').value = table.cellPadding;
+ document.getElementById('bgColor').value = table.bgColor;
+ document.getElementById('bordertColor').value = table.borderColor;
+ document.getElementById('class').value =table.className;
+
+
+ if(table.collapse.toLowerCase()=='collapse')document.getElementById('collapse').checked = true;
+
+ bgimage=table.backgroundImage.replace('url(','');
+ bgimage=bgimage.replace(')','');
+ document.getElementById('backgroundImage').value = bgimage?bgimage:'';
+
+
+ tablePreview();
+ window.focus();
+};
+
+function tablePreview()
+{
+
+ var table = new Object();
+ table = tableValues();
+ var previewItem = document.getElementById('previewTable');
+
+ previewItem.width = table["width"];
+ previewItem.height = table["height"];
+ previewItem.border = table["border"];
+ previewItem.bgColor= table["bgColor"];
+ //previewItem.style.backgroundImage= table["backgroundImage"];
+ previewItem.borderColor= table["borderColor"];
+ previewItem.cellPadding= table["cellSpacing"];
+ previewItem.cellSpacing= table["cellPadding"];
+ previewItem.style.borderCollapse = table["collapse"];
+
+};
+
+function XK_TableC(id, color)
+{
+ textfield=document.getElementById('coloroption').value;
+ document.getElementById(textfield).value=color;
+ document.getElementById('colorPalette'+id).style.display="none";
+ tablePreview();
+};
+//end table
+
+
+//cell dialog
+function sendCell(id)
+{
+ var cell = new Object();
+ cell = CellValues();
+ window.opener.XK_cellProp(id,cell);
+ window.close();
+};
+
+function initCellProps(id)
+{
+ var cell = window.opener.XK_cellProp(id,null);
+ if (cell==null)window.close();
+ document.getElementById('borderLeftStyle').value=cell["borderLeftStyle"];
+ document.getElementById('borderRightStyle').value = cell["borderRightStyle"];
+ document.getElementById('borderTopStyle').value = cell["borderTopStyle"];
+ document.getElementById('borderBottomStyle').value = cell["borderBottomStyle"];
+
+ document.getElementById('borderLeftWidth').value = (cell["borderLeftWidth"])?getWidth(cell["borderLeftWidth"]):'';
+ document.getElementById('borderRightWidth').value = (cell["borderRightWidth"])?getWidth(cell["borderRightWidth"]):'';
+ document.getElementById('borderTopWidth').value = (cell["borderTopWidth"])?getWidth(cell["borderTopWidth"]):'';
+ document.getElementById('borderBottomWidth').value = (cell["borderBottomWidth"])?getWidth(cell["borderBottomWidth"]):'';
+
+ document.getElementById('borderLeftUnits').value = (cell["borderLeftWidth"])?getUnits(cell["borderLeftWidth"]):'px';
+ document.getElementById('borderRightUnits').value = (cell["borderRightWidth"])?getUnits(cell["borderRightWidth"]):'px';
+ document.getElementById('borderTopUnits').value = (cell["borderTopWidth"])?getUnits(cell["borderTopWidth"]):'px';
+ document.getElementById('borderBottomUnits').value = (cell["borderBottomWidth"])?getUnits(cell["borderBottomWidth"]):'px';
+
+ document.getElementById('borderLeftColor').value = cell["borderLeftColor"];
+ document.getElementById('borderRightColor').value = cell["borderRightColor"];
+ document.getElementById('borderTopColor').value = cell["borderTopColor"];
+ document.getElementById('borderBottomColor').value = cell["borderBottomColor"];
+
+ document.getElementById('bgColor').value = cell["bgColor"];
+ document.getElementById('class').value = cell["className"];
+
+ document.getElementById('cellWidth').value = getWidth(cell["width"]);
+ document.getElementById('cellHeight').value = getWidth(cell["height"]);
+ document.getElementById('widthUnits').value = getUnits(cell["width"]);
+ document.getElementById('heightUnits').value = getUnits(cell["height"]);
+
+ document.getElementById('paddingLeft').value = (cell["paddingLeft"])?getWidth(cell["paddingLeft"]):'';
+ document.getElementById('paddingRight').value = (cell["paddingRight"])?getWidth(cell["paddingRight"]):'';
+ document.getElementById('paddingTop').value = (cell["paddingTop"])?getWidth(cell["paddingTop"]):'';
+ document.getElementById('paddingBottom').value = (cell["paddingBottom"])?getWidth(cell["paddingBottom"]):'';
+
+ document.getElementById('paddingLeftUnits').value = (cell["paddingLeft"])?getUnits(cell["paddingLeft"]):'px';
+ document.getElementById('paddingRightUnits').value = (cell["paddingRight"])?getUnits(cell["paddingRight"]):'px';
+ document.getElementById('paddingTopUnits').value = (cell["paddingTop"])?getUnits(cell["paddingTop"]):'px';
+ document.getElementById('paddingBottomUnits').value = (cell["paddingBottom"])?getUnits(cell["paddingBottom"]):'px';
+
+
+ bgimage=cell["backgroundImage"].replace('url(','');
+ bgimage=bgimage.replace(')','');
+ document.getElementById('backgroundImage').value = bgimage?bgimage:'';
+
+ cellPreview();
+ window.focus();
+
+
+};
+
+function CellValues()
+{
+ var cell = new Object();
+ cell["borderLeftStyle"] = document.getElementById('borderLeftStyle').value?document.getElementById('borderLeftStyle').value:'';
+ cell["borderRightStyle"] = document.getElementById('borderRightStyle').value?document.getElementById('borderRightStyle').value:'';
+ cell["borderTopStyle"] = document.getElementById('borderTopStyle').value?document.getElementById('borderTopStyle').value:'';
+ cell["borderBottomStyle"] = document.getElementById('borderBottomStyle').value?document.getElementById('borderBottomStyle').value:'';
+ cell["borderLeftWidth"] = document.getElementById('borderLeftWidth').value?document.getElementById('borderLeftWidth').value+document.getElementById('borderLeftUnits').value:'';
+ cell["borderRightWidth"] = document.getElementById('borderRightWidth').value?document.getElementById('borderRightWidth').value+document.getElementById('borderRightUnits').value:'';
+ cell["borderTopWidth"] = document.getElementById('borderTopWidth').value?document.getElementById('borderTopWidth').value+document.getElementById('borderRightUnits').value:'';
+ cell["borderBottomWidth"] = document.getElementById('borderBottomWidth').value?document.getElementById('borderBottomWidth').value+document.getElementById('borderBottomUnits').value:'';
+ cell["borderLeftColor"] = document.getElementById('borderLeftColor').value;
+ cell["borderRightColor"] = document.getElementById('borderRightColor').value;
+ cell["borderTopColor"] = document.getElementById('borderTopColor').value;
+ cell["borderBottomColor"] = document.getElementById('borderBottomColor').value;
+ cell["bgColor"] = document.getElementById('bgColor').value;
+ cell["className"] = document.getElementById('class').value;
+ cell["backgroundImage"] = document.getElementById('backgroundImage').value;
+ cell["width"] = document.getElementById('cellWidth').value?document.getElementById('cellWidth').value+document.getElementById('widthUnits').value:'';
+ cell["height"] = document.getElementById('cellHeight').value?document.getElementById('cellHeight').value+document.getElementById('heightUnits').value:'';
+ cell["paddingLeft"] = document.getElementById('paddingLeft').value?document.getElementById('paddingLeft').value+document.getElementById('paddingLeftUnits').value:'';
+ cell["paddingRight"] = document.getElementById('paddingRight').value?document.getElementById('paddingRight').value+document.getElementById('paddingRightUnits').value:'';
+ cell["paddingTop"] = document.getElementById('paddingTop').value?document.getElementById('paddingTop').value+document.getElementById('paddingTopUnits').value:'';
+ cell["paddingBottom"] = document.getElementById('paddingBottom').value?document.getElementById('paddingBottom').value+document.getElementById('paddingBottomUnits').value:'';
+ return(cell);
+};
+
+function cellPreview()
+{
+
+ var cell = new Object();
+ cell = CellValues();
+ var previewItem = document.getElementById('previewCell');
+
+ //bg color
+ previewItem.bgColor = cell["bgColor"];
+
+ //bg image
+ //previewItem.style.backgroundImage = 'url(' + cell["backgroundImage"] + ')';
+
+ //borders style
+ previewItem.style.borderLeftStyle = cell["borderLeftStyle"];
+ previewItem.style.borderRightStyle = cell["borderRightStyle"];
+ previewItem.style.borderTopStyle = cell["borderTopStyle"];
+ previewItem.style.borderBottomStyle = cell["borderBottomStyle"];
+
+ //borders Width
+ previewItem.style.borderLeftWidth = cell["borderLeftWidth"];
+ previewItem.style.borderRightWidth = cell["borderRightWidth"];
+ previewItem.style.borderTopWidth = cell["borderTopWidth"];
+ previewItem.style.borderBottomWidth = cell["borderBottomWidth"];
+
+ //borders Color
+ previewItem.style.borderLeftColor = cell["borderLeftColor"];
+ previewItem.style.borderRightColor = cell["borderRightColor"];
+ previewItem.style.borderTopColor = cell["borderTopColor"];
+ previewItem.style.borderBottomColor = cell["borderBottomColor"];
+
+ //width and height
+ previewItem.width = cell["width"];
+ previewItem.height =cell["height"];
+
+ //padding
+ if(cell["paddingLeft"]||cell["paddingRight"]||cell["paddingTop"]||cell["paddingBottom"])
+ {
+ previewItem.style.paddingLeft=cell["paddingLeft"];
+ previewItem.style.paddingRight=cell["paddingRight"];
+ previewItem.style.paddingTop=cell["paddingTop"];
+ previewItem.style.paddingBottom=["paddingBottom"];
+ }
+
+};
+
+function XK_CC(id, color)
+{
+ textfield=document.getElementById('coloroption').value;
+ document.getElementById(textfield).value=color;
+ document.getElementById('colorPalette'+id).style.display="none";
+ cellPreview();
+};
+
+//image properties dialog
+function imageValues()
+{
+ var image = new Object();
+
+ image["alt"] = document.getElementById('alt').value;
+ image["src"] = document.getElementById('src').value;
+ image["align"] = document.getElementById('align').value;
+ image["width"] = document.getElementById('width').value;
+ image["height"] = document.getElementById('height').value;
+ image["hspace"] = document.getElementById('hspace').value;
+ image["vspace"] = document.getElementById('vspace').value;
+ image["className"] = document.getElementById('className').value;
+
+ //borders style
+ image["borderLeftStyle"] = document.getElementById('borderLeftStyle').value;
+ image["borderRightStyle"] = document.getElementById('borderRightStyle').value;
+ image["borderTopStyle"] = document.getElementById('borderTopStyle').value;
+ image["borderBottomStyle"] = document.getElementById('borderBottomStyle').value;
+
+ //borders width
+ image["borderLeftWidth"] = document.getElementById('borderLeftWidth').value?document.getElementById('borderLeftWidth').value+document.getElementById('borderLeftUnits').value:'';
+ image["borderRightWidth"] = document.getElementById('borderRightWidth').value?document.getElementById('borderRightWidth').value+document.getElementById('borderRightUnits').value:'';
+ image["borderTopWidth"] = document.getElementById('borderTopWidth').value?document.getElementById('borderTopWidth').value+document.getElementById('borderTopUnits').value:'';
+ image["borderBottomWidth"] = document.getElementById('borderBottomWidth').value?document.getElementById('borderBottomWidth').value+document.getElementById('borderBottomUnits').value:'';
+
+ //borders color
+ image["borderLeftColor"] = document.getElementById('borderLeftColor').value;
+ image["borderRightColor"] = document.getElementById('borderRightColor').value;
+ image["borderTopColor"] = document.getElementById('borderTopColor').value;
+ image["borderBottomColor"] = document.getElementById('borderBottomColor').value;
+
+ //margins
+ image["marginLeft"] = document.getElementById('marginLeft').value?document.getElementById('marginLeft').value+document.getElementById('marginLeftUnits').value:'';
+ image["marginRight"] = document.getElementById('marginRight').value?document.getElementById('marginRight').value+document.getElementById('marginRightUnits').value:'';
+ image["marginTop"] = document.getElementById('marginTop').value?document.getElementById('marginTop').value+document.getElementById('marginTopUnits').value:'';
+ image["marginBottom"] = document.getElementById('marginBottom').value?document.getElementById('marginBottom').value+document.getElementById('marginBottomUnits').value:'';
+ return(image);
+};
+
+function imagePreview()
+{
+
+ var image = new Object();
+ image = imageValues();
+ var previewItem = document.getElementById('previewimage');
+
+ //borders style
+ previewItem.style.borderLeftStyle = image["borderLeftStyle"];
+ previewItem.style.borderRightStyle = image["borderRightStyle"];
+ previewItem.style.borderTopStyle = image["borderTopStyle"];
+ previewItem.style.borderBottomStyle = image["borderBottomStyle"];
+
+ //borders Width
+ previewItem.style.borderLeftWidth = image["borderLeftWidth"];
+ previewItem.style.borderRightWidth = image["borderRightWidth"];
+ previewItem.style.borderTopWidth = image["borderTopWidth"];
+ previewItem.style.borderBottomWidth = image["borderBottomWidth"];
+
+ //borders Color
+ previewItem.style.borderLeftColor = image["borderLeftColor"];
+ previewItem.style.borderRightColor = image["borderRightColor"];
+ previewItem.style.borderTopColor = image["borderTopColor"];
+ previewItem.style.borderBottomColor = image["borderBottomColor"];
+
+ //width and height
+ if (image["width"])previewItem.width = image["width"];
+ if (image["height"])previewItem.height = image["height"];
+
+ //borders margin
+ previewItem.style.marginLeft = image["marginLeft"];
+ previewItem.style.marginRight = image["marginRight"];
+ previewItem.style.marginTop = image["marginTop"];
+ previewItem.style.marginBottom = image["marginBottom"];
+
+ //align
+ previewItem.align= image["align"];
+ previewItem.src= image["src"];
+};
+
+function XK_ImgPrev(id, color)
+{
+ textfield=document.getElementById('coloroption').value;
+ document.getElementById(textfield).value=color;
+ document.getElementById('colorPalette'+id).style.display="none";
+ imagePreview();
+};
+
+
+function sendImage(id)
+{
+ var image = new Object();
+ image = imageValues();
+ window.opener.XK_imageProps(id,image);
+ window.close();
+};
+
+function initImageProps(id,url)
+{
+ var image = window.opener.XK_imageProps(id,null);
+
+ if(image==null)window.close();
+
+ //Koivi anchor cant be edited
+ if (image["src"]==url+"/skins/common/anchor.gif")window.close();
+
+ document.getElementById('alt').value = image["alt"];
+ document.getElementById('src').value = image["src"];
+ document.getElementById('width').value = image["width"];
+ document.getElementById('height').value = image["height"];
+ document.getElementById('align').value = image["align"];
+ if(image["hspace"]!=-1 && image["hspace"]!=0)document.getElementById('hspace').value = image["hspace"];
+ if(image["vspace"]!=-1 && image["vspace"]!=0)document.getElementById('vspace').value = image["vspace"];
+ document.getElementById('className').value = image["className"];
+
+ document.getElementById('borderLeftStyle').value=image["borderLeftStyle"];
+ document.getElementById('borderRightStyle').value = image["borderRightStyle"];
+ document.getElementById('borderTopStyle').value = image["borderTopStyle"];
+ document.getElementById('borderBottomStyle').value = image["borderBottomStyle"];
+
+ document.getElementById('borderLeftWidth').value = image["borderLeftWidth"]?getWidth(image["borderLeftWidth"]):'';
+ document.getElementById('borderRightWidth').value = image["borderRightWidth"]?getWidth(image["borderRightWidth"]):'';
+ document.getElementById('borderTopWidth').value = image["borderTopWidth"]?getWidth(image["borderTopWidth"]):'';
+ document.getElementById('borderBottomWidth').value = image["borderBottomWidth"]?getWidth(image["borderBottomWidth"]):'';
+
+ document.getElementById('borderLeftUnits').value = image["borderLeftWidth"]?getUnits(image["borderLeftWidth"]):'px';
+ document.getElementById('borderRightUnits').value = image["borderRightWidth"]?getUnits(image["borderRightWidth"]):'px';
+ document.getElementById('borderTopUnits').value = image["borderTopWidth"]?getUnits(image["borderTopWidth"]):'px';
+ document.getElementById('borderBottomUnits').value = image["borderBottomWidth"]?getUnits(image["borderBottomWidth"]):'px';
+
+ document.getElementById('borderLeftColor').value = image["borderLeftColor"];
+ document.getElementById('borderRightColor').value = image["borderRightColor"];
+ document.getElementById('borderTopColor').value = image["borderTopColor"];
+ document.getElementById('borderBottomColor').value = image["borderBottomColor"];
+
+ document.getElementById('marginLeft').value = getWidth(image["marginLeft"]);
+ document.getElementById('marginRight').value = getWidth(image["marginRight"]);
+ document.getElementById('marginTop').value = getWidth(image["marginTop"]);
+ document.getElementById('marginBottom').value = getWidth(image["marginBottom"]);
+
+ document.getElementById('marginLeftUnits').value = getUnits(image["marginLeft"]);
+ document.getElementById('marginRightUnits').value = getUnits(image["marginRight"]);
+ document.getElementById('marginTopUnits').value = getUnits(image["marginTop"]);
+ document.getElementById('marginBottomUnits').value = getUnits(image["marginBottom"]);
+ imagePreview();
+ window.focus();
+};
+
+function getWidth(value)
+{
+ width=value.substring(0,value.length-2);
+ return(width);
+
+};
+
+function getUnits(value)
+{
+ units=value.substring(value.length-2,value.length);
+ return units;
+};
+
+//override functions
+function XK_over(id,color)
+{
+ document.getElementById('colortextf'+id).style.backgroundColor =color;
+ document.getElementById('showc'+id).value =color;
+};
+
+function XK_InsertImage(id,src,alt)
+{
+ document.getElementById('backgroundImage').value=src;
+};
+
+function XK_color(id)
+{
+ document.getElementById('coloroption').value=id+'Color';
+ XK_showHideDiv(id,'colorPalette');
+};
+
+//Shows/Hides a Div Layer
+function XK_showHideDiv(buttonId,divId)
+{
+ var divid=divId;
+ buttonElement=document.getElementById(buttonId);
+ document.getElementById(divid).style.left=window.opener.XK_getOffsetLeft(buttonElement) + "px";
+ document.getElementById(divid).style.top=(window.opener.XK_getOffsetTop(buttonElement) + buttonElement.offsetHeight) + "px";
+ if(document.getElementById(divid).style.display=="none")
+ {
+ document.getElementById(divid).style.display="";
+ }
+ else document.getElementById(divid).style.display="none";
+};
+
+
+function openWithSelfMain(url,name,width,height)
+{
+ var options = "width=" + width + ",height=" + height + "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no";
+ new_window = window.open(url, name, options);
+ window.self.name = "main";
+ new_window.focus();
+};
+
+function onlyNumbers(e,id)
+{
+ var value=document.getElementById(id).value;
+ e = e?e:event;
+ var keyCode =e.keyCode?e.keyCode:e.charCode;
+ return (( keyCode >= 48 && keyCode <= 57 )||keyCode ==8||(keyCode ==46 && value.indexOf('.')==-1)||(keyCode >= 37 && keyCode <= 40));
+}
+
+function onlyHexNumbers(e,id)
+{
+ var value=document.getElementById(id).value?document.getElementById(id).value:'';
+ e = e?e:event;
+ var keyCode =e.keyCode?e.keyCode:e.charCode;
+ return (
+ ( keyCode >= 48 && keyCode <= 57 )||( keyCode >= 65 && keyCode <= 70 )||( keyCode >= 97 && keyCode <= 102)||keyCode ==8||(keyCode ==35 && value.indexOf("#")==-1)||(keyCode >= 37 && keyCode <= 40));
+}
\ No newline at end of file
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/editor.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/editor.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/editor.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,957 @@
+/*
+* Samuels [Xoops Project]
+* Based on Justin Koivisto [W.A. Fisher Interactive] Koivi editor
+*
+*
+// $Id: editor.js,v 1.1.2.1 2005/06/04 02:11:53 phppp Exp $
+*
+*/
+
+var editors = new Array();//ACTIVE EDITORS
+var isie;
+var url;
+
+//init wysiwyg editor
+function XK_init(id, isiexplore, editorurl,textdirection)
+{
+ isie=isiexplore;
+ url=editorurl;
+ var doc=document.getElementById("iframe"+id).contentWindow.document;
+
+ if(isie)
+ {
+ if (document.readyState != 'complete')
+ {
+ setTimeout(function(){ XK_init(id, isiexplore, editorurl,textdirection);},100);
+ return;
+ }
+ doc.designMode="On";
+ }
+
+ else
+ {
+ //try if mozilla is ready to go
+ try {setTimeout(function(){doc.designMode="On";doc.execCommand("usecss",false,true);},1000);}
+ //I don't know how to do if it fails
+ catch (e) {alert("ERROR: can't load the editor, please refresh the page");}
+ }
+
+ if (!XK_registered(id)){editors[editors.length] = id;}
+
+ //update hidden text fields on submit
+ XK_onSubmitHandler(id);
+
+ //update iframes with textfields values
+ XK_insertText(id);
+
+ //add hide floating menus event handlers;
+ XK_attachEvent(document,"mousedown",XK_hideMenus);
+ XK_attachEvent(doc,"mousedown",XK_hideMenus);
+
+ //contextmenu:
+ contextmenu =new XK_contextMenu(id);
+
+ //set text direction
+ if(textdirection=="rtl")XK_textDirection(textdirection,id);
+
+ //destroy <p></p> on enter
+ if(isie)XK_destroyPTag(id);
+};
+
+function XK_appendXoopsCss(id,themeCss)
+{
+ if(themeCss)
+ {
+ if(document.getElementById("cssEnabled"+id).checked)XK_AppendCss(id,themeCss,"xoopsTheme");
+ else XK_DeleteCss(id,"xoopsTheme");
+ }
+}
+
+function XK_destroyPTag(id)
+{
+ //disable manual undo "ctrl+z" because sometimes iexplore goes crazy.NOT NEEDED BY NOW
+ //if (doc.event.ctrlKey && doc.event.keyCode == 90)return false;
+
+ var doc = document.getElementById("iframe"+id).contentWindow;
+ try{var enabled = document.getElementById("ptagenabled"+id).checked;}catch(e){var enabled=false;};
+
+ if (!enabled)
+ {
+ doc.document.onkeydown = function ()
+ {
+ if ( (doc.event.keyCode == 13) )
+ {
+ if ( !(XK_excludedTags(id)) && !(doc.document.queryCommandState( "insertunorderedlist" )) && !(doc.document.queryCommandState( "insertorderedlist" )))
+ {
+ XK_cancelBubble(doc.event);
+ XK_insertHTML("<br>",id);
+ return false;
+ }else return;
+
+ }
+ else return;
+ };
+ }
+ else
+ {
+ doc.document.onkeydown = function (){};
+ }
+ doc.focus();
+};
+
+function XK_excludedTags(id)
+{
+ var exludedTags=["H1","H2","H3","H4","H5","H6","PRE","ADDRESS","BLOCKQUOTE"];
+
+ for(i=0;i< exludedTags.length;i++)
+ {
+ if(XK_isInsideThisTag(id,exludedTags[i])) return true;
+ }
+ return false;
+}
+
+//update iframe on init
+function XK_insertText(id)
+{
+ //replace <strong>,<me> tags by <b><li> and others used by mozilla
+ var my_content=XK_toWYSIWYG(document.getElementById(id).value);
+
+ var doc=document.getElementById("iframe"+id).contentWindow;
+ doc.document.open();
+ doc.document.write(my_content);
+ doc.document.close();
+};
+
+function XK_registered(id)
+{
+ var found = false;
+ for(i=0;i<editors.length;i++)
+ {
+ if ((editors[i]).toUpperCase() == id.toUpperCase())
+ {
+ found = true;
+ break;
+ }
+ }
+ return(found);
+};
+
+//update textfields on submit
+function XK_onSubmitHandler(id)
+{
+ var sTemp = "";
+ oForm = document.getElementById(id).form;
+
+ if(oForm.onsubmit != null) {
+ sTemp = oForm.onsubmit.toString();
+ iStart = sTemp.indexOf("{") + 2;
+ sTemp = sTemp.substr(iStart,sTemp.length-iStart-2);
+ }
+ if (sTemp.indexOf("XK_updateFields();") == -1)
+ {
+ oForm.onsubmit = new Function("XK_updateFields();" + sTemp);
+ }
+};
+
+function XK_updateFields()
+{
+ var text;
+ //var html_source;
+ for (i=0; i<editors.length; i++)
+ {
+ //if html mode toggle to wysiwyg
+ if (document.getElementById("iframe"+editors[i]).style.display=="none")XK_doToggleView(editors[i]);
+ var doc=document.getElementById("iframe"+editors[i]).contentWindow.document;
+
+ //I need to sanitize the HTML, so it's a must to take the DOM tree from the iframe
+ var text=(document.getElementById(editors[i]).value.indexOf("<body")!=-1)?XK_getXHTML(doc):XK_getXHTML(doc.body);
+ text=XK_removeLineBreaks(text);
+
+ //now I'm sure the textfield is updated with the cleaned HTML
+ document.getElementById(editors[i]).value=text;
+ }
+};
+
+function XK_maximizeEditor(id)
+{
+ var doc=document.getElementById("iframe"+id).contentWindow.document;
+
+ if(document.getElementById("alleditor"+id).style.position!="absolute")
+ {
+ document.getElementById("floatButton"+id).style.display="none";
+ document.getElementById("alleditor"+id).style.position="absolute";
+ document.getElementById("alleditor"+id).style.width=document.body.clientWidth-4+"px";
+
+ //push editor to top
+ document.getElementById("alleditor"+id).style.left="0px";
+ document.getElementById("alleditor"+id).style.top="0px";
+ }
+ else
+ {
+ document.getElementById("alleditor"+id).style.position="";
+ document.getElementById("alleditor"+id).style.width="100%";
+ document.getElementById("floatButton"+id).style.display="";
+ }
+ if(!isie){doc.designMode="On";doc.execCommand("usecss",false,true);}
+
+ //go to top of the page
+ document.documentElement.scrollTop=0;
+ document.getElementById("iframe"+id).contentWindow.focus();
+}
+
+function XK_doTextFormat(command, option,id,value)
+{
+ var doc= document.getElementById("iframe"+id).contentWindow;
+ switch(command)
+ {
+ //deprecated function, I'll make an advanced url dialog some day...
+ case "createlink":
+ if(XK_getSelectedText(id)==''){alert('Select content first');break;}
+
+ if(!isie)
+ {
+ var iurl=prompt("Enter a URL:", "");
+ if(document.getElementById("iframe"+id).contentWindow.document.queryCommandEnabled(command))
+ {
+ try{doc.document.execCommand("createlink",false,iurl);}catch(e){};
+ return true;
+ }
+ else return false;
+ }
+ else try{doc.document.execCommand("createlink",false);}catch(e){};
+ break;
+
+ case "Quote":
+ case "Code":
+ XK_addCodes(command,id);
+ break;
+
+ case "insertimage":
+ XK_InsertImage(id);
+ break;
+
+ case "fontsize":
+ case "fontname":
+ case "formatblock":
+ XK_fontFormat(command,option,id);
+ break;
+
+ default:
+ if(doc.document.queryCommandEnabled(command))
+ {
+ try{doc.document.execCommand(command,false,value);}catch(e){};
+ doc.focus();
+ return true;
+ }
+ else
+ return false;
+ break;
+ }
+};
+
+function XK_fontFormat(command,option,id)
+{
+ var doc= document.getElementById("iframe"+id).contentWindow;
+ if(doc.document.queryCommandEnabled(command))
+ {
+ try{doc.document.execCommand(command,false,option);}catch(e){};
+ document.getElementById(command+id).value="";
+ doc.focus();
+ }
+};
+
+//called from colorpalette
+function XK_applyColor(id,color)
+{
+ var option=document.getElementById('coloroption'+id).value;
+ switch(option)
+ {
+ case "forecolor":
+ XK_foreColor(id,color);
+ break;
+
+ case "hilitecolor":
+ XK_hiliteColor(id,color);
+ break;
+
+ case "cellcolor":
+ XK_CellColor(id,color);
+ break;
+ }
+ return;
+};
+
+function XK_countCharacters(id)
+{
+ var text=document.getElementById("iframe"+id).contentWindow.document.body.innerHTML;
+ alert(text.length);
+}
+
+function XK_color(id,buttonid,option)
+{
+ document.getElementById('coloroption'+id).value=option;
+ if (option!='cellcolor')
+ XK_showHideDiv(id, buttonid, 'colorPalette');
+ else if(XK_isInsideCell(id))
+ XK_showHideDiv(id, buttonid, 'colorPalette');
+};
+
+function XK_foreColor(id, color)
+{
+ try{document.getElementById("iframe"+id).contentWindow.document.execCommand('forecolor',false, color);}catch(e){};
+ return;
+};
+
+function XK_hiliteColor(id, color)
+{
+ var doc= document.getElementById("iframe"+id).contentWindow;
+ if (!isie)
+ {
+ try
+ {
+ doc.document.execCommand('usecss',false,false);
+ doc.document.execCommand('hilitecolor', false, color);
+ doc.document.execCommand("usecss",false,true);
+ }
+ catch(e){};
+ }
+ else try{doc.document.execCommand('backcolor', false, color);}catch(e){};
+ return;
+};
+
+function XK_insertDate(id)
+{
+ var date= new Date();
+ document.getElementById("iframe"+id).contentWindow.focus();
+ XK_insertHTML(date.toLocaleString(),id);
+};
+
+//makes a XoopsCode div or XoopsQuote div and puts inside it the selected text
+function XK_addCodes(type,id)
+{
+ document.getElementById("iframe"+id).contentWindow.focus();
+ var text = XK_getSelectedText(id);
+ if (text=="")text=" ";
+ var text="<div style=\"border:1px solid\" class=\"xoops"+type+"\" >"+text+"</div>";
+ XK_insertHTML(text,id);
+};
+
+function XK_textDirection(direction,id)
+{
+ //simplest version
+ document.getElementById("iframe"+id).contentWindow.document.dir=direction;
+ document.getElementById(id).dir=direction;
+};
+
+function XK_InsertImage(id,src,alt)
+{
+ document.getElementById("iframe"+id).contentWindow.focus();
+ if (src==null)
+ {
+ var image = prompt("Image source.",'http://');
+ alt = " ";
+ }
+ else var image = src;
+
+ if (image!='http://' && image!=null)
+ XK_insertHTML("<img src="+image+" alt=\""+alt+" \">",id);
+
+ return;
+};
+
+function XK_insertAnchor(id)
+{
+ var name = prompt("Anchor.",'id');
+ document.getElementById("iframe"+id).contentWindow.focus();
+ XK_insertHTML("<img alt=\x22anchor\x22 id=\""+name+"\" title=\""+name+"\" src=\""+url+"/skins/common/anchor.gif\" />",id);
+ return;
+};
+
+function XK_print(id)
+{
+ var doc= document.getElementById("iframe"+id).contentWindow;
+ if (isie){try{doc.document.execCommand('Print');}catch(e){};}
+ else doc.print();
+};
+
+function XK_insertSymbol(symbol,id)
+{
+ document.getElementById('insertsymbol'+id).value="";
+ document.getElementById("iframe"+id).contentWindow.focus();
+ XK_insertHTML(symbol,id);
+};
+
+function XK_checkspell()
+{
+ if(isie)
+ {
+ try
+ {
+ var tmpis = new ActiveXObject("ieSpell.ieSpellExtension");
+ tmpis.CheckAllLinkedDocuments(document);
+ }
+ catch(exception)
+ {
+ if(exception.number==-2146827859)
+ {
+ if(confirm("ieSpell not detected. Click Ok to go to download page."))
+ window.open("http://www.iespell.com/download.php","Download");
+ }
+ else alert("Error Loading ieSpell: Exception " + exception.number);
+ }
+
+ }
+ else window.open("http://spellbound.sourceforge.net./install.html#header","SpellBound");
+};
+
+//change between code and wysiwyg modes
+function XK_doToggleView(id)
+{
+ var doc= document.getElementById("iframe"+id).contentWindow.document;
+ if(document.getElementById("iframe"+id).style.display!="none")
+ {
+ //hide editor
+ if (!isie)doc.designMode="Off";
+ document.getElementById("iframe"+id).style.display="none";
+ document.getElementById("toolbar"+id).style.display="none";
+
+ //show textarea with code
+ document.getElementById(id).style.display="block";
+
+ //get xhtml
+ var text=(document.getElementById(id).value.indexOf("<body")!=-1)?XK_getXHTML(doc):XK_getXHTML(doc.body);
+
+ //add linebreaks to tags for better reading
+ document.getElementById(id).value=XK_addLineBreaks(text);
+
+ document.getElementById(id).focus();
+ }
+ else
+ {
+ var text=XK_toWYSIWYG(document.getElementById(id).value);
+
+ //if it's a complete html page
+ if(text.indexOf("<body")!=-1)
+ {
+ if(isie)
+ {
+ doc.open();
+ doc.write(text);
+ doc.close();
+ }
+ else
+ {
+ //stupid gecko "uncaught exception" if I try to open the doc to write
+ //more gecko workarounds, I'm saving the head tag
+ var headCode=text.split(/<\/head>/gi);
+ if(headCode[0]!='')
+ {
+ headCode=headCode[0].split(/<head>/gi);
+ headCode=(headCode[1])?headCode[1]:'';
+ text=text.replace(headCode,'');
+ }
+
+ //here it comes the body tag attributes, gecko lose them
+ var bodyCode=text.split(/<body/gi);
+ bodyCode=bodyCode[1].split('>');
+ bodyCode=(bodyCode[0])?bodyCode[0]:'';
+
+ bodyCode=bodyCode.replace(/^\s*(.*)/, "$1");
+ bodyCode=bodyCode.replace(/(.*?)\s*$/, "$1");
+ bodyCode=bodyCode.replace(/\s/g,"=");
+ bodyAttrs=bodyCode.split('=');
+
+ //insert the html
+ doc.body.innerHTML = text;
+
+ //update head saved before
+ doc.getElementsByTagName('head')[0].innerHTML=headCode;
+
+
+ //if there are some body attribute, just update it one by one
+ if(bodyAttrs.length >1)
+ {
+ bodyHTML=doc.getElementsByTagName('body')[0];
+
+ for(i=0;i<bodyAttrs.length;i++)
+ {
+ attribute=bodyAttrs[i];
+ i++;
+ value=(bodyAttrs[i]);
+
+ //correct hex colour values
+ value=value.replace(/#([0-9]|[a-f])/gi, "$1");
+
+ //delete non necessary quotes
+ //(funny, if I don't delete quotes in colour values, gecko lies)
+ value=value.replace(/['"](.*)['"]/gi, "$1");
+ bodyHTML.setAttribute(attribute,value,0);
+ }
+ }
+ }
+ }
+ else doc.body.innerHTML = text;
+
+ //show editor
+ document.getElementById("iframe"+id).style.display="block";
+ document.getElementById("toolbar"+id).style.display="block";
+ //hide textarea
+ document.getElementById(id).style.display="none";
+ //enable design mode again for gecko
+ if (!isie){doc.designMode="On";doc.execCommand("usecss",false,true);}
+ }
+};
+
+function getAnchors(id)
+{
+ text=XK_codeCleaner(document.getElementById("iframe"+id).contentWindow.document.body.innerHTML);
+ var result=new Array();
+ result=text.match(/<a name=\"(.*?)\"><\/a>/gi);
+ return result;
+}
+
+function XK_floatingToolbar(id,skin)
+{
+ var ft=JSFX_FloatDiv("toolbar"+id, 200,200);
+ if (document.getElementById("toolbar"+id).className!=skin+"floatingToolBar")
+ {
+ XK_hideMenus();
+ document.getElementById("toolbar"+id).className=skin+"floatingToolBar";
+ document.getElementById("maximizeButton"+id).style.display="none";
+ ft.floatIt();
+ }
+ else
+ {
+ document.getElementById("toolbar"+id).className=skin+"toolbarBackCell";
+ document.getElementById("maximizeButton"+id).style.display="";
+ ft.cancelFloat();
+
+ }
+};
+
+function XK_getImg(id)
+{
+ var doc= document.getElementById("iframe"+id).contentWindow;
+ if(isie)
+ {
+ if (doc.document.selection.type == 'Control')
+ {
+ var tControl = doc.document.selection.createRange();
+ if (tControl(0).tagName.toLowerCase() == 'img') return(tControl(0));
+ else return(null);
+ }
+ else
+ {
+ return(null);
+ }
+ }
+ else
+ {
+ var range = doc.getSelection().getRangeAt(0);
+ var container = range.startContainer;
+ var pos = range.startOffset;
+ var imageNode = null;
+
+ if (container.tagName)
+ {
+ var images = container.getElementsByTagName('IMG');
+ if (container.childNodes[pos].tagName == 'IMG') node = container.childNodes[pos];
+ return node;
+ }
+ else return;
+ }
+};
+
+function XK_imageProps(id,img)
+{
+ var node=XK_getImg(id);
+ if(node==null)return;
+
+ if(img!=null)
+ {
+ if(img["alt"])node.setAttribute('alt',img["alt"]);
+ if(img["src"])node.setAttribute('src',img["src"]);
+ if(img["width"]){node.style.width = img["width"];node.removeAttribute('width',0);}
+ if(img["height"]){node.style.height = img["height"];node.removeAttribute('height',0);}
+ if(img["vspace"])node.vspace = img["vspace"];else node.removeAttribute('vspace',0);
+ if(img["hspace"])node.hspace = img["hspace"];else node.removeAttribute('hspace',0);
+ if(img["align"])node.setAttribute('align',img["align"]);else node.removeAttribute('align',0);
+ if(img["className"])node.className = img["className"];else node.removeAttribute('className',0);
+
+ //margin style
+ node.style.marginLeft = img["marginLeft"];
+ node.style.marginRight = img["marginRight"];
+ node.style.marginTop = img["marginTop"];
+ node.style.marginBottom = img["marginBottom"];
+
+ //borders style
+ node.style.borderLeftStyle = img["borderLeftStyle"];
+ node.style.borderRightStyle = img["borderRightStyle"];
+ node.style.borderTopStyle = img["borderTopStyle"];
+ node.style.borderBottomStyle = img["borderBottomStyle"];
+
+ //borders Width
+ node.style.borderLeftWidth = img["borderLeftWidth"];
+ node.style.borderRightWidth = img["borderRightWidth"];
+ node.style.borderTopWidth = img["borderTopWidth"];
+ node.style.borderBottomWidth = img["borderBottomWidth"];
+
+ //borders Color
+ node.style.borderLeftColor = img["borderLeftColor"];
+ node.style.borderRightColor = img["borderRightColor"];
+ node.style.borderTopColor = img["borderTopColor"];
+ node.style.borderBottomColor = img["borderBottomColor"];
+
+ return;
+ }
+ else
+ {
+ var image = new Object();
+ image["alt"] = node.getAttribute('alt');
+ image["src"] = node.getAttribute('src');
+ image["width"] = node.width;
+ image["height"] = node.height;
+ image["vspace"] = node.vspace;
+ image["hspace"] = node.hspace;
+ image["className"] = node.className;
+
+ image["align"] = node.getAttribute('align');
+ image["marginLeft"] = node.style.marginLeft;
+ image["marginRight"] = node.style.marginRight;
+ image["marginTop"] = node.style.marginTop;
+ image["marginBottom"] = node.style.marginBottom;
+
+ //borders style
+ image["borderLeftStyle"] = node.style.borderLeftStyle;
+ image["borderRightStyle"] = node.style.borderRightStyle;
+ image["borderTopStyle"] = node.style.borderTopStyle;
+ image["borderBottomStyle"] = node.style.borderBottomStyle;
+
+ //borders Width
+ image["borderLeftWidth"] = node.style.borderLeftWidth;
+ image["borderRightWidth"] = node.style.borderRightWidth;
+ image["borderTopWidth"] = node.style.borderTopWidth;
+ image["borderBottomWidth"] = node.style.borderBottomWidth;
+
+ //borders Color
+ if(isie)
+ {
+ image["borderLeftColor"] = node.style.borderLeftColor;
+ image["borderRightColor"] = node.style.borderRightColor;
+ image["borderTopColor"] = node.style.borderTopColor;
+ image["borderBottomColor"] = node.style.borderBottomColor;
+ }
+ else
+ {
+ image["borderLeftColor"] = (node.style.borderLeftColor)?XK_RgbToHex(node.style.borderLeftColor):node.style.borderLeftColor;
+ image["borderRightColor"] = (node.style.borderRightColor)?XK_RgbToHex(node.style.borderRightColor):node.style.borderRightColor;
+ image["borderTopColor"] = (node.style.borderTopColor)?XK_RgbToHex(node.style.borderTopColor):node.style.borderTopColor;
+ image["borderBottomColor"] = (node.style.borderBottomColor)?XK_RgbToHex(node.style.borderBottomColor):node.style.borderBottomColor;
+ }
+
+
+ return (image);
+ }
+
+};
+
+function XK_hideToolbar(id,url)
+{
+ var doc=document.getElementById("buttons"+id).style.display;
+ if(doc=="none")
+ {
+ document.getElementById("buttons"+id).style.display="";
+ }
+ else
+ {
+ document.getElementById("buttons"+id).style.display="none";
+ }
+};
+
+//Shows/Hides a Div Layer
+function XK_showHideDiv(id,buttonId,divId)
+{
+ var divid=divId+id;
+ buttonElement=document.getElementById(buttonId+id);
+ document.getElementById(divid).style.left=XK_getOffsetLeft(buttonElement) + "px";
+ document.getElementById(divid).style.top=(XK_getOffsetTop(buttonElement) + buttonElement.offsetHeight) + "px";
+ if(document.getElementById(divid).style.display=="none")
+ {
+ document.getElementById(divid).style.display="";
+ }
+ else document.getElementById(divid).style.display="none";
+};
+
+
+
+function XK_hideMenus()
+{
+ var men=new Array();
+
+ if(!isie)men = document.getElementsByName("XoopsKToolbarDivs");
+ //stupid iexplore, getElementsByName doesn't run at all
+ else men = getElementsByNameAndTag("XoopsKToolbarDivs", "div");
+ for (var i=0; i < men.length; i++)
+ {
+ try{document.getElementById(men[i].id).style.display="none";}catch(e){};
+ }
+}
+
+//USEFUL FUNCTIONS
+
+var timeout;
+function JSFX_FloatDiv(id, sx, sy)
+{
+ var ns = (navigator.appName.indexOf("Netscape") != -1);
+ var d = document;
+ var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
+ var px = document.layers ? "" : "px";
+ window[id + "_obj"] = el;
+ if(d.layers)el.style=el;
+ el.cx = el.sx = sx;el.cy = el.sy = sy;
+ el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};
+ el.floatIt=function()
+ {
+ var pX, pY;
+ pX = (this.sx >= 0) ? 0 : ns ? innerWidth :
+ document.documentElement && document.documentElement.clientWidth ?document.documentElement.clientWidth : document.body.clientWidth;
+ pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ?document.documentElement.scrollTop : document.body.scrollTop;
+ if(this.sy<0) pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight;
+ this.cx += (pX + this.sx - this.cx)/8;this.cy += (pY + this.sy - this.cy)/2;
+ this.sP(this.cx, this.cy);
+ timeout=setTimeout(this.id + "_obj.floatIt()", 40);
+ };
+ el.cancelFloat=function()
+ {
+ clearTimeout(timeout);
+ };
+
+ return el;
+};
+
+function XK_AppendCss(id,css,name)
+{
+ if (css=="")return false;
+ var doc = document.getElementById("iframe"+id).contentWindow.document;
+ var stylesheet = doc.createElement( 'link' ) ;
+ stylesheet.setAttribute('href',css);
+ stylesheet.setAttribute('rel','stylesheet');
+ stylesheet.setAttribute('type','text/css');
+ stylesheet.setAttribute('id','name'+id);
+ doc.getElementsByTagName('head')[0].appendChild( stylesheet );
+};
+
+function XK_DeleteCss(id,name)
+{
+ var doc = document.getElementById("iframe"+id).contentWindow.document;
+ var node=doc.getElementById('name'+id);
+ if (node.parentNode)
+ node.parentNode.removeChild(node);
+ //stupid iexplore, doesn't refresh
+ if(isie)doc.body.innerHTML=doc.body.innerHTML;
+};
+
+function getElementsByNameAndTag(name, tag)
+{
+ var tam, list, tags;
+ list = new Array();
+ tam = 0;
+ tags = document.getElementsByTagName(tag);
+ for(i = 0; i<tags.length; i++)
+ {
+ if (tags[i].getAttribute("name")==name)
+ list[tam++] = tags[i];
+ }
+ return list;
+}
+
+function XK_attachEvent(doc,event,func)
+{
+ if (isie)doc.attachEvent("on"+event, func, true);
+ else doc.addEventListener(event, func, true);
+}
+
+function XK_createRange(id)
+{
+ if(isie)
+ {
+ //retrieve selected range
+ var sel=document.getElementById("iframe"+id).contentWindow.document.selection;
+ if(sel!=null)
+ {
+ var newselectionRange=sel.createRange();
+ newselectionRange.select();
+ }
+ return (newselectionRange);
+ }
+
+ else
+ {
+ range=document.createRange();
+ return (range);
+ }
+
+ selection = doc.window.getSelection();
+ doc.focus();
+};
+
+//doesn't run well if used with elements into a div with relative position
+function XK_getOffsetLeft(elm) {
+ var mOffsetLeft = elm.offsetLeft;
+ var mOffsetParent = elm.offsetParent;
+
+ while(mOffsetParent) {
+ mOffsetLeft += mOffsetParent.offsetLeft;
+ mOffsetParent = mOffsetParent.offsetParent;
+ }
+ return mOffsetLeft;
+};
+
+function XK_getOffsetTop(elm) {
+ var mOffsetTop = elm.offsetTop;
+ var mOffsetParent = elm.offsetParent;
+
+ while(mOffsetParent){
+ mOffsetTop += mOffsetParent.offsetTop;
+ mOffsetParent = mOffsetParent.offsetParent;
+ }
+ return mOffsetTop;
+};
+
+function XK_openPopup(url,name,width,height)
+{
+ if(isie)
+ {
+ var Iwidth=width+30;
+ var Iheight=height+40;
+ var options = "dialogwidth:" + Iwidth +"px; dialogheight:" + Iheight +"px;top= "+(screen.height-height)/2+"px;left= "+(screen.width-width)/2+"px;toolbar=no;location=no;directories=no;status=no;menubar=no;scrollbars=no;resizable=no;copyhistory=no;";
+ var new_window = window.showModalDialog(url, self, options);
+ }
+ else
+ {
+ var options = "width=" + width + ",height=" + height + ",top= "+(screen.height-height)/2+"px,left= "+(screen.width-width)/2+"px,dependable=yes, modal=yes, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no";
+ var new_window = window.open(url, name, options);
+ }
+};
+
+//inserts html into iframe
+function XK_insertHTML(html,id)
+{
+ var doc= document.getElementById("iframe"+id).contentWindow;
+ var range= XK_createRange(id);
+ doc.focus();
+ if (isie)
+ {
+ try {
+ range.pasteHTML(html);
+ range.select();
+ range.moveEnd("character", 1);
+ range.moveStart("character", 1);
+ range.collapse(false);
+ } catch (e) {}
+ }
+ else
+ {
+ selection = doc.window.getSelection();
+ doc.focus();
+
+ if (selection)
+ {
+ try{range = selection.getRangeAt(0)}catch(e){};
+ }
+ else range = doc.document.createRange();
+
+ var fragment = doc.document.createDocumentFragment();
+ var div = doc.document.createElement("div");
+ div.innerHTML = html;
+
+ while (div.firstChild) {
+ fragment.appendChild(div.firstChild);
+ }
+
+ selection.removeAllRanges();
+ range.deleteContents();
+
+ var node = range.startContainer;
+ var pos = range.startOffset;
+
+ switch (node.nodeType) {
+ case 3:
+ if (fragment.nodeType == 3) {
+ node.insertData(pos, fragment.data);
+ range.setEnd(node, pos + fragment.length);
+ range.setStart(node, pos + fragment.length);
+ } else {
+ node = node.splitText(pos);
+ node.parentNode.insertBefore(fragment, node);
+ range.setEnd(node, pos + fragment.length);
+ range.setStart(node, pos + fragment.length);
+ }
+ break;
+
+ case 1:
+ node = node.childNodes[pos];
+ if(node==null)break;
+ node.parentNode.insertBefore(fragment, node);
+ range.setEnd(node, pos + fragment.length);
+ range.setStart(node, pos + fragment.length);
+ break;
+ }
+ selection.addRange(range);
+ }
+};
+
+function XK_over(id,color)
+{
+ document.getElementById('colortextf'+id).style.backgroundColor =color;
+ document.getElementById('showc'+id).value =color;
+};
+
+//returns selected text on iframe
+function XK_getSelectedText(id)
+{
+ var newselectionRange= XK_createRange(id);
+ if(isie)
+ {
+ var text=newselectionRange.htmlText;
+ }
+ else
+ {
+ var e = document.getElementById("iframe"+id);
+ var text = e.contentWindow.getSelection();
+ }
+ return text;
+};
+
+//to know if a range is inside a tag for iexplore
+function XK_isInsideThisTag(id,tagname)
+{
+ if (isie)
+ {
+ var range= XK_createRange(id);
+ var element = range.parentElement();
+ var tag = element.tagName.toLowerCase();
+ while ((tag!="body") && (tag!=tagname.toLowerCase()))
+ {
+ element = element.parentElement;
+ tag = element.tagName.toLowerCase();
+ }
+ if (tag==tagname.toLowerCase()) return (tag);
+ else return false;
+ }
+};
+
+function XK_cancelBubble(event)
+{
+ if(!isie){event.preventDefault();event.stopPropagation();}
+ else{event.cancelBubble = true;event.returnValue = false;}
+};
+
+//THE END.
+//Note: funny liar browsers
+
+// used by system_imagemanager.html
+function XoopsEditor_InsertImage(id,src,alt,align)
+{
+ return XK_InsertImage(id,src,alt,align);
+}
\ No newline at end of file
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/table_tools.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/table_tools.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/table_tools.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,869 @@
+/*
+* Samuels [Xoops Project]
+*
+*
+*
+// $Id: table_tools.js,v 1.1.2.1 2005/06/04 02:11:53 phppp Exp $
+*
+*/
+
+//-----------------------------------CLASSES-------------------------------------------
+
+//Class table
+function XK_table(id)
+{
+ this.id = id;
+ this.rows = 0;
+ this.columns = 0;
+ this.width = 200;
+ this.widthUnits = 'px';
+ this.height = 100;
+ this.heightUnits= 'px';
+ this.border = 1;
+ this.halignment = '';
+ this.valignment = '';
+ this.spacing = 0;
+ this.padding = 1;
+ this.head = false;
+};
+
+//Class tableNode
+function XK_tableNode (id)
+{
+ this.id = id;
+ this.td = this.getTd(); if (this.td==null) return;
+ this.table = this.getTable();
+ this.rowSelect = this.td.parentNode;
+ this.tableSelect= this.rowSelect.parentNode;
+
+};
+
+//-----------------------------------END CLASSES-------------------------------------------
+
+
+
+//Functions for doing things
+
+
+function XK_useTableOps(Option,id)
+{
+ myTableNode = new XK_tableNode(id);
+ if (myTableNode.td==null)return;
+
+
+ if (Option=='TableOps')XK_showHideDiv(id,'tpropbutton','TableOps');
+ else
+ {
+ eval('myTableNode.'+Option+''+'()');
+ }
+
+};
+
+//---------------------------DIVS AND POPUPS------------------------------------------
+
+function XK_useTableDivs(id,option)
+{
+ myTableNode = new XK_tableNode(id);
+ if (myTableNode.td==null)return;
+
+ switch(option)
+ {
+ case 'borders':
+ XK_showHideDiv(id,'cbbutton','CellBorders');
+ break;
+
+ case 'align':
+ XK_showHideDiv(id,'cellpropbutton','CellAlign');
+ break;
+
+ }
+
+}
+
+//---------------------------END DIVS AND POPUPS------------------------------------------
+
+function XK_isInsideCell(id)
+{
+ myTableNode = new XK_tableNode(id);
+ if (myTableNode.td==null)return false;
+ else return true;
+};
+
+
+function XK_CellColor(id,color)
+{
+ myTableNode = new XK_tableNode(id);
+ if (myTableNode.td==null)return;
+ myTableNode.td.bgColor=color;
+};
+
+
+function XK_TTools(id,url,name,width,height)
+{
+ myTableNode = new XK_tableNode(id);
+ if (myTableNode.td==null)return;
+ else XK_openPopup(url,name,width,height);
+ return;
+};
+
+
+function XK_cellAlign(id,Halign,Valign)
+{
+ myTableNode = new XK_tableNode(id);
+ if (myTableNode.td==null)return;
+
+ myTableNode.td.align=Halign;
+ myTableNode.td.vAlign=Valign;
+};
+
+
+function XK_quickBorders(id,borders,color)
+{
+ myTableNode = new XK_tableNode(id);
+ if (myTableNode.td==null)return;
+
+ var style='1px solid '+color;
+
+ switch(borders)
+ {
+ case 'all':
+ myTableNode.td.style.borderLeft= style;
+ myTableNode.td.style.borderRight= style;
+ myTableNode.td.style.borderBottom= style;
+ myTableNode.td.style.borderTop= style;
+ break;
+
+ case 'none':
+ myTableNode.td.style.borderLeft= 'none';
+ myTableNode.td.style.borderRight= 'none';
+ myTableNode.td.style.borderBottom= 'none';
+ myTableNode.td.style.borderTop= 'none';
+ break;
+
+ case 'top':
+ myTableNode.td.style.borderTop= style;
+ break;
+
+ case 'left':
+ myTableNode.td.style.borderLeft= style;
+ break;
+
+ case 'right':
+ myTableNode.td.style.borderRight= style;
+ break;
+
+ case 'bottom':
+ myTableNode.td.style.borderBottom= style;
+ break;
+ }
+};
+
+
+function XK_Easytable(id,rows,columns)
+{
+ var iframeId='iframe'+id;
+
+ myTable = new XK_table(id);
+ myTable.rows = rows;
+ myTable.columns = columns;
+ document.getElementById(iframeId).contentWindow.focus();
+
+ myTable.createTable();
+};
+
+function XK_createTable(id,table)
+{
+ myTable = new XK_table(id);
+ myTable.rows = table.rows;
+ myTable.columns = table.columns;
+ myTable.spacing = table.spacing;
+ myTable.padding = table.padding;
+ myTable.border = table.border;
+ myTable.width = table.width;
+ myTable.widthUnits = "px";
+ myTable.height = table.height;
+ myTable.heightUnits = "px";
+ myTable.createTable();
+};
+
+//--------------------------------CONSTRUCTORS----------------------------------------
+
+XK_table.prototype.createTable = function()
+{
+ rows = this.rows;
+ cols = this.columns;
+ head = false;
+ border = this.border+'px';
+ spacing = this.spacing+'px';
+ padding = this.padding+'px';
+ width = this.width+''+this.widthUnits;
+ height = this.height+''+this.heightUnits;
+
+ if ((rows > 0) && (cols > 0))
+ {
+ table = ' <table style=\x22height: '+height+'; width: '+width+';\x22 cellspacing='+spacing+' cellpadding='+padding+' border=' + border + '>';
+ for (var i=0; i < rows; i++)
+ {
+ table = table + ' <tr>';
+ for (var j=0; j < cols; j++)
+ {
+ if(i==0 && head=='1')
+ {
+ table += ' <th> </th>';
+ }
+ else
+ {
+ table += ' <td> </td>';
+ }
+ }
+ table += ' </tr>';
+ }
+ table += ' </table><br>';
+ XK_insertHTML(table,this.id);
+ }
+};
+
+XK_tableNode.prototype.deleteCol = function()
+{
+ if (this.td.parentNode.cells.length == 1)
+ {
+ if (isie)
+ {
+ this.table.removeNode(true);
+ }
+ return;
+ }
+
+ var lines= this.tableSelect.rows;
+ var colx= this.getColumnNo(this.td);
+ var rspan= new Array();
+ var newCell;
+ var cs;
+
+ for(var i=0; i<lines.length; i++)
+ {
+ row= this.tableSelect.rows[i];
+ idx=0;
+ for(var j=0; j<=colx ; j++)
+ {
+ if(!rspan[j+idx])rspan[j+idx]=0;
+ while(rspan[j+idx]){rspan[j+idx]--; idx++ }
+ if(row.cells[j]) rspan[j+idx]=row.cells[j].rowSpan-1;
+ if(!row.cells[j] || (j+idx>=colx) )
+ {
+ if(isie)
+ {
+ if(row.cells[j-1]) cs=row.cells[j-1].colSpan;
+ else cs=1;
+ }else cs=1;
+ if(cs==1) row.deleteCell(j);
+ else row.cells[j-1].colSpan -= 1;
+ break ;
+ }
+ idx += row.cells[j].colSpan-1;
+ }
+ }
+};
+
+XK_tableNode.prototype.deleteRow = function()
+{
+ //if number of rows=1 don't do anything under gecko and remove table under iexplore
+ var nr=this.table.rows.length;
+ if (nr==1)
+ {
+ if(isie)this.table.removeNode(true);
+ return;
+ }
+
+ var ridx = this.rowSelect.rowIndex;
+ var row = this.rowSelect;
+ var rlen= row.cells.length;
+ for(var i=0; i<rlen; i++)
+ {
+ if(row.cells[i].rowSpan>1)
+ {
+ var newCell= this.tableSelect.rows[ridx+1].insertCell(i);
+ newCell.rowSpan= row.cells[i].rowSpan - 1 ;
+ newCell.innerHTML= row.cells[i].innerHTML ;
+ row.cells[i].rowSpan =1;
+ }
+ }
+ while(row.cells.length) { row.deleteCell(0); }
+ for(var i=0; i<=ridx; i++)
+ {
+ row= this.tableSelect.rows[i];
+ for(var j=0; j<row.cells.length; j++)
+ {
+ if(row.cells[j].rowSpan>1 && i+row.cells[j].rowSpan>ridx)
+ row.cells[j].rowSpan -= 1;
+ }
+ }
+
+ if(row.cells.length==0) this.tableSelect.deleteRow(ridx);
+};
+
+
+XK_tableNode.prototype.deleteCell = function()
+{
+ var col= this.td.cellIndex;
+ this.rowSelect.deleteCell(col);
+ this.td = this.rowSelect.cells[col];
+ if(!this.td) this.td = this.rowSelect.cells[col-1];
+};
+
+XK_tableNode.prototype.decreaseRowSpan = function()
+{
+ var rowSpan= this.td.rowSpan;
+ var rowNum= this.tableSelect.rows.length;
+ var ridx= this.rowSelect.rowIndex+rowSpan-1; // next
+
+
+ var colx= this.getColumnNo(this.td) ; // current
+ var rowNext= this.tableSelect.rows[ridx];
+ var cidx=getCellIndex(colx, rowNext); // Next
+
+ this.td.rowSpan -= 1;
+
+ var newCell= rowNext.insertCell(cidx,1);
+ newCell.innerHTML= ' ' ;
+ rowNext.cells[cidx].colSpan = this.td.colSpan;
+};
+
+
+XK_tableNode.prototype.increaseRowSpan = function()
+{
+ var rowSpan= this.td.rowSpan;
+ var rowNum= this.tableSelect.rows.length;
+ var ridx= this.rowSelect.rowIndex+rowSpan; // next
+
+ if( ridx>=rowNum) return;
+
+ var colx= this.getColumnNo(this.td) ; // current
+
+ var rowNext= this.tableSelect.rows[ridx];
+ var cidx=getCellIndex(colx, rowNext); // Next
+ var cellNext= rowNext.cells[cidx];
+ if(!cellNext) return;
+
+ var coln= this.getColumnNo(cellNext) ; // cell Next row
+ if(coln != colx || cellNext.colSpan != this.td.colSpan )return;
+
+ this.td.rowSpan += rowNext.cells[cidx].rowSpan;
+ this.td.innerHTML += rowNext.cells[cidx].innerHTML;
+ rowNext.deleteCell(cidx);
+
+};
+
+XK_tableNode.prototype.increaseSpan = function()
+{
+ var cidx= this.td.cellIndex;
+ var row= this.td.parentNode;
+ var nxt= row.cells[cidx+1];
+
+ if(!nxt) return;
+
+ var maxcol= this.getMaxColumn();
+ var colx= this.getColumnNo(this.td) ; // current
+ var coln= this.getColumnNo(nxt) ; // next
+
+ if(colx+this.td.colSpan>=maxcol || colx+this.td.colSpan<coln || this.td.rowSpan != nxt.rowSpan) return;
+ this.td.innerHTML += nxt.innerHTML;
+ this.td.colSpan += nxt.colSpan;
+ row.deleteCell(cidx+1);
+};
+
+XK_tableNode.prototype.decreaseSpan = function()
+{
+ if(this.td.colSpan==1) return;
+ var col= this.td.cellIndex;
+ this.td.colSpan -= 1;
+ var newCell= this.td.parentNode.insertCell(col+1,1);
+ newCell.innerHTML= ' ' ;
+ newCell.rowSpan= this.td.rowSpan ;
+};
+
+XK_tableNode.prototype.insertCol = function()
+{
+
+ var lines= this.tableSelect.rows;
+ var colx= this.getColumnNo(this.td);
+ var rspan= new Array();
+ var newCell, cs,rc ;
+ for(var i=0; i<lines.length; i++)
+ {
+ row= this.tableSelect.rows[i];
+ idx=0;
+ for(var j=0; j<=colx ; j++) // j= cellIndex
+ {
+ if(!rspan[j+idx])rspan[j+idx]=0;
+ while(rspan[j+idx]){rspan[j+idx]--; idx++ }
+ if(row.cells[j]) rspan[j+idx]=row.cells[j].rowSpan-1;
+ if(!row.cells[j] || (j+idx>=colx) )
+ {
+ if(isie)
+ {
+ if(row.cells[j-1]) cs=row.cells[j-1].colSpan;
+ else cs=1;
+ }else cs=1;
+
+ if(cs==1)
+ {
+ newCell=row.insertCell(j);
+ newCell.innerHTML=' ';
+ break;
+ }
+ else
+ {
+ row.cells[j-1].colSpan += 1;
+ break ;
+ }
+ }
+ idx += row.cells[j].colSpan-1;
+ }
+ }
+};
+
+XK_tableNode.prototype.insertCell = function()
+{
+ var newCell= this.rowSelect.insertCell(this.td.cellIndex+1,1);
+ newCell.innerHTML= this.td.innerHTML ;
+};
+
+XK_tableNode.prototype.insertRow = function()
+{
+ var ridx= this.rowSelect.rowIndex;
+
+
+ var row= this.tableSelect.rows[ridx]; // first row
+ var idx=0;
+ for(var j=0; j<row.cells.length; j++) // j= cellIndex
+ {
+ if(!row.cells[j]) break;
+ idx += row.cells[j].colSpan-1
+ }
+
+ var colx= j+idx;
+ var newRow= this.tableSelect.insertRow(ridx);
+ var newCell;
+ for(var i=0; i<colx; i++)
+ {
+ newCell=newRow.insertCell(0,1);
+ newCell.innerHTML=' '
+ }
+
+ for(var i=0; i<=ridx; i++)
+ {
+ row= this.tableSelect.rows[i];
+ for(var j=0; j<row.cells.length; j++) // j= cellIndex
+ {
+ if(row.cells[j].rowSpan>1 && i+row.cells[j].rowSpan>ridx)
+ row.cells[j].rowSpan += 1;
+ }
+ }
+};
+
+XK_tableNode.prototype.getTd = function()
+{
+ var iframeId='iframe'+this.id;
+ if (isie)
+ {
+ document.getElementById(iframeId).contentWindow.focus();
+ if (document.getElementById(iframeId).contentWindow.document.selection.type != 'Control')
+ {
+ var tControl =document.getElementById(iframeId).contentWindow.document.selection.createRange();
+ tControl = tControl.parentElement();
+ while ((tControl.tagName.toLowerCase() != 'td') && (tControl.tagName.toLowerCase()!= 'th') && (tControl.tagName.toLowerCase()!= 'table') && (tControl.tagName.toLowerCase() != 'body'))
+ {
+ tControl = tControl.parentElement;
+ }
+ if ((tControl.tagName.toLowerCase() == 'td') || (tControl.tagName.toLowerCase() == 'th'))
+ return(tControl);
+ else
+ return (null);
+ }
+ else
+ {
+ return (null);
+ }
+ }
+ else
+ {
+ var td = this.XK_isInsideThisTagMoz ('TD');
+ if (td==false)td = this.XK_isInsideThisTagMoz ('TH');
+ if (td==false) return(null);
+ else return(td);
+ }
+};
+
+XK_tableNode.prototype.getTable = function()
+{
+ var iframeId='iframe'+this.id;
+ if (isie)
+ {
+ document.getElementById(iframeId).contentWindow.focus();
+ if (document.getElementById(iframeId).contentWindow.document.selection.type != 'Control')
+ {
+ var tControl =document.getElementById(iframeId).contentWindow.document.selection.createRange();
+ tControl = tControl.parentElement();
+ while ((tControl.tagName.toLowerCase() != 'table') && (tControl.tagName.toLowerCase() != 'body'))
+ {
+ tControl = tControl.parentElement;
+ }
+ if (tControl.tagName.toLowerCase() == 'table')
+ return(tControl);
+ else
+ return(null);
+ }
+ else
+ {
+ return(null);
+ }
+ }
+ else
+ {
+ var table = this.XK_isInsideThisTagMoz ('TABLE');
+ if (table==false) return(null);
+ else return(table);
+ }
+};
+
+XK_tableNode.prototype.getColumnNo = function(oTD)
+{
+ var cidx= oTD.cellIndex;
+ var rowSelect= oTD.parentNode;
+ var idx, row, colx ;
+ var rspan = new Array() ;
+ for(var i=0; i<rowSelect.rowIndex+1; i++)
+ {
+ row= this.tableSelect.rows[i];
+ idx=0;
+ for(var j=0; j<row.cells.length; j++) // j= cellIndex
+ {
+ if(!rspan[j+idx])rspan[j+idx]=0;
+ if(!row.cells[j]) break;
+ while(rspan[j+idx]>0) { rspan[j+idx]--; idx++ }
+ rspan[j+idx]=row.cells[j].rowSpan-1;
+ if(i==rowSelect.rowIndex && j==cidx){ colx=j+idx; break }
+ idx += row.cells[j].colSpan-1;
+ }
+ }
+ return colx;
+};
+
+XK_tableNode.prototype.getMaxColumn = function()
+{
+ var cell, colnum=0;
+ for(var i=0; i<this.tableSelect.rows[0].cells.length ; i++) // i= cellIndex
+ {
+ cell= this.tableSelect.rows[0].cells[i];
+ colnum += cell.colSpan;
+ }
+ return colnum;
+};
+
+XK_tableNode.prototype.XK_isInsideThisTagMoz = function(tagname)
+{
+ var iframeId='iframe'+this.id;
+ var sel=document.getElementById(iframeId).contentWindow.getSelection();
+ var range = sel.getRangeAt(0);
+ var container = range.startContainer;
+ if (container.nodeType != 1) {
+ var textNode = container;
+ container = textNode.parentNode;
+ }
+ thisTag = container;
+ while(thisTag.tagName.toLowerCase()!=tagname.toLowerCase() &&thisTag.tagName.toLowerCase()!='body') {
+ thisTag = thisTag.parentNode;
+ }
+ if (thisTag.tagName.toLowerCase() == tagname.toLowerCase()) {
+ return (thisTag);
+ } else {
+ return false;
+ }
+};
+
+//---------------------------------END CONSTRUCTORS----------------------------------------------------
+
+
+//useful functions
+
+function XK_RgbToHex(rgb)
+{
+ var digit = new Array ( '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' );
+ var hex= new Array();
+ var r = new Array();
+ var n1;
+ var n2;
+ var retstr;
+
+ //prepare numbers
+ rgb = rgb.substr(4);
+ rgb = rgb.replace(/\)/, '');
+ r= rgb.split(',');
+
+
+ for(i=0;i<3;i++)
+ {
+ n1 = Math.floor ( r[i] / 16 );
+ n2 = r[i] - n1 * 16;
+ retstr = digit[ n1 ];
+ retstr += digit[ n2 ];
+ hex[i]=retstr;
+ }
+ return('#'+hex[0]+''+hex[1]+''+hex[2]+'');
+
+};
+
+
+function XK_tableOver(id,i,j)
+{
+var prueb;
+ for(r=1;r<=i;r++)
+ {
+ for(s=1;s<=j;s++)
+ {
+ x =document.getElementById(id+'-'+r+'-'+s);
+ x.style.backgroundColor = 'blue';
+ }
+ }
+};
+
+function XK_tableOut(id,i,j)
+{
+ for(r=1;r<=i;r++)
+ {
+ for(s=1;s<=j;s++)
+ {
+ x =document.getElementById(id+'-'+r+'-'+s);
+ x.style.backgroundColor = 'white';
+ }
+ }
+
+};
+
+function XK_tableClick(id,i,j)
+{
+ XK_Easytable(id,i,j);
+ XK_tableOut(id);
+};
+
+function XK_tableProp(id,ntProps)
+{
+ var iframeId='iframe'+id;
+ document.getElementById(iframeId).contentWindow.focus();
+ myTableNode = new XK_tableNode(id);
+ var tTable = myTableNode.table ;
+
+ var tProps = {};
+ tProps.width = (tTable.style.width)?tTable.style.width:tTable.width;
+ tProps.height = (tTable.style.height)?tTable.style.height:tTable.height;
+ tProps.border = tTable.border;
+ tProps.borderColor = tTable.getAttribute('borderColor');
+ tProps.cellPadding = tTable.cellPadding;
+ tProps.cellSpacing = tTable.cellSpacing;
+ tProps.bgColor = tTable.bgColor;
+ tProps.backgroundImage = tTable.style.backgroundImage;
+ tProps.collapse =(tTable.style.borderCollapse)?tTable.style.borderCollapse:'';
+ tProps.className = tTable.className;
+
+ if (ntProps!=null)
+ {
+ // set new settings
+
+ tTable.style.borderCollapse=ntProps.collapse;
+
+ if (ntProps.width)
+ {
+ tTable.style.width = ntProps.width;
+ }
+ else tTable.style.width ='';
+ tTable.removeAttribute('width',0);
+
+ if (ntProps.height)
+ {
+ tTable.style.height = ntProps.height;
+ }
+ else tTable.style.height ='';
+ tTable.removeAttribute('height',0);
+
+ if (ntProps.border)tTable.border = ntProps.border;
+ else tTable.removeAttribute('border',0);
+ if (ntProps.cellPadding)tTable.cellPadding = ntProps.cellPadding;
+ else tTable.removeAttribute('cellpadding',0);
+ if (ntProps.cellSpacing)tTable.cellSpacing = ntProps.cellSpacing;
+ else tTable.removeAttribute('cellspacing',0);
+ if (ntProps.bgColor)tTable.bgColor = ntProps.bgColor;
+ else tTable.removeAttribute('bgcolor',0);
+ if (ntProps.background)tTable.background = ntProps.background;
+ else tTable.removeAttribute('background',0);
+ if (ntProps.borderColor)tTable.setAttribute('borderColor',ntProps.borderColor);
+ else tTable.removeAttribute('borderColor',0);
+
+ if (ntProps.className)tTable.className = ntProps.className;
+ else tTable.removeAttribute('className',0);
+
+ if(ntProps.backgroundImage)tTable.style.backgroundImage = 'url('+ntProps.backgroundImage+')';
+ else{
+ tTable.removeAttribute('backgroundImage',0);
+ tTable.style.backgroundImage='';
+ }
+ }
+ else return tProps;
+};
+
+function XK_cellProp(id,ncProps)
+{
+ myTableNode = new XK_tableNode(id);
+ var cd = myTableNode.td;
+ var cProps = {};
+ cProps.width = (cd.style.width)?cd.style.width:cd.width;
+ cProps.height = (cd.style.height)?cd.style.height:cd.height;
+ cProps.bgColor = cd.bgColor;
+ cProps.backgroundImage = cd.style.backgroundImage;
+ cProps.align = cd.align;
+ cProps.valign = cd.valign;
+ cProps.className = cd.className;
+ cProps.noWrap = cd.noWrap;
+ //borders style
+
+ cProps.borderLeftStyle = cd.style.borderLeftStyle;
+ cProps.borderRightStyle = cd.style.borderRightStyle;
+ cProps.borderTopStyle = cd.style.borderTopStyle;
+ cProps.borderBottomStyle = cd.style.borderBottomStyle;
+
+ //borders Width
+ cProps.borderLeftWidth = cd.style.borderLeftWidth;
+ cProps.borderRightWidth = cd.style.borderRightWidth;
+ cProps.borderTopWidth = cd.style.borderTopWidth;
+ cProps.borderBottomWidth = cd.style.borderBottomWidth;
+
+ //borders Color
+ if(isie)
+ {
+ cProps.borderLeftColor = cd.style.borderLeftColor;
+ cProps.borderRightColor = cd.style.borderRightColor;
+ cProps.borderTopColor = cd.style.borderTopColor;
+ cProps.borderBottomColor = cd.style.borderBottomColor;
+ }
+ else
+ {
+ cProps.borderLeftColor = (cd.style.borderLeftColor)?XK_RgbToHex(cd.style.borderLeftColor):cd.style.borderLeftColor;
+ cProps.borderRightColor = (cd.style.borderRightColor)?XK_RgbToHex(cd.style.borderRightColor):cd.style.borderRightColor;
+ cProps.borderTopColor = (cd.style.borderTopColor)?XK_RgbToHex(cd.style.borderTopColor):cd.style.borderTopColor;
+ cProps.borderBottomColor = (cd.style.borderBottomColor)?XK_RgbToHex(cd.style.borderBottomColor):cd.style.borderBottomColor;
+ }
+
+ //padding
+ cProps.paddingLeft = cd.style.paddingLeft;
+ cProps.paddingRight = cd.style.paddingRight;
+ cProps.paddingTop = cd.style.paddingTop;
+ cProps.paddingBottom = cd.style.paddingBottom;
+
+
+ if (ncProps!=null)
+ {
+ //new settings
+ if (ncProps.align)cd.align = ncProps.align;
+ else cd.removeAttribute('align',0);
+ if (ncProps.vAlign)cd.vAlign = ncProps.vAlign;
+ else cd.removeAttribute('valign',0);
+ if (ncProps.width)
+ {
+ cd.style.width = ncProps.width;
+ cd.removeAttribute('width',0);
+ }
+ else
+ {
+ cd.style.width = '';
+ cd.removeAttribute('width',0);
+ }
+ if (ncProps.height)
+ {
+ cd.style.height = ncProps.height;
+ cd.removeAttribute('height',0);
+ }
+ else
+ {
+ cd.style.height = '';
+ cd.removeAttribute('height',0);
+ }
+ cd.style.height = (ncProps.height)?ncProps.height:'';
+ if (ncProps.bgColor)cd.bgColor = ncProps.bgColor;
+ else cd.removeAttribute('bgcolor',0);
+ if (ncProps.background)cd.background = ncProps.background;
+ else cd.removeAttribute('background',0);
+ if (ncProps.className)cd.className = ncProps.className;
+ else cd.removeAttribute('className',0);
+ if (ncProps.noWrap)cd.noWrap = ncProps.noWrap;
+ else cd.removeAttribute('nowrap',0);
+
+ //borders style
+
+ cd.style.borderLeftStyle = ncProps.borderLeftStyle;
+ cd.style.borderRightStyle = ncProps.borderRightStyle;
+ cd.style.borderTopStyle = ncProps.borderTopStyle;
+ cd.style.borderBottomStyle = ncProps.borderBottomStyle;
+
+ //borders Width
+ cd.style.borderLeftWidth = ncProps.borderLeftWidth;
+ cd.style.borderRightWidth = ncProps.borderRightWidth;
+ cd.style.borderTopWidth = ncProps.borderTopWidth;
+ cd.style.borderBottomWidth = ncProps.borderBottomWidth;
+
+ //borders Color
+ cd.style.borderLeftColor = ncProps.borderLeftColor;
+ cd.style.borderRightColor = ncProps.borderRightColor;
+ cd.style.borderTopColor = ncProps.borderTopColor;
+ cd.style.borderBottomColor = ncProps.borderBottomColor;
+
+ ///padding Width
+ cd.style.paddingLeft = ncProps.paddingLeft;
+ cd.style.paddingRight = ncProps.paddingRight;
+ cd.style.paddingTop = ncProps.paddingTop;
+ cd.style.paddingBottom = ncProps.paddingBottom;
+
+ if(ncProps.backgroundImage)cd.style.backgroundImage = 'url('+ncProps.backgroundImage+')';
+ else{
+ cd.removeAttribute('backgroundImage',0);
+ cd.style.backgroundImage='';
+ }
+
+ return;
+ }
+ else return cProps;
+};
+
+function getCellIndex(colx, row)
+{
+ var tableSelect= row.parentNode;
+ var rowIdx= row.rowIndex;
+
+ var rspan= new Array();
+ var newCell, cs , idx;
+ for(var i=0; i<rowIdx+1; i++)
+ {
+ row= tableSelect.rows[i];
+ idx=0;
+ for(var j=0; j<=colx ; j++) // j= cellIndex
+ {
+ if(!rspan[j+idx])rspan[j+idx]=0;
+
+ while(rspan[j+idx]){rspan[j+idx]--; idx++ }
+
+ if(row.cells[j]) rspan[j+idx]=row.cells[j].rowSpan-1;
+ if(!row.cells[j] || (j+idx>=colx) )
+ {
+ if(i==rowIdx) return j;
+ else break;
+ }
+ idx += row.cells[j].colSpan-1;
+ }
+ }
+
+};
+
+function XK_toggleBorders(id)
+{
+ try{XK_DeleteCss(id,'xoopsborders')}
+ catch(e){XK_AppendCss(id,url+'/skins/common/borders.css','xoopsborders');}
+};
\ No newline at end of file
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/xhtml.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/xhtml.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/include/js/xhtml.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,362 @@
+/*
+* Samuels [Xoops Project]
+* Based on Get XHTML for IE 1.03
+*
+* Created by Erik Arvidsson
+* (http://webfx.eae.net/contact.html#erik)
+* For WebFX (http://webfx.eae.net/)
+*
+*
+// $Id: xhtml.js,v 1.1.2.1 2005/06/04 02:11:53 phppp Exp $
+*
+* Some Functions for cleaning code and make it as xhtml compilant as possible
+*/
+
+//info from http://www.cs.tut.fi/~jkorpela/html/empty.html
+var empty_elements ='|area|base|basefont|br|col|frame|hr|img|input|isindex|link|meta|param|';
+var weird_attributes = '|contenteditable|_msh|_moz|_moz-userdefined|_base_href|_moz_resizing|_moz_dirty|_moz_editor_bogus_node|_xk_made|';
+
+var auxtext=null;
+var avoidtext = false;
+
+function XK_removeFormat(id,option)
+{
+ var doc=document.getElementById('iframe'+id).contentWindow;
+ var text=doc.document.body.innerHTML;
+ if (text=='')return;
+
+ switch(option)
+ {
+ case 'word':
+ text=XK_cleanWORD(text);
+ break;
+
+ case 'span':
+ text= text.replace(/<\/?span[^>]*>/gi,'');
+ break;
+
+ case 'font':
+ text= text.replace(/<\/?font[^>]*>/gi,'');
+ break;
+
+ case 'div':
+ text= text.replace(/<\/?div[^>]*>/gi,'');
+ break;
+
+ case 'all':
+ text= text.replace(/<\/?[^>]*>/gi,'');
+
+ case 'lineBreaks':
+ text= text.replace(/\s/g,' ');
+ //text= text.replace(/<br \/>/gi,' ');
+ //text = text.replace(/<br>/gi,' ');
+ break;
+
+ case 'empty':
+ text = XK_removeEmptyTags(text);
+
+ case 'style':
+ text= text.replace(/<([\w]+)style=\"([^\"]*)\"([^>]*)/gi,"<$1$3");
+ break;
+ }
+ doc.document.body.innerHTML=text;
+ document.getElementById('RemoveFormat'+id).style.display="none";
+};
+
+function XK_removeEmptyTags(text)
+{
+ text = text.replace(/(<[^\/]*[^td]>|<[^\/][^>]*[^\/]*[^td]>)\s*<\/[^>]*[^td]>/gi, "");
+ return text;
+}
+
+function XK_codeCleaner(text)
+{
+ //replace characters,
+ //mmm disabled by now for compatibility reasons
+ //text = XK_replaceCharacters(text);
+
+ //replace linebreaks with spaces
+ text= text.replace(/\s/g," ");
+
+ //destroy tbody tags
+ text = text.replace(/<tbody>/gi,"");
+ text = text.replace(/<\/tbody>/gi,"");
+
+ //remove strange tags
+ text = text.replace(/<[p|div|span|font] [^>]*\/>/gi, "");
+
+ //for mozilla
+ if (!isie)
+ {
+ text = text.replace(/<b>/gi, "<strong>");
+ text = text.replace(/<b /gi, "<strong ");
+ text = text.replace(/<\/b>/gi, "</strong>");
+ text = text.replace(/<i>/gi, "<em>");
+ text = text.replace(/<i /gi, "<em ");
+ text = text.replace(/<\/i>/gi, "</em>");
+ text = text.replace(/<br type="_moz" \/>/gi, "<br />");
+
+ //hilite text crossbrowser compatibility
+ text = text.replace(/<span style=\x22background-color:((.|\s)+?)>((.|\s)+?)<\/span>/gi,'<font style=\x22background-color:$1>$3</font>');
+ }
+ text = text.replace(/style="">/gi, ">");
+ //anchor
+ text = text.replace(/<img id=((.|\s)+?) title=((.|\s)+?)>/gi, '<a name=$1></a>');
+ return text;
+};
+
+function XK_toWYSIWYG(text)
+{
+ if (!isie)
+ {
+ text = text.replace(/<br \/>/gi,"<br>");
+ text = text.replace(/<strong>/gi, "<b>");
+ text = text.replace(/<strong /gi, "<b ");
+ text = text.replace(/<\/strong>/gi, "</b>");
+ text = text.replace(/<em>/gi, "<i>");
+ text = text.replace(/<em /gi, "<i ");
+ text = text.replace(/<\/em>/gi, "</i>");
+ }
+ else
+ {
+ text = text.replace(/<br \/>/gi,"<br>");
+ text = text.replace(/<b>/gi, "<strong>");
+ text = text.replace(/<b /gi, "<strong ");
+ text = text.replace(/<\/b>/gi, "</strong>");
+ text = text.replace(/<i>/gi, "<em>");
+ text = text.replace(/<i /gi, "<em ");
+ text = text.replace(/<\/i>/gi, "</em>");
+
+ }
+ text = text.replace(/<a name=\"(.*?)\"><\/a>/gi, '<img alt=\x22anchor\x22 id=\"$1\" title=\"$1\" src=\"'+url+'/skins/common/anchor.gif\" />');
+ text = XK_removeLineBreaks(text);
+ return text;
+};
+
+function XK_cleanWORD(text) {
+ if (text.indexOf('Mso') >= 0)
+ {
+
+ // make one line
+ text = text.replace(/\s/g,' ').replace(/\ \;/g,' ');
+
+ // keep tags, strip attributes
+ text = text.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3");
+
+ // Remove Style attributes
+ text = text.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi, "<$1$3");
+ text = text.replace(/ align=[^\s|>]*/gi,'');
+
+ //clean up tags
+ text = text.replace(/<b [^>]*>/gi,'<b>').
+ replace(/<i [^>]*>/gi,'<i>').
+ replace(/<li [^>]*>/gi,'<li>').
+ replace(/<ul [^>]*>/gi,'<ul>');
+
+ // replace outdated tags
+ text = text.replace(/<b>/gi,'<strong>').
+ replace(/<\/b>/gi,'</strong>');
+
+ // mozilla doesn't like <em> tags
+ text = text.replace(/<em>/gi,'<i>').
+ replace(/<\/em>/gi,'</i>');
+
+ // kill unwanted tags
+ text = text.replace(/<\?xml:[^>]*>/g, '').// Word xml
+ replace(/<\/?st1:[^>]*>/g,''). // Word SmartTags
+ replace(/<\/?[a-z]\:[^>]*>/g,''). // All other funny Word non-HTML stuff
+ replace(/<\/?span[^>]*>/gi,'').
+ replace(/<\/?div[^>]*>/gi,'').
+ replace(/<\/?pre[^>]*>/gi,'').
+ replace(/<\/?h[1-6][^>]*>/gi,'');
+
+ //remove empty tags
+ text = XK_removeEmptyTags(text);
+
+ // nuke double spaces
+ text = text.replace(/ */gi,' ');
+ return text;
+ }
+ return text;
+};
+
+function XK_removeLineBreaks(text)
+{
+ //delete \n after html tags
+ text = text.replace(/<\/(.*?)>\n/gi,"<\/$1>");
+ return text;
+};
+
+function XK_addLineBreaks(text)
+{
+ //add \n to html tags
+ text = text.replace(/<\/(.*?)>/gi,"<\/$1>\n");
+ return text;
+};
+
+function XK_replaceCharacters(text)
+{
+ //don't compress
+ var htmlcharacters = ['€','‘','’','“','”','–','—','¡','¢','£','¤','¥','¦','§','¨','©','ª','«','¬','®','¯','°','±','²','³','´','µ','¶','·','¸','¹','º','»','¼','½','¾','¿','À','Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö','×','Ø','Ù','Ú','Û','Ü','Ý','Þ','ß','à','á','â','ã','ä','å','æ','ç','è','é','ê','ë','ì','í','î','ï','ð','ñ','ò','ó','ô','õ','ö','÷','ø','ù','ú'!
,'û','ü','ý','þ','ÿ'];
+ var characters=['\u20AC','\u2018','\u2019','\u201C','\u201D','\u2013','\u2014','\u00A1','\u00A2','\u00A3','\u00A4','\u00A5','\u00A6','\u00A7','\u00A8','\u00A9','\u00AA','\u00AB','\u00AC','\u00AE','\u00AF','\u00B0','\u00B1','\u00B2','\u00B3','\u00B4','\u00B5','\u00B6','\u00B7','\u00B8','\u00B9','\u00BA','\u00BB','\u00BC','\u00BD','\u00BE','\u00BF','\u00C0','\u00C1','\u00C2','\u00C3','\u00C4','\u00C5','\u00C6','\u00C7','\u00C8','\u00C9','\u00CA','\u00CB','\u00CC','\u00CD','\u00CE','\u00CF','\u00D0','\u00D1','\u00D2','\u00D3','\u00D4','\u00D5','\u00D6','\u00D7','\u00D8','\u00D9','\u00DA','\u00DB','\u00DC','\u00DD','\u00DE','\u00DF','\u00E0','\u00E1','\u00E2','\u00E3','\u00E4','\u00E5','\u00E6','\u00E7','\u00E8','\u00E9','\u00EA','\u00EB','\u00EC','\u00ED','\u00EE','\u00EF','\u00F0','\u00F1','\u00F2','\u00F3','\u00F4','\u00F5','\u00F6','\u00F7','\u00F8','\u00F9','\u00FA','\u00FB','\u00FC','\u00FD','\u00FE','\u00FF'];
+ //don't compress
+
+ for(var i = 0; i < characters.length; i++)
+ {
+ text = text.replace(eval('/'+characters[i]+'/g'),htmlcharacters[i]);
+ }
+ return text;
+};
+
+function XK_getXHTML(oNode)
+{
+ var sb = new XK_StringBuilder;
+ var cs = oNode.childNodes;
+ var avoidtext = false;
+ var l = cs.length;
+ for (var i = 0; i < l; i++)
+ XK_appendNodeXHTML(cs[i], sb);
+ return XK_codeCleaner(sb.toString());
+}
+
+function XK_fixAttribute(s)
+{
+ return String(s).replace(/\&/g, "&").replace(/</g, "<").replace(/\"/g, """);
+}
+
+function XK_fixText(s)
+{
+ return String(s).replace(/\&/g, "&").replace(/</g, "<");
+}
+
+function XK_getAttributeValue(oAttrNode, oElementNode, sb)
+{
+ if (!oAttrNode.specified)return;
+
+ var name = oAttrNode.nodeName;
+ var value = oAttrNode.nodeValue;
+
+ if(weird_attributes.indexOf('|'+name+'|') != -1)return;
+ if (name != "style" )
+ {
+ // IE5.x bugs for number values
+ if (!isNaN(value))value = oElementNode.getAttribute(name);
+ sb.append(" " + (oAttrNode.expando ? name : name.toLowerCase()) + "=\"" + XK_fixAttribute(value) + "\"");
+ }
+ else sb.append(" style=\"" + XK_fixAttribute(oElementNode.style.cssText.toLowerCase()) + "\"");
+}
+
+//this is a example of two buggy browsers in action
+function XK_appendNodeXHTML(node, sb)
+{
+
+ switch (node.nodeType)
+ {
+ case 1: // ELEMENT
+
+ // IE5.0 and IE5.5 are weird
+ if (node.nodeName == "!") { sb.append(node.text);break;}
+ var name = node.tagName.toLowerCase();
+
+ //stupid explorer it adds extra meta tag
+ if (name == "meta" && (node.getAttribute('name') == "GENERATOR"))break;
+
+ //stupid gecko it adds extra br's
+ if (name == 'br' && !node.nextSibling)break;
+
+ //aaaaj, again stupid explorer. It duplicates code, I need to mark all tags to know if they are already parsed.
+ if (avoidtext){if (node.innerHTML == "" && node.canHaveChildren) {avoidtext = false;break;}}
+ if (isie) {if (node._xk_made) {avoidtext = true;break;}node._xk_made = true;}
+
+ sb.append("<" + name);
+
+ var attrs = node.attributes;
+ var l = attrs.length;
+ for (var i = 0; i < l; i++)
+ {
+ XK_getAttributeValue(attrs[i], node, sb);
+ }
+
+ //avoid confussion between tags that need empty closing "/>" and empty tags f.i:"<b></b>" under gecko
+ var isempty=(!isie && empty_elements.indexOf('|'+name+'|') == -1)?true:false;
+
+ if (node.canHaveChildren || node.hasChildNodes()|| isempty )
+ {
+ sb.append(">");
+
+
+ // childNodes
+ var cs = node.childNodes;
+ l = cs.length;
+ for (var i = 0; i < l; i++)
+ {
+ XK_appendNodeXHTML(cs[i], sb);
+ }
+ sb.append("</" + name + ">");
+ }
+
+ else if (name == "script")sb.append(">" + node.text + "</" + name + ">");
+ else if (name == "title" || name == "style" || name == "comment")sb.append(">" + node.innerHTML + "</" + name + ">");
+ else sb.append(" />");
+ break;
+
+ case 3: // TEXT
+ if (auxtext==node){auxtext=null;break;}if(isie){auxtext=node;}
+ sb.append( XK_fixText(node.nodeValue) );
+ break;
+
+ case 4:
+ sb.append("<![CDA" + "TA[\n" + node.nodeValue + "\n]" + "]>");
+ break;
+
+ case 8:
+ sb.append(node.text);
+ if (/(^<\?xml)|(^<\!DOCTYPE)/.test(node.text) )sb.append("\n");
+ break;
+
+ case 9: // DOCUMENT
+ // childNodes
+ var cs = node.childNodes;
+ l = cs.length;
+ for (var i = 0; i < l; i++)
+ {
+ XK_appendNodeXHTML(cs[i], sb);
+ }
+ break;
+
+ default:
+ sb.append("<!--\nNot Supported:\n\n" + "nodeType: " + node.nodeType + "\nnodeName: " + node.nodeName + "\n-->");
+ }
+}
+
+function XK_StringBuilder(sString)
+{
+ // public
+ this.length = 0;
+
+ this.append = function (sString)
+ {
+ // append argument
+ this.length += (this._parts[this._current++] = String(sString)).length;
+ // reset cache
+ this._string = null;
+ return this;
+ };
+
+ this.toString = function ()
+ {
+ if (this._string != null)return this._string;
+ var s = this._parts.join("");
+ this._parts = [s];
+ this._current = 1;
+ return this._string = s;
+ };
+
+ // private
+ this._current = 0;
+ this._parts = [];
+ this._string = null; // used to cache the string
+
+ // init
+ if (sString != null)this.append(sString);
+}
\ No newline at end of file
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/language/english.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/language/english.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/language/english.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,199 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+define("_XOOPS_EDITOR_KOIVI", "Koivi Editor");
+
+define("_XK_LEFTTORIGHT","Left-Hand Writing");
+define("_XK_RIGHTTOLEFT","Right-Hand Writing");
+
+define("_MSC_SMILIES","Smilies");
+define("_MSC_CLICKASMILIE","Click a smilie to insert it into your message.");
+define("_MSC_CODE","Code");
+define("_MSC_EMOTION","Emotion");
+
+define('_XK_FONT','Font');
+define('_XK_FONT_SIZE','Size');
+define('_XK_FONT_XSMALL','X Small');
+define('_XK_FONT_SMALL','Small');
+define('_XK_FONT_MEDIUM','Medium');
+define('_XK_FONT_LARGE','Large');
+define('_XK_FONT_XLARGE','X Large');
+define('_XK_FONT_XXLARGE','XX Large');
+define('_XK_FONT_FORMAT','Format');
+define('_XK_FONT_NONE','None');
+define('_XK_FONT_HEADING1','Heading 1');
+define('_XK_FONT_HEADING2','Heading 2');
+define('_XK_FONT_HEADING3','Heading 3');
+define('_XK_FONT_HEADING4','Heading 4');
+define('_XK_FONT_HEADING5','Heading 5');
+define('_XK_FONT_HEADING6','Heading 6');
+define('_XK_FONT_ADDRESS','Address');
+define('_XK_FONT_PARAGRAPH','Paragraph');
+define('_XK_FONT_FORMATTED','Formatted');
+
+define('_XK_TOGLE_MODE','Change Mode');
+define('_XK_ENABLECSS_MODE','See a real preview attaching the css theme file');
+define('_XK_TABLEBORDERS_TOGGLE','Toggle Table Borders');
+define('_XK_UNDO','Undo');
+define('_XK_REDO','Redo');
+define('_XK_FORECOLOR','Color');
+define('_XK_HILITECOLOR','Hilite');
+define('_XK_CUT','Cut');
+define('_XK_COPY','Copy');
+define('_XK_PASTE','Paste');
+define('_XK_PASTESPECIAL','Paste Special...');
+define('_XK_PASTEINSTRUCTIONS','Use Ctrl+v to paste');
+define('_XK_BOLD','Bold');
+define('_XK_ITALIC','Italic');
+define('_XK_UNDERLINE','Underline');
+define('_XK_STRIKETHROUGH','Strikethrouhg');
+define('_XK_REMOVEFORMAT','Remove Format');
+define('_XK_JUSTIFYLEFT','Justify Left');
+define('_XK_JUSTIFYCENTER','Justify Center');
+define('_XK_JUSTIFYRIGHT','Justify Right');
+define('_XK_JUSTIFYFULL','Justify Full');
+define('_XK_NEWPARAGRAPH','Turn On/Off New Paragraph Mode');
+define('_XK_INSERTORDEREDLIST','Ordered List');
+define('_XK_INSERTUNORDEREDLIST','Bulleted List');
+define('_XK_SPELLCHECK','Spellcheck');
+define('_XK_PRINT','Print');
+define('_XK_INDENT','Indent');
+define('_XK_OUTDENT','Outdent');
+define('_XK_SUPERSCRIPT','SuperScript');
+define('_XK_SUBSCRIPT','SubScript');
+define('_XK_CODE','Code');
+define('_XK_QUOTE','Quote');
+define('_XK_CREATELINK','Create link');
+define('_XK_UNLINK','Remove Link');
+define('_XK_INSERTHORIZONTALRULE','Insert Horizontal Rule');
+define('_XK_INSERTANCHOR','Insert Anchor');
+define('_XK_CREATEQUICKTABLE','Insert Quick Table');
+define('_XK_INSERTIMAGE','Insert Image');
+define('_XK_INSERTIMAGEM','Image Manager');
+define('_XK_FLOAT','Floating/Static Toolbar');
+define('_XK_SYMBOLS','Symbols');
+define('_XK_INSERTDATE','Insert Time and Date');
+define('_XK_CLASS','Class');
+
+//Image properties dialog
+define('_XK_EDITIMAGE','Edit Image');
+define('_XK_IMAGE','Image');
+define('_XK_IMAGEWIDTH','Image width');
+define('_XK_IMAGEHEIGHT','Image height');
+define('_XK_IMAGEPROPS','Image Properties');
+define('_XK_MARGINS','Margins');
+define('_XK_ALT','Alt');
+define('_XK_SRC','Source');
+define('_XK_IMAGEALIGN','Image Align');
+define('_XK_HSPACE','V Space.');
+define('_XK_VSPACE','H Space.');
+define('_XK_BWIDTH','Width');
+
+//table dialog
+define('_XK_INSERTTABLE','Insert Table');
+define('_XK_EDITTABLE','Edit Table');
+define('_XK_ROWS','Number of rows');
+define('_XK_COLS','Number of columns');
+define('_XK_WIDTH','Width');
+define('_XK_HEIGHT','Height');
+define('_XK_UNITS','Units');
+define('_XK_BORDER','Border');
+define('_XK_HALIGNMENT','Horizontal Alignment');
+define('_XK_VALIGNMENT','Vertical Alignment');
+define('_XK_SPACING','Cell Spacing');
+define('_XK_PADDING','Cell Padding');
+define('_XK_LEFT','Left');
+define('_XK_RIGHT','Right');
+define('_XK_CENTER','Center');
+define('_XK_TOP','Top');
+define('_XK_TEXTTOP','Text Top');
+define('_XK_MIDDLE','Middle');
+define('_XK_ABSMIDDLE','Absolute Middle');
+define('_XK_BOTTOM','Bottom');
+define('_XK_ABSBOTTOM','Absolute Bottom');
+define('_XK_BASELINE','Baseline');
+define('_XK_DEFAULT','Default');
+define('_XK_BORDERCOLOR','Border Color');
+define('_XK_BCOLLPASE','Border Collapse');
+
+
+//table tools
+define('_XK_INSERTCELL','Insert Cell');
+define('_XK_INSERTCOL','Insert Col');
+define('_XK_INSERTROW','Insert Row');
+define('_XK_DELCELL','Del Cell');
+define('_XK_DELROW','Del Row');
+define('_XK_DELCOL','Del Col');
+define('_XK_TABLEPROPS','Table Properties');
+define('_XK_TABLETOOLS','Table Tools');
+define('_XK_MORECOLSPAN','More Col Span');
+define('_XK_LESSCOLSPAN','Less Col Span');
+define('_XK_MOREROWSPAN','More Row Span');
+define('_XK_LESSROWSPAN','Less Row Span');
+
+//CELL TOOLS
+define('_XK_IMGBACK','Background Image');
+define('_XK_CELLALIGN','Cell Align');
+define('_XK_CELLPROPS','Cell Properties');
+define('_XK_CELLALIGNLEFTTOP','Left Top');
+define('_XK_CELLALIGNLEFTMIDDLE','Left Middle');
+define('_XK_CELLALIGNLEFTBOTTOM','Left Bottom');
+define('_XK_CELLALIGNRIGHTTOP','Right Top');
+define('_XK_CELLALIGNRIGHTMIDDLE','Right Middle');
+define('_XK_CELLALIGNRIGHTBOTTOM','Right Bottom');
+define('_XK_CELLALIGNCENTERTOP','Center Top');
+define('_XK_CELLALIGNCENTERMIDDLE','Center Middle');
+define('_XK_CELLALIGNCENTERBOTTOM','Center Bottom');
+define('_XK_PREVIEW','Preview');
+define('_XK_OTHERS','Others');
+define('_XK_CELLOVERFLOW','Overflow');
+define('_XK_CELLWIDTH','Width');
+define('_XK_CELLHEIGHT','Height');
+define('_XK_CELLPADDING','Cell Padding');
+
+//BORDERS
+define('_XK_BORDERS','Borders');
+define('_XK_BORDERSWIDTH','Borders Width');
+define('_XK_BORDERLEFT','Border Left');
+define('_XK_BORDERRIGHT','Border Right');
+define('_XK_BORDERTOP','Border Top');
+define('_XK_BORDERBOTTOM','Border Bottom');
+
+//REMOVE FORMAT
+define('_XK_REMOVE_DESC','Remove Format Tools');
+define('_XK_REMOVE_LINEBREAKS','Remove LineBreaks');
+define('_XK_REMOVE_SPANF','Delete <strong><span></strong> tags');
+define('_XK_REMOVE_FONTF','Delete <strong><font></strong> tags');
+define('_XK_REMOVE_WORDF','Delete Word Format');
+define('_XK_REMOVE_EMPTYF','Delete empty Tags');
+define('_XK_REMOVE_ALLF','Del All Format');
+define('_XK_CLOSE_APASTE','Close window After Paste');
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/language/english.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/language/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/language/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/language/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/language/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/preferences.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/preferences.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/preferences.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,54 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+//FULL TOOLBAR OPTIONS
+define("_XK_P_FULLTOOLBAR","floating,fontname,fontsize,formatblock,insertsymbols,newline,undo,redo,cut,copy,paste,pastespecial,separator,spellcheck,print, separator,bold,italic,underline,strikethrough,removeformat,separator,justifyleft,justifycenter,justifyright,justifyfull,newparagraph,separator,ltr,rtl,separator,insertorderedlist,insertunorderedlist,indent,outdent,newline,forecolor,hilitecolor,superscript,subscript,separator,quote,code,inserthorizontalrule,insertanchor,insertdate,separator,createlink,unlink,separator,insertimage,imagemanager,imageproperties,separator,createtable,cellalign,cellborders,cellcolor,toggleborders,themecss,togglemode,separator");
+
+//SMALL TOOLBAR OPTIONS
+define("_XK_P_SMALLTOOLBAR","fontsize,forecolor,hilitecolor,separator,bold,italic,underline,strikethrough,separator,quote,code,separator,createlink,insertimage,imagemanager");
+
+//TEXT DIRECTION(ltr / rtl)
+define("_XK_P_TDIRECTION","ltr");
+
+//SKIN (default / xp)
+define("_XK_P_SKIN","default");
+
+//PATH
+$current_path = __FILE__;
+if ( DIRECTORY_SEPARATOR != "/" ) $current_path = str_replace( strpos( $current_path, "\\\\", 2 ) ? "\\\\" : DIRECTORY_SEPARATOR, "/", $current_path);
+define("_XK_P_PATH", substr(dirname($current_path), strlen(XOOPS_ROOT_PATH)));
+
+//WIDTH
+define("_XK_P_WIDTH","100%");
+
+//HEIGHT
+define("_XK_P_HEIGHT","400px");
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/preferences.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/anchor.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/anchor.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/blank.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/blank.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/borders.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/borders.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/borders.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,10 @@
+table
+{
+border-left: 1px dotted silver;
+border-top: 1px dotted silver;
+}
+table td, table th
+{
+border-right: 1px dotted silver;
+border-bottom: 1px dotted silver;
+}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/borders.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/xoops.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/common/xoops.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/bold.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/bold.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/cellalign.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/cellalign.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/cellborders.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/cellborders.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/cellcolor.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/cellcolor.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/centerbottom.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/centerbottom.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/centermiddle.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/centermiddle.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/centertop.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/centertop.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/code.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/code.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/copy.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/copy.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/createlink.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/createlink.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/createtable.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/createtable.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/cut.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/cut.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/default.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/default.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/default.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,39 @@
+/* Samuel's Xoops XK_Editor $Id$*/
+.defaultwIframe {width:100%;border-top:1px solid #C0C0C0;margin:0;padding:0;font:Tahoma;background:#FFF}
+.defaulteditorStatus {text-align:right;margin:2px;float:right;display:inline}
+.defaulteditorStatus img {border:1px outset #C3DAF9}
+.defaulttoolBar {border:none;padding:1px;position:static;line-height:0;display:inline;cursor:pointer}
+.defaultstatusBar {float:left;padding:2px;border:none;background:#E4E4E4}
+.defaultsmileysBar {float:left;display:inline}
+.defaulthtmlBar {float:right;display:inline}
+.defaulttoolBarContainer {cursor:pointer}
+.defaulttoolbarBackCell {width:100%;background:#E4E4E4}
+.defaultselectInput {width:74px;border:1px solid #7F9DB9;margin-top:4px;vertical-align:top;font:9px Verdana,Arial,Helvetica,sans-serif}
+.defaultcheckbox {border:none;margin-top:2px;width:16px;vertical-align:top;background:transparent}
+.defaultfloatingToolBar,.defaulttablePropsD,.defaultcontextMenu,.defaultcellAlignD,.defaultcellBordersD,.defaultquickTableD,.defaultClearFormatsD,.defaultColorPickerD {border-top:#666 1px solid;border-left:#666 1px solid;border-right:#666 2px solid;border-bottom:#666 2px solid;position:absolute;vertical-align:top;cursor:pointer;z-index:999;padding:2px;background:#FFF}
+.defaultcellAlignD td {width:15px;padding:2px}
+.defaultcellBordersD {width:73px;height:51px}
+.defaultDivOption {padding:4px;font-size:80%;width:150px}
+.defaulttdPicker {border:#666 1px solid;width:5px;height:5px}
+.defaultcolorpickerHEX {width:54px;height:14px;border:none;font:9px Verdana,Arial,Helvetica,sans-serif;background:transparent}
+.defaultcolorpickerPreview {width:48px;height:20px;font-size:9px;margin:2px}
+.defaultColorPickerD {width:150px}
+.defaultColorsContainer {float:left;font-size:0.1px;padding:2px}
+.defaultColors {float:left;width:10px;height:10px;margin:3px}
+.defaultcellPreviewDiv,.defaulttablePreviewDiv {font-size:12px;padding:4px;overflow:auto;width:370px;height:170px}
+.defaultimagePreview {height:150px;width:370px;overflow:auto !important;background:#FFF}
+.defaultInput,.defaultInput2,.defaultInput4,.defaultSubmitInput {margin:1px;font:9px Verdana,Arial,Helvetica,sans-serif}
+.defaultInput {width:48px;}
+.defaultInput4 {width:300px;}
+.defaultSubmitInput{width:48px;}
+.defaultpasteSIframe {width:98%;border:1px solid #000;background:#FFF}
+.defaultcontextMenu {-moz-border-radius:5px;padding:2px;width:154px;z-index:1000;font:10px Verdana,Geneva,Arial,Helvetica,sans-serif}
+.defaultcontextMenu div,.defaultcontextMenu img {vertical-align:middle;padding:1px}
+.defaultcontextLast {border-bottom:1px solid #C0C0C0}
+
+.defaultselectedTab,.defaultnotSelectedTab{font:10px Verdana,Arial,Helvetica,sans-serif;padding:2px 2px 0px 2px;float:left;border-bottom:none !important;position:relative;height:18px;margin-left:3px;}
+.defaultselectedTab{border:1px solid black;background-color:white;z-index: 2;}
+.defaultnotSelectedTab{border:1px solid silver;border-bottom:none;z-index: 0;background-color:#F0F0F0;cursor:pointer;}
+.defaultdownTabContainer{float:left;border:1px solid black;height:200px;width:99%;margin-top:-1px;z-index: 1;position:relative;background-color:white;}
+.defaultdivTabContent{padding:10px;}
+.defaultPropsBody{margin:2px;font:10px Verdana,Arial,Helvetica,sans-serif;background:#ECE9D8;}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/default.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/delcell.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/delcell.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/delcol.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/delcol.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/delrow.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/delrow.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/email.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/email.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/floating.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/floating.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/forecolor.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/forecolor.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/fullscreen.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/fullscreen.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/hideback.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/hideback.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/hilitecolor.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/hilitecolor.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/ident.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/ident.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/imagemanager.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/imagemanager.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/imageprops.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/imageprops.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/indent.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/indent.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertanchor.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertanchor.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertcell.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertcell.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertcol.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertcol.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertdate.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertdate.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/inserthorizontalrule.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/inserthorizontalrule.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertimage.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertimage.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertorderedlist.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertorderedlist.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertrow.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertrow.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertunorderedlist.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/insertunorderedlist.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/italic.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/italic.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/justifycenter.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/justifycenter.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/justifyfull.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/justifyfull.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/justifyleft.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/justifyleft.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/justifyright.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/justifyright.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/leftbottom.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/leftbottom.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/leftmiddle.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/leftmiddle.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/lefttop.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/lefttop.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/lessspan.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/lessspan.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/ltr.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/ltr.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/minimize.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/minimize.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/morerowspan.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/morerowspan.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/morespan.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/morespan.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/none.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/none.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/outdent.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/outdent.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/paste.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/paste.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/pastespecial.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/pastespecial.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/popup.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/popup.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/print.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/print.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/quote.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/quote.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/redo.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/redo.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/removeformat.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/removeformat.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/rightbottom.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/rightbottom.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/rightcenter.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/rightcenter.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/righttop.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/righttop.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/rtl.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/rtl.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/separator.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/separator.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/spellcheck.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/spellcheck.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/spelling.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/spelling.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/strikethrough.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/strikethrough.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/subscript.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/subscript.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/superscript.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/superscript.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/tableprops.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/tableprops.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/toggletableborders.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/toggletableborders.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/underline.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/underline.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/undo.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/undo.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/unlink.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/default/unlink.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/bold.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/bold.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/borderall.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/borderall.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/borderbottom.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/borderbottom.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/borderleft.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/borderleft.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/bordernone.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/bordernone.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/borderright.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/borderright.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/bordertop.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/bordertop.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/cellalign.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/cellalign.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/cellborders.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/cellborders.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/cellcolor.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/cellcolor.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/centerbottom.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/centerbottom.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/centermiddle.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/centermiddle.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/centertop.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/centertop.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/code.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/code.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/copy.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/copy.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/createlink.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/createlink.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/createtable.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/createtable.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/cut.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/cut.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/delcell.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/delcell.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/delcol.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/delcol.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/delrow.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/delrow.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/email.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/email.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/floating.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/floating.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/forecolor.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/forecolor.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/fullscreen.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/fullscreen.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/hilitecolor.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/hilitecolor.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/imagemanager.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/imagemanager.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/imageprops.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/imageprops.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/indent.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/indent.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertanchor.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertanchor.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertcell.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertcell.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertcol.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertcol.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertdate.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertdate.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/inserthorizontalrule.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/inserthorizontalrule.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertimage.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertimage.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertorderedlist.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertorderedlist.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertrow.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertrow.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertunorderedlist.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/insertunorderedlist.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/italic.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/italic.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/justifycenter.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/justifycenter.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/justifyfull.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/justifyfull.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/justifyleft.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/justifyleft.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/justifyright.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/justifyright.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/leftbottom.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/leftbottom.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/leftmiddle.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/leftmiddle.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/lefttop.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/lefttop.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/lessspan.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/lessspan.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/ltr.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/ltr.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/minimize.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/minimize.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/morerowspan.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/morerowspan.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/morespan.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/morespan.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/none.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/none.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/outdent.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/outdent.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/paste.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/paste.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/pastespecial.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/pastespecial.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/popup.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/popup.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/print.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/print.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/quote.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/quote.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/redo.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/redo.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/removeformat.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/removeformat.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/rightbottom.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/rightbottom.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/rightcenter.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/rightcenter.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/righttop.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/righttop.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/rtl.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/rtl.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/separator.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/separator.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/spellcheck.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/spellcheck.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/strikethrough.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/strikethrough.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/subscript.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/subscript.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/superscript.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/superscript.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/t.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/t.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/tableprops.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/tableprops.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/toggletableborders.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/toggletableborders.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/underline.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/underline.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/undo.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/undo.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/unlink.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/unlink.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/xp.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/xp.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/xp.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,39 @@
+/*Samuel's Xoops XK_Editor $Id$*/
+.xpwIframe{width:100%;border:none;margin:0px;padding:0px;background:#FFFFFF}
+.xpeditorStatus{margin:1px;float:right;display:inline;text-align:right}
+.xpeditorStatus img{border:1px outset #C3DAF9}
+.xptoolbarBackCell{width:100%;border-bottom:1px solid #A8B7FF;border-right:1px solid #A8B7FF;padding:0px;margin:0px;vertical-align:top;background:url(t.gif)}
+.xptoolBar{position:static;display:inline;cursor:pointer;z-index:999;line-height:0px}
+.xpstatusBar{float:left;padding:2px;border:none;background:#E4E4E4}
+.xpsmileysBar{float:left;display:inline}
+.xphtmlBar{float:right;display:inline}
+.xpselectInput{width:74px;border: 1px solid #E4EBF1;margin-top:4px;margin-left:2px;vertical-align:top;font:9px Verdana,Arial,Helvetica,sans-serif;}
+.xpcheckbox{border:none;margin-top:2px;width:16px;vertical-align:top;background:transparent}
+.xpfloatingToolBar,.xptablePropsD,.xpcontextMenu,.xpcellAlignD,.xpcellBordersD,.xpquickTableD,.xpClearFormatsD,.xpColorPickerD{border-top:#666666 1px solid;border-left:#666666 1px solid;border-right:#666666 2px solid;border-bottom:#666666 2px solid;position:absolute;vertical-align:top;cursor:pointer;z-index:999;padding:2px;background:#FFFFFF}
+.xpcellAlignD td{width:15px;padding:2px}
+.xpcellBordersD{width:73px;height:51px}
+.xpDivOption{padding:4px;font-size:80%;width:150px}
+.xptdPicker{border:#666666 1px solid;width:5px;height:5px;}
+.xpcolorpickerHEX{width:54px;height:14px;border:none;font:9px Verdana,Arial,Helvetica,sans-serif;background:transparent}
+.xpcolorpickerPreview{width:48px;height:20px;font-size:9px;margin:2px}
+.xpColorPickerD{width:150px}
+.xpColorsContainer{float:left;font-size:0.1px;padding:2px}
+.xpColors{float:left;width:10px;height:10px;margin:3px}
+.xpcellPreviewDiv,.xptablePreviewDiv{font-size:12px;padding:4px;overflow:auto;width:370px;height:170px}
+.xpimagePreview{height:150px;width:370px;overflow:auto !important;background:#FFFFFF}
+.xpInput,.xpInput2,.xpInput4,.xpSubmitInput{border:1px solid #7BA4E0;margin:1px;font:9px Verdana,Arial,Helvetica,sans-serif;background-color: #EAF4FD;}
+.xpInput{width:48px;}
+.xpInput2{width:120px;background-color: #DDECFE;}
+.xpInput4{width:300px;}
+.xpSubmitInput{background-color: #DDECFE;width:48px;}
+.xppasteSIframe{margin:4px;width:98%;border:1px solid #000000;background:#FFFFFF}
+.xpcontextMenu{-moz-border-radius:5px;padding:2px;width:154px;z-index:1000;font:10px Verdana,Geneva,Arial,Helvetica,sans-serif}
+.xpcontextMenu div,.xpcontextMenu img{vertical-align:middle;padding:1px}
+.xpcontextLast{border-bottom:1px solid #C0C0C0;position: }
+
+.xpselectedTab,.xpnotSelectedTab{font:10px Verdana,Arial,Helvetica,sans-serif;padding:1px 3px 0px 3px;float:left;border-bottom:none !important;position:relative;height:18px;margin-left:3px;}
+.xpselectedTab{border:1px solid #7BA4E0;background-color: #DDECFE;z-index: 2;font-weight: bold;}
+.xpnotSelectedTab{border: 1px solid #7BA4E0;border-bottom:none;z-index: 0;background-color: #B7CDEB;cursor:pointer;}
+.xpdownTabContainer{float:left;border:1px solid #7BA4E0;height:200px;width:99%;margin-top:-1px;z-index: 1;position:relative;background-color:#DDECFE;}
+.xpdivTabContent{padding:10px;}
+.xpPropsBody{margin:2px;font:10px Verdana,Arial,Helvetica,sans-serif;background: #C2D8F9;}
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/koivi/skins/xp/xp.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/sampleform.inc.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/sampleform.inc.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/sampleform.inc.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,80 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+/**
+ * XOOPS editor usage example
+ *
+ * @author phppp (D.J.)
+ * @copyright copyright (c) 2005 XOOPS.org
+ *
+ */
+
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+
+/*
+ * Edit form with selected editor
+ */
+$sample_form = new XoopsThemeForm('', 'sample_form', "action.php");
+$sample_form->setExtra('enctype="multipart/form-data"');
+
+// Not required but for user-friendly concern
+$editor = !empty($_REQUEST['editor'])?$_REQUEST['editor']:"";
+if(!empty($editor)){
+ setcookie("editor",$editor); // save to cookie
+}else
+// Or use user pre-selected editor through profile
+if(is_object($xoopsUser)){
+ $editor =@ $xoopsUser->getVar("editor"); // Need set through user profile
+}
+
+// Add the editor selection box
+// If dohtml is disabled, set $noHtml = true
+$sample_form->addElement(new XoopsFormSelectEditor($sample_form,"editor",$editor, $noHtml=false));
+
+// options for the editor
+//required configs
+$options['name'] ='required_element';
+$options['value'] = empty($_REQUEST['message'])?"":$_REQUEST['message'];
+//optional configs
+$options['rows'] = 25; // default value = 5
+$options['cols'] = 60; // default value = 50
+$options['width'] = '100%'; // default value = 100%
+$options['height'] = '400px'; // default value = 400px
+
+// "textarea": if the selected editor with name of $editor can not be created, the editor "textarea" will be used
+// if no $onFailure is set, then the first available editor will be used
+// If dohtml is disabled, set $noHtml to true
+$sample_form->addElement(new XoopsFormEditor(_MD_MESSAGEC, $editor, $editor_configs, $nohtml=false, $onfailure="textarea"), true);
+
+$sample_form->addElement(new XoopsFormText("SOME REQUIRED ELEMENTS", "required_element2", 50, 255, $required_element2), true);
+
+$sample_form->addElement(new XoopsFormButton('', 'save', _SUBMIT, "submit"));
+
+$sample_form->display();
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/sampleform.inc.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/editor_registry.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/editor_registry.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/editor_registry.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,54 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+/**
+ * XOOPS editor registry
+ *
+ * @author phppp (D.J.)
+ * @copyright copyright (c) 2005 XOOPS.org
+ *
+ */
+global $xoopsConfig;
+
+$current_path = __FILE__;
+if ( DIRECTORY_SEPARATOR != "/" ) $current_path = str_replace( strpos( $current_path, "\\\\", 2 ) ? "\\\\" : DIRECTORY_SEPARATOR, "/", $current_path);
+$root_path = dirname($current_path);
+
+if(file_exists($root_path."/language/".$xoopsConfig['language'].".php")){
+ include_once($root_path."/language/".$xoopsConfig['language'].".php");
+}else{
+ include_once($root_path."/language/english.php");
+}
+
+$config = array(
+ "name" => "textarea", // the name used as unique identifier
+ "class" => "FormTextArea",
+ "file" => $root_path."/textarea.php",
+ "title" => _XOOPS_EDITOR_TEXTAREA, // display to end user
+ "order" => 1, // 0 will disable the editor
+ "nohtml"=> 1 // For forms that have "dohtml" disabled
+ );
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/editor_registry.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/language/english.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/language/english.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/language/english.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,36 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+/*
+ * Assocated with editor_registry.php
+ */
+define("_XOOPS_EDITOR_TEXTAREA", "Textarea Form");
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/language/english.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/language/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/language/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/language/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/language/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/textarea.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/textarea.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/textarea.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,65 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+/**
+ * Pseudo class
+ *
+ * @author phppp (D.J.)
+ * @copyright copyright (c) 2005 XOOPS.org
+ *
+ */
+
+class FormTextArea extends XoopsFormTextArea
+{
+ /**
+ * Constructor
+ *
+ * @param array $configs Editor Options
+ * @param binary $checkCompatible true - return false on failure
+ */
+ function FormTextArea($configs, $checkCompatible = false)
+ {
+ if(!empty($configs)) foreach($configs as $key => $val){
+ ${$key} = $val;
+ $this->$key = $val;
+ }
+ $value = isset($value)?$value:"";
+ $rows = isset($rows)?$rows:5;
+ $cols = isset($cols)?$cols:50;
+ $this->XoopsFormTextArea("", $name, empty($value)?"":$value, empty($rows)?5:$rows, empty($cols)?50:$cols);
+ }
+
+ function setConfig($configs)
+ {
+ foreach($configs as $key=>$val){
+ $this->$key = $val;
+ }
+ }
+}
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/textarea/textarea.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/xoopseditor.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/xoopseditor.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/xoopseditor.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,119 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+/**
+ * XOOPS editor handler
+ *
+ * @author phppp (D.J.)
+ * @copyright copyright (c) 2005 XOOPS.org
+ *
+ */
+class XoopsEditorHandler
+{
+ var $root_path="";
+ var $nohtml=false;
+
+ function XoopsEditorHandler()
+ {
+ $current_path = __FILE__;
+ if ( DIRECTORY_SEPARATOR != "/" ) $current_path = str_replace( strpos( $current_path, "\\\\", 2 ) ? "\\\\" : DIRECTORY_SEPARATOR, "/", $current_path);
+ $this->root_path = dirname($current_path);
+ }
+
+ /**
+ * @param string $name Editor name
+ * @param array $options editor options: $key=>$val
+ * @param string $OnFailure a pre-validated editor that will be used if the required editor is failed to create
+ * @param bool $noHtml dohtml disabled
+ */
+ function &get($name = "", $options = null, $noHtml=false, $OnFailure = "")
+ {
+ $editor = null;
+ $list =array_keys($this->getList($noHtml));
+ if(!empty($name) && in_array($name, $list)){
+ $editor = & $this->_loadEditor($name, $options);
+ }
+ if(!is_object($editor)){
+ if(empty($OnFailure) || !in_array($OnFailure, $list)){
+ $OnFailure = $list[0];
+ }
+ $editor = & $this->_loadEditor($OnFailure, $options);
+ }
+ return $editor;
+ }
+
+ function &getList($noHtml=false)
+ {
+ static $editors;
+ if(!isset($editors)) {
+ $order = array();
+ $list = XoopsLists::getDirListAsArray($this->root_path.'/');
+ foreach($list as $item){
+ if(is_readable($this->root_path.'/'.$item.'/editor_registry.php')){
+ include($this->root_path.'/'.$item.'/editor_registry.php');
+ if(empty($config['order'])) continue;
+ $editors[$config['name']] = $config;
+ $order[] = $config['order'];
+ }
+ }
+ array_multisort($order, $editors);
+ }
+ $_list = array();
+ foreach($editors as $name=>$item){
+ if(!empty($noHtml)&&empty($item['nohtml'])) continue;
+ $_list[$name] = $item['title'];
+ }
+ return $_list;
+ }
+
+ function render(&$editor)
+ {
+ return $editor->render();
+ }
+
+ function setConfig(&$editor, $options)
+ {
+ if(method_exists($editor, 'setConfig')) {
+ $editor->setConfig($options);
+ }else{
+ foreach($options as $key=>$val){
+ $editor->$key = $val;
+ }
+ }
+ }
+
+ function &_loadEditor($name="", $options=null)
+ {
+ $editor_path = $this->root_path."/".$name;
+ if(!is_readable($editor_path."/editor_registry.php")) return false;
+ include($editor_path."/editor_registry.php");
+ if(empty($config['order'])) return null;
+ include_once($config['file']);
+ $editor =& new $config['class']($options);
+ return $editor;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopseditor/xoopseditor.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/form.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/form.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/form.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,449 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+// public abstruct
+/**
+ *
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+
+/**
+ * Abstract base class for forms
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage form
+ */
+class XoopsForm {
+ /**#@+
+ * @access private
+ */
+ /**
+ * "action" attribute for the html form
+ * @var string
+ */
+ var $_action;
+
+ /**
+ * "method" attribute for the form.
+ * @var string
+ */
+ var $_method;
+
+ /**
+ * "name" attribute of the form
+ * @var string
+ */
+ var $_name;
+
+ /**
+ * title for the form
+ * @var string
+ */
+ var $_title;
+
+ /**
+ * array of {@link XoopsFormElement} objects
+ * @var array
+ */
+ var $_elements = array();
+
+ /**
+ * extra information for the <form> tag
+ * @var string
+ */
+ var $_extra;
+
+ /**
+ * required elements
+ * @var array
+ */
+ var $_required = array();
+
+ /**#@-*/
+
+ /**
+ * constructor
+ *
+ * @param string $title title of the form
+ * @param string $name "name" attribute for the <form> tag
+ * @param string $action "action" attribute for the <form> tag
+ * @param string $method "method" attribute for the <form> tag
+ * @param bool $addtoken whether to add a security token to the form
+ */
+ function XoopsForm($title, $name, $action, $method="post", $addtoken=false){
+ $this->_title = $title;
+ $this->_name = $name != "" ? $name : "xoops_form";
+ $this->_action = $action;
+ $this->_method = $method;
+ if ($addtoken != false) {
+ $this->addElement(new XoopsFormHiddenToken());
+ }
+ $this->addElement(new XoopsFormHidden('skipValidationJS', 0));
+ $this->setExtra('onsubmit="return xoopsFormValidate_'.$this->getName().'();"');
+ }
+
+ /**
+ * return the title of the form
+ *
+ * @return string
+ */
+ function getTitle(){
+ return $this->_title;
+ }
+
+ /**
+ * get the "name" attribute for the <form> tag
+ *
+ * @return string
+ */
+ function getName(){
+ return $this->_name;
+ }
+
+ /**
+ * get the "action" attribute for the <form> tag
+ *
+ * @return string
+ */
+ function getAction(){
+ return $this->_action;
+ }
+
+ /**
+ * get the "method" attribute for the <form> tag
+ *
+ * @return string
+ */
+ function getMethod(){
+ return $this->_method;
+ }
+
+ /**
+ * Add an element to the form
+ *
+ * @param object &$formElement reference to a {@link XoopsFormElement}
+ * @param bool $required is this a "required" element?
+ */
+ function addElement(&$formElement, $required=false){
+ if ( is_string( $formElement ) ) {
+ $this->_elements[] = $formElement;
+ } elseif ( is_subclass_of($formElement, 'xoopsformelement') ) {
+ $this->_elements[] = $formElement;
+ if ($required) {
+ if (!$formElement->isContainer()) {
+ $this->_required[] = $formElement;
+ } else {
+ $required_elements = $formElement->getRequired();
+ $count = count($required_elements);
+ for ($i = 0 ; $i < $count; $i++) {
+ $this->_required[] = $required_elements[$i];
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * get an array of forms elements
+ *
+ * @param bool get elements recursively?
+ * @return array array of {@link XoopsFormElement}s
+ */
+ function &getElements($recurse = false){
+ if (!$recurse) {
+ return $this->_elements;
+ } else {
+ $ret = array();
+ $count = count($this->_elements);
+ for ($i = 0; $i < $count; $i++) {
+ if (!$this->_elements[$i]->isContainer()) {
+ $ret[] =& $this->_elements[$i];
+ } else {
+ $elements =& $this->_elements[$i]->getElements(true);
+ $count2 = count($elements);
+ for ($j = 0; $j < $count2; $j++) {
+ $ret[] =& $elements[$j];
+ }
+ unset($elements);
+ }
+ }
+ return $ret;
+ }
+ }
+
+ /**
+ * get an array of "name" attributes of form elements
+ *
+ * @return array array of form element names
+ */
+ function getElementNames()
+ {
+ $ret = array();
+ $elements =& $this->getElements(true);
+ $count = count($elements);
+ for ($i = 0; $i < $count; $i++) {
+ $ret[] = $elements[$i]->getName();
+ }
+ return $ret;
+ }
+
+ /**
+ * get a reference to a {@link XoopsFormElement} object by its "name"
+ *
+ * @param string $name "name" attribute assigned to a {@link XoopsFormElement}
+ * @return object reference to a {@link XoopsFormElement}, false if not found
+ */
+ function &getElementByName($name){
+ $elements =& $this->getElements(true);
+ $count = count($elements);
+ for ($i = 0; $i < $count; $i++) {
+ if ($name == $elements[$i]->getName()) {
+ return $elements[$i];
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Sets the "value" attribute of a form element
+ *
+ * @param string $name the "name" attribute of a form element
+ * @param string $value the "value" attribute of a form element
+ */
+ function setElementValue($name, $value){
+ $ele =& $this->getElementByName($name);
+ if (is_object($ele) && method_exists($ele, 'setValue')) {
+ $ele->setValue($value);
+ }
+ }
+
+ /**
+ * Sets the "value" attribute of form elements in a batch
+ *
+ * @param array $values array of name/value pairs to be assigned to form elements
+ */
+ function setElementValues($values){
+ if (is_array($values) && !empty($values)) {
+ // will not use getElementByName() for performance..
+ $elements =& $this->getElements(true);
+ $count = count($elements);
+ for ($i = 0; $i < $count; $i++) {
+ $name = $elements[$i]->getName();
+ if ($name && isset($values[$name]) && method_exists($elements[$i], 'setValue')) {
+ $elements[$i]->setValue($values[$name]);
+ }
+ }
+ }
+ }
+
+ /**
+ * Gets the "value" attribute of a form element
+ *
+ * @param string $name the "name" attribute of a form element
+ * @return string the "value" attribute assigned to a form element, null if not set
+ */
+ function &getElementValue($name){
+ $ele =& $this->getElementByName($name);
+ if (is_object($ele) && method_exists($ele, 'getValue')) {
+ return $ele->getValue($value);
+ }
+ return;
+ }
+
+ /**
+ * gets the "value" attribute of all form elements
+ *
+ * @return array array of name/value pairs assigned to form elements
+ */
+ function &getElementValues(){
+ // will not use getElementByName() for performance..
+ $elements =& $this->getElements(true);
+ $count = count($elements);
+ $values = array();
+ for ($i = 0; $i < $count; $i++) {
+ $name = $elements[$i]->getName();
+ if ($name && method_exists($elements[$i], 'getValue')) {
+ $values[$name] =& $elements[$i]->getValue();
+ }
+ }
+ return $values;
+ }
+
+ /**
+ * Add extra attributes to the form.
+ *
+ * This string will be inserted verbatim and unvalidated in the
+ * element's tag. Know what you are doing!
+ *
+ * @param string $extra
+ * @param string $replace If true, passed string will replace current content otherwise it will be appended to it
+ * @return string New content of the extra string
+ */
+ function setExtra($extra, $replace = false){
+ if ( $replace) {
+ $this->_extra = trim($extra);
+ } else {
+ $this->_extra .= " " . trim($extra);
+ }
+ return $this->_extra;
+ }
+
+ /**
+ * get the extra attributes for the <form> tag
+ *
+ * @return string
+ */
+ function &getExtra(){
+ if (isset($this->_extra)) {
+ return $this->_extra;
+ }
+ }
+
+ /**
+ * make an element "required"
+ *
+ * @param object &$formElement reference to a {@link XoopsFormElement}
+ */
+ function setRequired(&$formElement){
+ $this->_required[] =& $formElement;
+ }
+
+ /**
+ * get an array of "required" form elements
+ *
+ * @return array array of {@link XoopsFormElement}s
+ */
+ function &getRequired(){
+ return $this->_required;
+ }
+
+ /**
+ * insert a break in the form
+ *
+ * This method is abstract. It must be overwritten in the child classes.
+ *
+ * @param string $extra extra information for the break
+ * @abstract
+ */
+ function insertBreak($extra = null){
+ }
+
+ /**
+ * returns renderered form
+ *
+ * This method is abstract. It must be overwritten in the child classes.
+ *
+ * @abstract
+ */
+ function render(){
+ }
+
+ /**
+ * displays rendered form
+ */
+ function display(){
+ echo $this->render();
+ }
+
+ /**
+ * Renders the Javascript function needed for client-side for validation
+ *
+ * @param boolean $withtags Include the < javascript > tags in the returned string
+ */
+ function renderValidationJS( $withtags = true ) {
+ $js = "";
+ if ( $withtags ) {
+ $js .= "\n<!-- Start Form Vaidation JavaScript //-->\n<script type='text/javascript'>\n<!--//\n";
+ }
+ $myts =& MyTextSanitizer::getInstance();
+ $formname = $this->getName();
+ $required =& $this->getRequired();
+ $reqcount = count($required);
+ $js .= "function xoopsFormValidate_{$formname}() {
+ myform = window.document.$formname;\n
+ if(myform.skipValidationJS.value == 1) return true;\n
+ ";
+ for ($i = 0; $i < $reqcount; $i++) {
+ $eltname = $required[$i]->getName();
+ $eltcaption = trim( $required[$i]->getCaption() );
+ $eltmsg = empty($eltcaption) ? sprintf( _FORM_ENTER, $eltname ) : sprintf( _FORM_ENTER, $eltcaption );
+ $eltmsg = str_replace('"', '\"', $eltmsg);
+ $js .= "if ( myform.{$eltname}.value == \"\" ) "
+ . "{ window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }\n";
+ }
+ $js .= "return true;\n}\n";
+ if ( $withtags ) {
+ $js .= "//--></script>\n<!-- End Form Vaidation JavaScript //-->\n";
+ }
+ return $js;
+ }
+ /**
+ * assign to smarty form template instead of displaying directly
+ *
+ * @param object &$tpl reference to a {@link Smarty} object
+ * @see Smarty
+ */
+ function assign(&$tpl){
+ $i = 0;
+ $elements = array();
+ // Hack Hervé Thouzard
+ $required =& $this->getRequired();
+ $reqnames=array();
+ foreach(array_keys($required) as $i) {
+ $reqnames[] = $required[$i]->getName();
+ }
+ // End Hack Hervé Thouzard
+ foreach ( $this->getElements() as $ele ) {
+ $n = ($ele->getName() != "") ? $ele->getName() : $i;
+ $elements[$n]['name'] = $ele->getName();
+ $elements[$n]['caption'] = $ele->getCaption();
+ $elements[$n]['body'] = $ele->render();
+ $elements[$n]['hidden'] = $ele->isHidden();
+ $elements[$n]['type'] = strtolower(get_class($ele));
+ $elements[$n]['required'] = in_array($ele->getName(), $reqnames);
+ if ($ele->getDescription() != '') {
+ $elements[$n]['description'] = $ele->getDescription();
+ }
+ $i++;
+ }
+ $js = $this->renderValidationJS();
+ $tpl->assign($this->getName(), array('title' => $this->getTitle(), 'name' => $this->getName(), 'action' => $this->getAction(), 'method' => $this->getMethod(), 'extra' => $this->getExtra(), 'javascript' => $js, 'elements' => $elements));
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/form.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formbutton.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formbutton.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formbutton.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,121 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ *
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+/**
+ * A button
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage form
+ */
+class XoopsFormButton extends XoopsFormElement {
+
+ /**
+ * Value
+ * @var string
+ * @access private
+ */
+ var $_value;
+
+ /**
+ * Type of the button. This could be either "button", "submit", or "reset"
+ * @var string
+ * @access private
+ */
+ var $_type;
+
+ /**
+ * Constructor
+ *
+ * @param string $caption Caption
+ * @param string $name
+ * @param string $value
+ * @param string $type Type of the button.
+ * This could be either "button", "submit", or "reset"
+ */
+ function XoopsFormButton($caption, $name, $value="", $type="button", $id=""){
+ $this->setCaption($caption);
+ $this->setName($name);
+ $this->_type = $type;
+ $this->setValue($value);
+ $this->setId($id);
+ }
+
+ /**
+ * Get the initial value
+ *
+ * @return string
+ */
+ function getValue(){
+ return $this->_value;
+ }
+
+ /**
+ * Set the initial value
+ *
+ * @return string
+ */
+ function setValue($value){
+ $this->_value = $value;
+ }
+
+ /**
+ * Get the type
+ *
+ * @return string
+ */
+ function getType(){
+ return $this->_type;
+ }
+
+ /**
+ * prepare HTML for output
+ *
+ * @return string
+ */
+ function render(){
+ return "<input type='".$this->getType()."' class='formButton' name='".$this->getName()."' id='".$this->getName()."' value='".$this->getValue()."'".$this->getExtra()." />";
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formbutton.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formcalendar.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formcalendar.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formcalendar.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,182 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+
+/**
+ * See File: class/calendar/calendar.php | (c) dynarch.com 2004
+ * Distributed as part of "The Coolest DHTML Calendar"
+ * under the same terms.
+ */
+
+define('NEWLINE', "\n");
+
+class XoopsFormCalendar extends XoopsFormElement {
+ var $calendar_lib_path;
+
+ var $calendar_file;
+ var $calendar_lang_file;
+ var $calendar_setup_file;
+ var $calendar_theme_file;
+ var $calendar_theme_url;
+ var $calendar_options = array();
+ var $calendar_field_attributes = array();
+
+ /**
+ * Constuctor
+ *
+ * @param string $caption caption
+ * @param string $name name
+ * @param string $value initial content
+ * @param array $extra_options Extra options - see class/calendar/calendar-setup.js for more info on possible parameters
+ */
+ function XoopsFormCalendar($caption, $name, $initial_value=0, $calendar_options = array(), $calendar_field_attributes = array()){
+ global $xoopsConfig;
+ $stripped = true; //perhaps usable?
+ $this->setCaption($caption);
+ $this->setName($name);
+ if (!$initial_value) {
+ $initial_value = time();
+ }
+
+ $this->set_option('date', $initial_value);
+ $this->set_option('ifFormat', '%Y/%m/%d');
+ $this->set_option('daFormat', '%Y/%m/%d');
+ $this->set_option('firstDay', 1); // show Monday first
+ $this->set_option('showOthers', true);
+ foreach ($calendar_options as $name => $value) {
+ $this->set_option($name, $value);
+ }
+
+ foreach ($calendar_field_attributes as $name => $value) {
+ $this->set_field_attribute($name, $value);
+ }
+
+ if ($stripped) {
+ $this->calendar_file = 'calendar_stripped.js';
+ $this->calendar_setup_file = 'calendar-setup_stripped.js';
+ } else {
+ $this->calendar_file = 'calendar.js';
+ $this->calendar_setup_file = 'calendar-setup.js';
+ }
+ $lang = file_exists(XOOPS_ROOT_PATH.'/class/calendar/lang/calendar-' . _LANGCODE . '.js')?_LANGCODE:"en";
+ $this->calendar_lang_file = 'lang/calendar-' . $lang . '.js';
+ $this->calendar_lib_path = XOOPS_URL."/class/calendar/";
+
+ $this->calendar_theme_file = 'calendar.css';
+ $this->calendar_theme_url = XOOPS_THEME_URL."/".$xoopsConfig['theme_set']."/";
+
+ }
+
+ function set_option($name, $value) {
+ $this->calendar_options[$name] = $value;
+ }
+
+ function set_field_attribute($name, $value) {
+ $this->calendar_field_attributes[$name] = $value;
+ }
+
+ function load_head_files() {
+ if (!file_exists($this->calendar_theme_url."css/".$this->calendar_theme_file)) {
+ $this->calendar_theme_url = XOOPS_THEME_URL."/default/";
+ }
+
+ $GLOBALS['xTheme']->addCSS($this->calendar_theme_url ."css/". $this->calendar_theme_file, array('media' => 'all'));
+ $GLOBALS['xTheme']->addJS($this->calendar_lib_path . $this->calendar_file);
+ $GLOBALS['xTheme']->addJS($this->calendar_lib_path . $this->calendar_lang_file);
+ $GLOBALS['xTheme']->addJS($this->calendar_lib_path . $this->calendar_setup_file);
+ }
+
+ function _make_calendar($other_options = array()) {
+ $js_options = $this->_make_js_hash(array_merge($this->calendar_options, $other_options));
+ $code = ( '<script type="text/javascript">Calendar.setup({' .
+ $js_options .
+ '});</script>' );
+ return $code;
+ }
+
+ function render() {
+ $id = $this->_gen_id();
+ if ($id == 1) {
+ $this->load_head_files();
+ }
+ $attrstr = $this->_make_html_attr(array_merge($this->calendar_field_attributes,
+ array('id' => $this->_get_id($id),
+ 'type' => 'text',
+ 'name' => $this->getName())));
+ $ret = '<input ' . $attrstr .'/>';
+ $ret .= '<a href="#" id="'. $this->_trigger_id($id) . '">' .
+ '<img align="middle" border="0" src="' . $this->calendar_lib_path . 'img.gif" alt="" /></a>';
+
+ $options = array('inputField' => $this->_get_id($id), 'button' => $this->_trigger_id($id));
+ $ret .= $this->_make_calendar($options);
+
+ return $ret;
+ }
+
+ /// PRIVATE SECTION
+
+ function _get_id($id) { return 'calendar-field-'.$id;}
+ function _trigger_id($id) { return 'calendar-trigger-' . $id; }
+ function _gen_id() {
+ static $idno = 0;
+ $idno++;
+ return $idno;
+ }
+
+ function _make_js_hash($array) {
+ $jstr = '';
+ reset($array);
+ while (list($key, $val) = each($array)) {
+ if (is_bool($val)) {
+ $val = $val ? 'true' : 'false';
+ }
+ else if (!is_numeric($val)) {
+ $val = '"'.$val.'"';
+ }
+ if ($jstr) {
+ $jstr .= ',';
+ }
+ $jstr .= '"' . $key . '":' . $val;
+ }
+ return $jstr;
+ }
+
+ function _make_html_attr($array) {
+ $attrstr = '';
+ reset($array);
+ while (list($key, $val) = each($array)) {
+ $attrstr .= $key . '="' . $val . '" ';
+ }
+ return $attrstr;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formcalendar.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formcheckbox.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formcheckbox.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formcheckbox.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,167 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+/**
+ * One or more Checkbox(es)
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsFormCheckBox extends XoopsFormElement {
+
+ /**
+ * Availlable options
+ * @var array
+ * @access private
+ */
+ var $_options = array();
+
+ /**
+ * pre-selected values in array
+ * @var array
+ * @access private
+ */
+ var $_value = array();
+
+ /**
+ * Constructor
+ *
+ * @param string $caption
+ * @param string $name
+ * @param mixed $value Either one value as a string or an array of them.
+ */
+ function XoopsFormCheckBox($caption, $name, $value = null, $id = ""){
+ $this->setCaption($caption);
+ $this->setName($name);
+ if (isset($value)) {
+ $this->setValue($value);
+ }
+ $this->setId($id);
+ }
+
+ /**
+ * Get the "value"
+ *
+ * @return array
+ */
+ function getValue(){
+ return $this->_value;
+ }
+
+ /**
+ * Set the "value"
+ *
+ * @param array
+ */
+ function setValue($value){
+ $this->_value = array();
+ if (is_array($value)) {
+ foreach ($value as $v) {
+ $this->_value[] = $v;
+ }
+ } else {
+ $this->_value[] = $value;
+ }
+ }
+
+ /**
+ * Add an option
+ *
+ * @param string $value
+ * @param string $name
+ */
+ function addOption($value, $name=""){
+ if ($name != "") {
+ $this->_options[$value] = $name;
+ } else {
+ $this->_options[$value] = $value;
+ }
+ }
+
+ /**
+ * Add multiple Options at once
+ *
+ * @param array $options Associative array of value->name pairs
+ */
+ function addOptionArray($options){
+ if ( is_array($options) ) {
+ foreach ( $options as $k=>$v ) {
+ $this->addOption($k, $v);
+ }
+ }
+ }
+
+ /**
+ * Get an array with all the options
+ *
+ * @return array Associative array of value->name pairs
+ */
+ function getOptions(){
+ return $this->_options;
+ }
+
+ /**
+ * prepare HTML for output
+ *
+ * @return string
+ */
+ function render(){
+ $ret = "";
+ $id = $this->getId();
+ if ( count($this->getOptions()) > 1 && substr($this->getName(), -2, 2) != "[]" ) {
+ $newname = $this->getName()."[]";
+ $this->setName($newname);
+ }
+ $i = 0;
+ foreach ( $this->getOptions() as $value => $name ) {
+ $ret .= "<input type='checkbox' id='".$id.$i."' name='".$this->getName()."' value='".$value."'";
+ if (count($this->getValue()) > 0 && in_array($value, $this->getValue())) {
+ $ret .= " checked='checked'";
+ }
+ $ret .= $this->getExtra()." />".$name."\n";
+ $i++;
+ }
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formcheckbox.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formdatetime.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formdatetime.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formdatetime.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,75 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ *
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * Date and time selection field
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage form
+ */
+class XoopsFormDateTime extends XoopsFormElementTray
+{
+
+ function XoopsFormDateTime($caption, $name, $size = 15, $value=0)
+ {
+ $this->XoopsFormElementTray($caption, ' ');
+ $value = intval($value);
+ $this->addElement(new XoopsFormTextDateSelect('', $name.'[date]', $size, $value));
+ $timearray = array();
+ for ($i = 0; $i < 24; $i++) {
+ for ($j = 0; $j < 60; $j = $j + 10) {
+ $key = ($i * 3600) + ($j * 60);
+ $timearray[$key] = ($j != 0) ? $i.':'.$j : $i.':0'.$j;
+ }
+ }
+ ksort($timearray);
+ $datetime = $value > 0 ? getDate($value) : getdate(time());
+ $timeselect = new XoopsFormSelect('', $name.'[time]', $datetime['hours'] * 3600 + 600 * ceil($datetime['minutes'] / 10));
+ $timeselect->addOptionArray($timearray);
+ $this->addElement($timeselect);
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formdatetime.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formdhtmltextarea.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formdhtmltextarea.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formdhtmltextarea.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,153 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ *
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+/**
+ * base class
+ */
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formtextarea.php";
+
+// Make sure you have included /include/xoopscodes.php, otherwise DHTML will not work properly!
+
+/**
+ * A textarea with xoopsish formatting and smilie buttons
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage form
+ */
+class XoopsFormDhtmlTextArea extends XoopsFormTextArea
+{
+ /**
+ * Hidden text
+ * @var string
+ * @access private
+ */
+ var $_hiddenText;
+
+ /**
+ * Constructor
+ *
+ * @param string $caption Caption
+ * @param string $name "name" attribute
+ * @param string $value Initial text
+ * @param int $rows Number of rows
+ * @param int $cols Number of columns
+ * @param string $hiddentext Hidden Text
+ */
+ function XoopsFormDhtmlTextArea($caption, $name, $value, $rows=5, $cols=50, $hiddentext="xoopsHiddenText")
+ {
+ $this->XoopsFormTextArea($caption, $name, $value, $rows, $cols);
+ $this->_hiddenText = $hiddentext;
+ }
+
+ /**
+ * Prepare HTML for output
+ *
+ * @return string HTML
+ */
+ function render()
+ {
+ $ret = "<a name='moresmiley'></a><img onmouseover='style.cursor=\"hand\"' src='".XOOPS_URL."/images/url.gif' alt='url' onclick='xoopsCodeUrl(\"".$this->getName()."\", \"".htmlspecialchars(_ENTERURL, ENT_QUOTES)."\", \"".htmlspecialchars(_ENTERWEBTITLE, ENT_QUOTES)."\");' /> <img onmouseover='style.cursor=\"hand\"' src='".XOOPS_URL."/images/email.gif' alt='email' onclick='javascript:xoopsCodeEmail(\"".$this->getName()."\", \"".htmlspecialchars(_ENTEREMAIL, ENT_QUOTES)."\");' /> <img onclick='javascript:xoopsCodeImg(\"".$this->getName()."\", \"".htmlspecialchars(_ENTERIMGURL, ENT_QUOTES)."\", \"".htmlspecialchars(_ENTERIMGPOS, ENT_QUOTES)."\", \"".htmlspecialchars(_IMGPOSRORL, ENT_QUOTES)."\", \"".htmlspecialchars(_ERRORIMGPOS, ENT_QUOTES)."\");' onmouseover='style.cursor=\"hand\"' src='".XOOPS_URL."/images/imgsrc.gif' alt='imgsrc' /> <img onmouseover='style.cursor=\"hand\"' onclick='javascript:openWithSelfMain(\"".XOOPS_URL."/imagemanager.php?target=".$this-!
>getName()."\",\"imgmanager\",400,430);' src='".XOOPS_URL."/images/image.gif' alt='image' /> <img src='".XOOPS_URL."/images/code.gif' onmouseover='style.cursor=\"hand\"' alt='code' onclick='javascript:xoopsCodeCode(\"".$this->getName()."\", \"".htmlspecialchars(_ENTERCODE, ENT_QUOTES)."\");' /> <img onclick='javascript:xoopsCodeQuote(\"".$this->getName()."\", \"".htmlspecialchars(_ENTERQUOTE, ENT_QUOTES)."\");' onmouseover='style.cursor=\"hand\"' src='".XOOPS_URL."/images/quote.gif' alt='quote' /><br />\n";
+
+ $sizearray = array("xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large");
+ $ret .= "<select id='".$this->getName()."Size' onchange='setVisible(\"".$this->_hiddenText."\");setElementSize(\"".$this->_hiddenText."\",this.options[this.selectedIndex].value);'>\n";
+ $ret .= "<option value='SIZE'>"._SIZE."</option>\n";
+ foreach ( $sizearray as $size ) {
+ $ret .= "<option value='$size'>$size</option>\n";
+ }
+ $ret .= "</select>\n";
+ $fontarray = array("Arial", "Courier", "Georgia", "Helvetica", "Impact", "Verdana");
+ $ret .= "<select id='".$this->getName()."Font' onchange='setVisible(\"".$this->_hiddenText."\");setElementFont(\"".$this->_hiddenText."\",this.options[this.selectedIndex].value);'>\n";
+ $ret .= "<option value='FONT'>"._FONT."</option>\n";
+ foreach ( $fontarray as $font ) {
+ $ret .= "<option value='$font'>$font</option>\n";
+ }
+ $ret .= "</select>\n";
+ $colorarray = array("00", "33", "66", "99", "CC", "FF");
+ $ret .= "<select id='".$this->getName()."Color' onchange='setVisible(\"".$this->_hiddenText."\");setElementColor(\"".$this->_hiddenText."\",this.options[this.selectedIndex].value);'>\n";
+ $ret .= "<option value='COLOR'>"._COLOR."</option>\n";
+ foreach ( $colorarray as $color1 ) {
+ foreach ( $colorarray as $color2 ) {
+ foreach ( $colorarray as $color3 ) {
+ $ret .= "<option value='".$color1.$color2.$color3."' style='background-color:#".$color1.$color2.$color3.";color:#".$color1.$color2.$color3.";'>#".$color1.$color2.$color3."</option>\n";
+ }
+ }
+ }
+ $ret .= "</select><span id='".$this->_hiddenText."'>"._EXAMPLE."</span>\n";
+ $ret .= "<br />\n";
+ $ret .= "<img onclick='javascript:setVisible(\"".$this->_hiddenText."\");makeBold(\"".$this->_hiddenText."\");' onmouseover='style.cursor=\"hand\"' src='".XOOPS_URL."/images/bold.gif' alt='bold' /> <img onclick='javascript:setVisible(\"".$this->_hiddenText."\");makeItalic(\"".$this->_hiddenText."\");' onmouseover='style.cursor=\"hand\"' src='".XOOPS_URL."/images/italic.gif' alt='italic' /> <img onclick='javascript:setVisible(\"".$this->_hiddenText."\");makeUnderline(\"".$this->_hiddenText."\");' onmouseover='style.cursor=\"hand\"' src='".XOOPS_URL."/images/underline.gif' alt='underline' /> <img onclick='javascript:setVisible(\"".$this->_hiddenText."\");makeLineThrough(\"".$this->_hiddenText."\");' src='".XOOPS_URL."/images/linethrough.gif' alt='linethrough' onmouseover='style.cursor=\"hand\"' /> <input type='text' id='".$this->getName()."Addtext' size='20' /> <input type='button' onclick='xoopsCodeText(\"".$this->getName()."\", \"".$this->_h!
iddenText."\", \"".htmlspecialchars(_ENTERTEXTBOX, ENT_QUOTES)."\")' class='formButton' value='"._ADD."' /><br /><br /><textarea id='".$this->getName()."' name='".$this->getName()."' onselect=\"xoopsSavePosition('".$this->getName()."');\" onclick=\"xoopsSavePosition('".$this->getName()."');\" onkeyup=\"xoopsSavePosition('".$this->getName()."');\" cols='".$this->getCols()."' rows='".$this->getRows()."'".$this->getExtra().">".$this->getValue()."</textarea><br />\n";
+ $ret .= $this->_renderSmileys();
+ return $ret;
+ }
+
+ /**
+ * prepare HTML for output of the smiley list.
+ *
+ * @return string HTML
+ */
+ function _renderSmileys()
+ {
+ $myts =& MyTextSanitizer::getInstance();
+ $smiles =& $myts->getSmileys();
+ $ret = '';
+ if (empty($smiles)) {
+ $db =& Database::getInstance();
+ if ($result = $db->query('SELECT * FROM '.$db->prefix('smiles').' WHERE display=1')) {
+ while ($smiles = $db->fetchArray($result)) {
+ $ret .= "<img onclick='xoopsCodeSmilie(\"".$this->getName()."\", \" ".$smiles['code']." \");' onmouseover='style.cursor=\"hand\"' src='".XOOPS_UPLOAD_URL."/".htmlspecialchars($smiles['smile_url'], ENT_QUOTES)."' alt='' />";
+ }
+ }
+ } else {
+ $count = count($smiles);
+ for ($i = 0; $i < $count; $i++) {
+ if ($smiles[$i]['display'] == 1) {
+ $ret .= "<img onclick='xoopsCodeSmilie(\"".$this->getName()."\", \" ".$smiles[$i]['code']." \");' onmouseover='style.cursor=\"hand\"' src='".XOOPS_UPLOAD_URL."/".$myts->oopsHtmlSpecialChars($smiles[$i]['smile_url'])."' border='0' alt='' />";
+ }
+ }
+ }
+ $ret .= " [<a href='#moresmiley' onclick='javascript:openWithSelfMain(\"".XOOPS_URL."/misc.php?action=showpopups&type=smilies&target=".$this->getName()."\",\"smilies\",300,475);'>"._MORE."</a>]";
+ return $ret;
+ }
+}
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formdhtmltextarea.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formeditor.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formeditor.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formeditor.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,76 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+/**
+ *
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * XoopsEditor hanlder
+ *
+ * @author D.J.
+ * @copyright copyright (c) 2000-2005 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage form
+ */
+class XoopsFormEditor extends XoopsFormTextArea
+{
+ var $editor;
+
+ /**
+ * Constructor
+ *
+ * @param string $caption Caption
+ * @param string $name "name" attribute
+ * @param string $value Initial text
+ * @param array $configs configures
+ * @param bool $noHtml use non-WYSIWYG eitor onfailure
+ * @param string $OnFailure editor to be used if current one failed
+ */
+ function XoopsFormEditor($caption, $name, $editor_configs = null, $noHtml=false, $OnFailure = "")
+ {
+ $this->XoopsFormTextArea($caption, $editor_configs["name"]);
+ $editor_handler =& xoops_gethandler("editor");
+ $this->editor =& $editor_handler->get($name, $editor_configs, $noHtml, $OnFailure);
+ }
+
+ function render()
+ {
+ return $this->editor->render();
+ }
+}
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formeditor.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formelement.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formelement.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formelement.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,317 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ *
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+
+/**
+ * Abstract base class for form elements
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage form
+ */
+class XoopsFormElement {
+
+ /**#@+
+ * @access private
+ */
+ /**
+ * "name" attribute of the element
+ * @var string
+ */
+ var $_name;
+
+ /**
+ * "id" attribute of the element
+ * @var string
+ */
+ var $_id = "";
+
+ /**
+ * caption of the element
+ * @var string
+ */
+ var $_caption;
+
+ /**
+ * Accesskey for this element
+ * @var string
+ */
+ var $_accesskey = '';
+
+ /**
+ * HTML class for this element
+ * @var string
+ */
+ var $_class = '';
+
+ /**
+ * hidden?
+ * @var bool
+ */
+ var $_hidden = false;
+
+ /**
+ * extra attributes to go in the tag
+ * @var string
+ */
+ var $_extra = "";
+
+ /**
+ * required field?
+ * @var bool
+ */
+ var $_required = false;
+
+ /**
+ * description of the field
+ * @var string
+ */
+ var $_description = "";
+ /**#@-*/
+
+
+ /**
+ * constructor
+ *
+ */
+ function XoopsFormElement(){
+ exit("This class cannot be instantiated!");
+ }
+
+ /**
+ * Is this element a container of other elements?
+ *
+ * @return bool false
+ */
+ function isContainer()
+ {
+ return false;
+ }
+
+ /**
+ * set the "name" attribute for the element
+ *
+ * @param string $name "name" attribute for the element
+ */
+ function setName($name) {
+ $this->_name = trim($name);
+ }
+
+ /**
+ * get the "name" attribute for the element
+ *
+ * @param bool encode?
+ * @return string "name" attribute
+ */
+ function getName($encode=true) {
+ if (false != $encode) {
+ return str_replace("&", "&", str_replace("'","'",htmlspecialchars($this->_name)));
+ }
+ return $this->_name;
+ }
+
+ /**
+ * set the "accesskey" attribute for the element
+ *
+ * @param string $key "accesskey" attribute for the element
+ */
+ function setAccessKey($key) {
+ $this->_accesskey = trim($key);
+ }
+ /**
+ * get the "accesskey" attribute for the element
+ *
+ * @return string "accesskey" attribute value
+ */
+ function getAccessKey() {
+ return $this->_accesskey;
+ }
+ /**
+ * If the accesskey is found in the specified string, underlines it
+ *
+ * @param string $str String where to search the accesskey occurence
+ * @return string Enhanced string with the 1st occurence of accesskey underlined
+ */
+ function getAccessString( $str ) {
+ $access = $this->getAccessKey();
+ if ( !empty($access) && ( false !== ($pos = strpos($str, $access)) ) ) {
+ return substr($str, 0, $pos) . '<span style="text-decoration:underline">' . substr($str, $pos, 1) . '</span>' . substr($str, $pos+1);
+ }
+ return $str;
+ }
+
+ /**
+ * set the "class" attribute for the element
+ *
+ * @param string $key "class" attribute for the element
+ */
+ function setClass($class) {
+ $class = trim($class);
+ if ( empty($class) ) {
+ $this->_class = '';
+ } else {
+ $this->_class .= (empty($this->_class) ? '' : ' ') . $class;
+ }
+ }
+ /**
+ * get the "class" attribute for the element
+ *
+ * @return string "class" attribute value
+ */
+ function getClass() {
+ return $this->_class;
+ }
+
+ /**
+ * set the caption for the element
+ *
+ * @param string $caption
+ */
+ function setCaption($caption) {
+ $this->_caption = trim($caption);
+ }
+
+ /**
+ * get the caption for the element
+ *
+ * @return string
+ */
+ function getCaption() {
+ return $this->_caption;
+ }
+
+ /**
+ * set the id for the element
+ *
+ * @param string $id
+ */
+ function setId($id) {
+ $this->_id = trim($id);
+ }
+
+ /**
+ * get the id for the element
+ *
+ * @return string
+ */
+ function getId() {
+ return $this->_id != "" ? $this->_id : $this->getName();
+ }
+
+ /**
+ * set the element's description
+ *
+ * @param string $description
+ */
+ function setDescription($description) {
+ $this->_description = trim($description);
+ }
+
+ /**
+ * get the element's description
+ *
+ * @return string
+ */
+ function getDescription() {
+ return $this->_description;
+ }
+
+ /**
+ * flag the element as "hidden"
+ *
+ */
+ function setHidden() {
+ $this->_hidden = true;
+ }
+
+ /**
+ * Find out if an element is "hidden".
+ *
+ * @return bool
+ */
+ function isHidden() {
+ return $this->_hidden;
+ }
+
+ /**
+ * Add extra attributes to the element.
+ *
+ * This string will be inserted verbatim and unvalidated in the
+ * element's tag. Know what you are doing!
+ *
+ * @param string $extra
+ * @param string $replace If true, passed string will replace current content otherwise it will be appended to it
+ * @return string New content of the extra string
+ */
+ function setExtra($extra, $replace = false){
+ if ( $replace) {
+ $this->_extra = trim($extra);
+ } else {
+ $this->_extra .= " " . trim($extra);
+ }
+ return $this->_extra;
+ }
+
+ /**
+ * Get the extra attributes for the element
+ *
+ * @return string
+ */
+ function getExtra(){
+ if (isset($this->_extra)) {
+ return $this->_extra;
+ }
+ }
+
+ /**
+ * Generates output for the element.
+ *
+ * This method is abstract and must be overwritten by the child classes.
+ * @abstract
+ */
+ function render(){
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formelement.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formelementtray.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formelementtray.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formelementtray.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,198 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ *
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * A group of form elements
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage form
+ */
+class XoopsFormElementTray extends XoopsFormElement {
+
+ /**
+ * array of form element objects
+ * @var array
+ * @access private
+ */
+ var $_elements = array();
+
+ /**
+ * required elements
+ * @var array
+ */
+ var $_required = array();
+
+ /**
+ * HTML to seperate the elements
+ * @var string
+ * @access private
+ */
+ var $_delimeter;
+
+ /**
+ * whether to display captions
+ *
+ * @var bool
+ * @access private
+ */
+ var $_showElementsCaptions;
+
+ /**
+ * constructor
+ *
+ * @param string $caption Caption for the group.
+ * @param string $delimiter HTML to separate the elements
+ * @param string $name name of the elementtray
+ * @param bool $showCaptions Whether to display the captions when rendering
+ */
+ function XoopsFormElementTray($caption, $delimeter=" ", $name="", $showCaptions = true){
+ $this->setName($name);
+ $this->setCaption($caption);
+ $this->_delimeter = $delimeter;
+ $this->_showElementsCaptions = $showCaptions;
+ }
+
+ /**
+ * Is this element a container of other elements?
+ *
+ * @return bool true
+ */
+ function isContainer()
+ {
+ return true;
+ }
+
+ /**
+ * Add an element to the group
+ *
+ * @param object &$element {@link XoopsFormElement} to add
+ */
+ function addElement(&$formElement, $required=false){
+ $this->_elements[] = $formElement;
+ if ($required) {
+ if (!$formElement->isContainer()) {
+ $this->_required[] = $formElement;
+ } else {
+ $required_elements =& $formElement->getElements(true);
+ $count = count($required_elements);
+ for ($i = 0 ; $i < $count; $i++) {
+ $this->_required[] = $required_elements[$i];
+ }
+ }
+ }
+ }
+
+ /**
+ * get an array of "required" form elements
+ *
+ * @return array array of {@link XoopsFormElement}s
+ */
+ function &getRequired()
+ {
+ return $this->_required;
+ }
+
+ /**
+ * Get an array of the elements in this group
+ *
+ * @param bool $recurse get elements recursively?
+ * @return array Array of {@link XoopsFormElement} objects.
+ */
+ function &getElements($recurse = false){
+ if (!$recurse) {
+ return $this->_elements;
+ } else {
+ $ret = array();
+ $count = count($this->_elements);
+ for ($i = 0; $i < $count; $i++) {
+ if (!$this->_elements[$i]->isContainer()) {
+ $ret[] =& $this->_elements[$i];
+ } else {
+ $elements =& $this->_elements[$i]->getElements(true);
+ $count2 = count($elements);
+ for ($j = 0; $j < $count2; $j++) {
+ $ret[] =& $elements[$j];
+ }
+ unset($elements);
+ }
+ }
+ return $ret;
+ }
+ }
+
+ /**
+ * Get the delimiter of this group
+ *
+ * @return string The delimiter
+ */
+ function getDelimeter(){
+ return $this->_delimeter;
+ }
+
+ /**
+ * prepare HTML to output this group
+ *
+ * @return string HTML output
+ */
+ function render(){
+ $count = 0;
+ $ret = "";
+ foreach ( $this->getElements() as $ele ) {
+ if ($count > 0) {
+ $ret .= $this->getDelimeter();
+ }
+ if ($this->_showElementsCaptions && $ele->getCaption() != '') {
+ $ret .= $ele->getCaption()." ";
+ }
+ $ret .= $ele->render()."\n";
+ if (!$ele->isHidden()) {
+ $count++;
+ }
+ }
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formelementtray.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formfile.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formfile.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formfile.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,92 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ *
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+/**
+ * A file upload field
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage form
+ */
+class XoopsFormFile extends XoopsFormElement {
+
+ /**
+ * Maximum size for an uploaded file
+ * @var int
+ * @access private
+ */
+ var $_maxFileSize;
+
+ /**
+ * Constructor
+ *
+ * @param string $caption Caption
+ * @param string $name "name" attribute
+ * @param int $maxfilesize Maximum size for an uploaded file
+ */
+ function XoopsFormFile($caption, $name, $maxfilesize){
+ $this->setCaption($caption);
+ $this->setName($name);
+ $this->_maxFileSize = intval($maxfilesize);
+ }
+
+ /**
+ * Get the maximum filesize
+ *
+ * @return int
+ */
+ function getMaxFileSize(){
+ return $this->_maxFileSize;
+ }
+
+ /**
+ * prepare HTML for output
+ *
+ * @return string HTML
+ */
+ function render(){
+ return "<input type='hidden' name='MAX_FILE_SIZE' value='".$this->getMaxFileSize()."' /><input type='file' name='".$this->getName()."' id='".$this->getName()."'".$this->getExtra()." /><input type='hidden' name='xoops_upload_file[]' id='xoops_upload_file[]' value='".$this->getName()."' />";
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formfile.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formhidden.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formhidden.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formhidden.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,100 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+/**
+ * A hidden field
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsFormHidden extends XoopsFormElement {
+
+ /**
+ * Value
+ * @var string
+ * @access private
+ */
+ var $_value;
+
+ /**
+ * Constructor
+ *
+ * @param string $name "name" attribute
+ * @param string $value "value" attribute
+ */
+ function XoopsFormHidden($name, $value, $id=""){
+ $this->setName($name);
+ $this->setHidden();
+ $this->setValue($value);
+ $this->setCaption("");
+ $this->setId($id);
+ }
+
+ /**
+ * Get the "value" attribute
+ *
+ * @return string
+ */
+ function getValue(){
+ return $this->_value;
+ }
+
+ /**
+ * Sets the "value" attribute
+ *
+ * @patam $value string
+ */
+ function setValue($value){
+ $this->_value = $value;
+ }
+
+ /**
+ * Prepare HTML for output
+ *
+ * @return string HTML
+ */
+ function render(){
+ return "<input type='hidden' name='".$this->getName()."' id='".$this->getId()."' value='".$this->getValue()."' />";
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formhidden.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formhiddentoken.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formhiddentoken.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formhiddentoken.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,55 @@
+<?php
+// $Id$ // ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2005 XOOPS.org
+ */
+/**
+ * A hidden token field
+ *
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2005 XOOPS.org
+ */
+class XoopsFormHiddenToken extends XoopsFormHidden {
+
+ /**
+ * Constructor
+ *
+ * @param string $name "name" attribute
+ */
+ function XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 0){
+ $this->XoopsFormHidden($name, $GLOBALS['xoopsSecurity']->createToken($timeout));
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formhiddentoken.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formlabel.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formlabel.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formlabel.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,88 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+/**
+ * A text label
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsFormLabel extends XoopsFormElement {
+
+ /**
+ * Text
+ * @var string
+ * @access private
+ */
+ var $_value;
+
+ /**
+ * Constructor
+ *
+ * @param string $caption Caption
+ * @param string $value Text
+ */
+ function XoopsFormLabel($caption="", $value=""){
+ $this->setCaption($caption);
+ $this->_value = $value;
+ }
+
+ /**
+ * Get the text
+ *
+ * @return string
+ */
+ function getValue(){
+ return $this->_value;
+ }
+
+ /**
+ * Prepare HTML for output
+ *
+ * @return string
+ */
+ function render(){
+ return $this->getValue();
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formlabel.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formpassword.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formpassword.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formpassword.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,138 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ *
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+/**
+ * A password field
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage form
+ */
+class XoopsFormPassword extends XoopsFormElement {
+
+ /**
+ * Size of the field.
+ * @var int
+ * @access private
+ */
+ var $_size;
+
+ /**
+ * Maximum length of the text
+ * @var int
+ * @access private
+ */
+ var $_maxlength;
+
+ /**
+ * Initial content of the field.
+ * @var string
+ * @access private
+ */
+ var $_value;
+
+ /**
+ * Constructor
+ *
+ * @param string $caption Caption
+ * @param string $name "name" attribute
+ * @param int $size Size of the field
+ * @param int $maxlength Maximum length of the text
+ * @param int $value Initial value of the field.
+ * <b>Warning:</b> this is readable in cleartext in the page's source!
+ */
+ function XoopsFormPassword($caption, $name, $size, $maxlength, $value=""){
+ $this->setCaption($caption);
+ $this->setName($name);
+ $this->_size = intval($size);
+ $this->_maxlength = intval($maxlength);
+ $this->setValue($value);
+ }
+
+ /**
+ * Get the field size
+ *
+ * @return int
+ */
+ function getSize(){
+ return $this->_size;
+ }
+
+ /**
+ * Get the max length
+ *
+ * @return int
+ */
+ function getMaxlength(){
+ return $this->_maxlength;
+ }
+
+ /**
+ * Get the initial value
+ *
+ * @return string
+ */
+ function getValue(){
+ return $this->_value;
+ }
+
+ /**
+ * Set the initial value
+ *
+ * @patam $value string
+ */
+ function setValue($value){
+ $this->_value = $value;
+ }
+
+ /**
+ * Prepare HTML for output
+ *
+ * @return string HTML
+ */
+ function render(){
+ return "<input type='password' name='".$this->getName()."' id='".$this->getName()."' size='".$this->getSize()."' maxlength='".$this->getMaxlength()."' value='".$this->getValue()."'".$this->getExtra()." />";
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formpassword.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formradio.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formradio.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formradio.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,158 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ *
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+/**
+ * A Group of radiobuttons
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage form
+ */
+class XoopsFormRadio extends XoopsFormElement {
+
+ /**
+ * Array of Options
+ * @var array
+ * @access private
+ */
+ var $_options = array();
+
+ /**
+ * Pre-selected value
+ * @var string
+ * @access private
+ */
+ var $_value;
+
+ /**
+ * Constructor
+ *
+ * @param string $caption Caption
+ * @param string $name "name" attribute
+ * @param string $value Pre-selected value
+ */
+ function XoopsFormRadio($caption, $name, $value = null, $id = ""){
+ $this->setCaption($caption);
+ $this->setName($name);
+ if (isset($value)) {
+ $this->setValue($value);
+ }
+ $this->setId($id);
+ }
+
+ /**
+ * Get the pre-selected value
+ *
+ * @return string
+ */
+ function getValue(){
+ return $this->_value;
+ }
+
+ /**
+ * Set the pre-selected value
+ *
+ * @param $value string
+ */
+ function setValue($value){
+ $this->_value = $value;
+ }
+
+ /**
+ * Add an option
+ *
+ * @param string $value "value" attribute - This gets submitted as form-data.
+ * @param string $name "name" attribute - This is displayed. If empty, we use the "value" instead.
+ */
+ function addOption($value, $name=""){
+ if ( $name != "" ) {
+ $this->_options[$value] = $name;
+ } else {
+ $this->_options[$value] = $value;
+ }
+ }
+
+ /**
+ * Adds multiple options
+ *
+ * @param array $options Associative array of value->name pairs.
+ */
+ function addOptionArray($options){
+ if ( is_array($options) ) {
+ foreach ( $options as $k=>$v ) {
+ $this->addOption($k, $v);
+ }
+ }
+ }
+
+ /**
+ * Gets the options
+ *
+ * @return array Associative array of value->name pairs.
+ */
+ function getOptions(){
+ return $this->_options;
+ }
+
+ /**
+ * Prepare HTML for output
+ *
+ * @return string HTML
+ */
+ function render(){
+ $ret = "";
+ $i = 0;
+ foreach ( $this->getOptions() as $value => $name ) {
+ $ret .= "<input type='radio' id='".$this->getId().$i."' name='".$this->getName()."' value='".$value."'";
+ $selected = $this->getValue();
+ if ( isset($selected) && ($value == $selected) ) {
+ $ret .= " checked='checked'";
+ }
+ $ret .= $this->getExtra()." />".$name."\n";
+ $i++;
+ }
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formradio.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formradioyn.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formradioyn.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formradioyn.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,76 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * base class
+ */
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formradio.php";
+
+/**
+ * Yes/No radio buttons.
+ *
+ * A pair of radio buttons labelled _YES and _NO with values 1 and 0
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsFormRadioYN extends XoopsFormRadio
+{
+ /**
+ * Constructor
+ *
+ * @param string $caption
+ * @param string $name
+ * @param string $value Pre-selected value, can be "0" (No) or "1" (Yes)
+ * @param string $yes String for "Yes"
+ * @param string $no String for "No"
+ */
+ function XoopsFormRadioYN($caption, $name, $value=null, $yes=_YES, $no=_NO, $id="")
+ {
+ $this->XoopsFormRadio($caption, $name, $value, $id);
+ $this->addOption(1, $yes);
+ $this->addOption(0, $no);
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formradioyn.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselect.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselect.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselect.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,228 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * A select field
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsFormSelect extends XoopsFormElement {
+
+ /**
+ * Options
+ * @var array
+ * @access private
+ */
+ var $_options = array();
+
+ /**
+ * Allow multiple selections?
+ * @var bool
+ * @access private
+ */
+ var $_multiple = false;
+
+ /**
+ * Number of rows. "1" makes a dropdown list.
+ * @var int
+ * @access private
+ */
+ var $_size;
+
+ /**
+ * Pre-selected values
+ * @var array
+ * @access private
+ */
+ var $_value = array();
+
+ /**
+ * Disabled values
+ * @var array
+ * @access private
+ */
+ var $_disabled = array();
+
+ /**
+ * Constructor
+ *
+ * @param string $caption Caption
+ * @param string $name "name" attribute
+ * @param mixed $value Pre-selected value (or array of them).
+ * @param int $size Number or rows. "1" makes a drop-down-list
+ * @param bool $multiple Allow multiple selections?
+ */
+ function XoopsFormSelect($caption, $name, $value=null, $size=1, $multiple=false, $id=""){
+ $this->setCaption($caption);
+ $this->setName($name);
+ $this->_multiple = $multiple;
+ $this->_size = intval($size);
+ if (isset($value)) {
+ $this->setValue($value);
+ }
+ $this->setId($id);
+ }
+
+ /**
+ * Are multiple selections allowed?
+ *
+ * @return bool
+ */
+ function isMultiple(){
+ return $this->_multiple;
+ }
+
+ /**
+ * Get the size
+ *
+ * @return int
+ */
+ function getSize(){
+ return $this->_size;
+ }
+
+ /**
+ * Get an array of pre-selected values
+ *
+ * @return array
+ */
+ function getValue(){
+ return $this->_value;
+ }
+
+ /**
+ * Set pre-selected values
+ *
+ * @param $value mixed
+ */
+ function setValue($value){
+ if (is_array($value)) {
+ foreach ($value as $v) {
+ $this->_value[] = $v;
+ }
+ } else {
+ $this->_value[] = $value;
+ }
+ }
+
+ /**
+ * Add an option
+ *
+ * @param string $value "value" attribute
+ * @param string $name "name" attribute
+ * @param bool $disabled whether the value should be disabled in the selection
+ */
+ function addOption($value, $name="", $disabled = false){
+ if ( $name != "" ) {
+ $this->_options[$value] = $name;
+ } else {
+ $this->_options[$value] = $value;
+ }
+ $this->_disabled[$value] = $disabled;
+ }
+
+ /**
+ * Add multiple options
+ *
+ * @param array $options Associative array of value->name pairs
+ * @param array $disabled array of values that should be disabled
+ */
+ function addOptionArray($options, $disabled = array()){
+ if ( is_array($options) ) {
+ foreach ( $options as $k=>$v ) {
+ if ($disabled != array()) {
+ $disabled = in_array($k, $disabled);
+ }
+ $this->addOption($k, $v, $disabled);
+ }
+ }
+ }
+
+ /**
+ * Get all options
+ *
+ * @return array Associative array of value->name pairs
+ */
+ function getOptions(){
+ return $this->_options;
+ }
+
+ /**
+ * Get disabled values
+ *
+ * @return array
+ */
+ function getDisabled() {
+ return $this->_disabled;
+ }
+
+ /**
+ * Prepare HTML for output
+ *
+ * @return string HTML
+ */
+ function render(){
+ $ret = "<select size='".$this->getSize()."'".$this->getExtra()."";
+ if ($this->isMultiple() != false) {
+ $ret .= " name='".$this->getName()."[]' id='".$this->getId()."' multiple='multiple'>\n";
+ } else {
+ $ret .= " name='".$this->getName()."' id='".$this->getId()."'>\n";
+ }
+ $disabled = $this->getDisabled();
+ foreach ( $this->getOptions() as $value => $name ) {
+ $ret .= "<option value='".htmlspecialchars($value, ENT_QUOTES)."'";
+ if (count($this->getValue()) > 0 && in_array($value, $this->getValue())) {
+ $ret .= " selected='selected'";
+ }
+ if ($disabled[$value]) {
+ $ret .= " disabled='disabled'";
+ }
+ $ret .= ">".$name."</option>\n";
+ }
+ $ret .= "</select>";
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselect.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectcountry.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectcountry.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectcountry.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,78 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * lists of values
+ */
+include_once XOOPS_ROOT_PATH."/class/xoopslists.php";
+
+/**
+ * Parent
+ */
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formselect.php";
+
+/**
+ * A select field with countries
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsFormSelectCountry extends XoopsFormSelect
+{
+ /**
+ * Constructor
+ *
+ * @param string $caption Caption
+ * @param string $name "name" attribute
+ * @param mixed $value Pre-selected value (or array of them).
+ * Legal are all 2-letter country codes (in capitals).
+ * @param int $size Number or rows. "1" makes a drop-down-list
+ */
+ function XoopsFormSelectCountry($caption, $name, $value=null, $size=1)
+ {
+ $this->XoopsFormSelect($caption, $name, $value, $size);
+ $this->addOptionArray(XoopsLists::getCountryList());
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectcountry.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselecteditor.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselecteditor.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselecteditor.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,72 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+/**
+ * base class
+ */
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formelementtray.php";
+
+/**
+ * A select box with available editors
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author phppp (D.J.)
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsFormSelectEditor extends XoopsFormElementTray
+{
+ /**
+ * Constructor
+ *
+ * @param object $form the form calling the editor selection
+ * @param string $name editor name
+ * @param string $value Pre-selected text value
+ * @param bool $noHtml dohtml disabled
+ */
+ function XoopsFormSelectEditor(&$form, $name="editor", $value=null, $noHtml=false)
+ {
+ $this->XoopsFormElementTray(_SELECTEDITOR);
+
+ $editor_handler =& xoops_gethandler("editor");
+ $option_select = new XoopsFormSelect("", $name, $value);
+ $extra = 'onchange="if(this.options[this.selectedIndex].value.length > 0 ){
+ window.document.forms.'.$form->getName().'.skipValidationJS.value=1;
+ window.document.forms.'.$form->getName().'.submit();
+ }"';
+ $option_select->setExtra($extra);
+ $option_select->addOptionArray($editor_handler->getList($noHtml));
+
+ $this->addElement($option_select);
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselecteditor.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectgroup.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectgroup.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectgroup.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,79 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * Parent
+ */
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formselect.php";
+
+/**
+ * A select field with a choice of available groups
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsFormSelectGroup extends XoopsFormSelect
+{
+ /**
+ * Constructor
+ *
+ * @param string $caption
+ * @param string $name
+ * @param bool $include_anon Include group "anonymous"?
+ * @param mixed $value Pre-selected value (or array of them).
+ * @param int $size Number or rows. "1" makes a drop-down-list.
+ * @param bool $multiple Allow multiple selections?
+ */
+ function XoopsFormSelectGroup($caption, $name, $include_anon=false, $value=null, $size=1, $multiple=false)
+ {
+ $this->XoopsFormSelect($caption, $name, $value, $size, $multiple);
+ $member_handler =& xoops_gethandler('member');
+ if (!$include_anon) {
+ $this->addOptionArray($member_handler->getGroupList(new Criteria('groupid', XOOPS_GROUP_ANONYMOUS, '!=')));
+ } else {
+ $this->addOptionArray($member_handler->getGroupList());
+ }
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectgroup.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectlang.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectlang.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectlang.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,76 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+/**
+ * lists of values
+ */
+include_once XOOPS_ROOT_PATH."/class/xoopslists.php";
+/**
+ * parent class
+ */
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formselect.php";
+
+/**
+ * A select field with available languages
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsFormSelectLang extends XoopsFormSelect
+{
+ /**
+ * Constructor
+ *
+ * @param string $caption
+ * @param string $name
+ * @param mixed $value Pre-selected value (or array of them).
+ * Legal is any name of a XOOPS_ROOT_PATH."/language/" subdirectory.
+ * @param int $size Number of rows. "1" makes a drop-down-list.
+ */
+ function XoopsFormSelectLang($caption, $name, $value=null, $size=1)
+ {
+ $this->XoopsFormSelect($caption, $name, $value, $size);
+ $this->addOptionArray(XoopsLists::getLangList());
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectlang.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectlist.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectlist.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectlist.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,75 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+/**
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * Parent
+ */
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formselect.php";
+
+/**
+ * A select field with countries
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsFormSelectList extends XoopsFormSelect
+{
+ /**
+ * Constructor
+ *
+ * @param string $caption Caption
+ * @param string $name "name" attribute
+ * @param mixed $value Pre-selected value (or array of them).
+ * Legal are all 2-letter country codes (in capitals).
+ * @param int $size Number or rows. "1" makes a drop-down-list
+ * @param string $handler Handler to use to get the list
+ * @param string $module Dirname of module - defaults to current module
+ */
+ function XoopsFormSelectList($caption, $name, $value=null, $size=1, $handler, $module=null)
+ {
+ $multiple = $size > 1;
+
+ $this->XoopsFormSelect($caption, $name, $value, $size, $multiple);
+ $handler =& xoops_getmodulehandler($handler, $module);
+ $this->addOptionArray($handler->getList());
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectlist.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectmatchoption.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectmatchoption.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectmatchoption.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,76 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+/**
+ * base class
+ */
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formselect.php";
+
+/**
+ * A selection box with options for matching search terms.
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsFormSelectMatchOption extends XoopsFormSelect
+{
+ /**
+ * Constructor
+ *
+ * @param string $caption
+ * @param string $name
+ * @param mixed $value Pre-selected value (or array of them).
+ * Legal values are {@link XOOPS_MATCH_START}, {@link XOOPS_MATCH_END},
+ * {@link XOOPS_MATCH_EQUAL}, and {@link XOOPS_MATCH_CONTAIN}
+ * @param int $size Number of rows. "1" makes a drop-down-list
+ */
+ function XoopsFormSelectMatchOption($caption, $name, $value=null, $size=1)
+ {
+ $this->XoopsFormSelect($caption, $name, $value, $size, false);
+ $this->addOption(XOOPS_MATCH_START, _STARTSWITH);
+ $this->addOption(XOOPS_MATCH_END, _ENDSWITH);
+ $this->addOption(XOOPS_MATCH_EQUAL, _MATCHES);
+ $this->addOption(XOOPS_MATCH_CONTAIN, _CONTAINS);
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectmatchoption.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselecttheme.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselecttheme.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselecttheme.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,75 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+/**
+ * lists of values
+ */
+include_once XOOPS_ROOT_PATH."/class/xoopslists.php";
+/**
+ * base class
+ */
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formselect.php";
+
+/**
+ * A select box with available themes
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsFormSelectTheme extends XoopsFormSelect
+{
+ /**
+ * Constructor
+ *
+ * @param string $caption
+ * @param string $name
+ * @param mixed $value Pre-selected value (or array of them).
+ * @param int $size Number or rows. "1" makes a drop-down-list
+ */
+ function XoopsFormSelectTheme($caption, $name, $value=null, $size=1)
+ {
+ $this->XoopsFormSelect($caption, $name, $value, $size);
+ $this->addOptionArray(XoopsLists::getThemesList());
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselecttheme.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselecttimezone.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselecttimezone.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselecttimezone.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,77 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * lists of values
+ */
+include_once XOOPS_ROOT_PATH."/class/xoopslists.php";
+/**
+ * base class
+ */
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formselect.php";
+
+/**
+ * A select box with timezones
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsFormSelectTimezone extends XoopsFormSelect
+{
+ /**
+ * Constructor
+ *
+ * @param string $caption
+ * @param string $name
+ * @param mixed $value Pre-selected value (or array of them).
+ * Legal values are "-12" to "12" with some ".5"s strewn in ;-)
+ * @param int $size Number of rows. "1" makes a drop-down-box.
+ */
+ function XoopsFormSelectTimezone($caption, $name, $value=null, $size=1)
+ {
+ $this->XoopsFormSelect($caption, $name, $value, $size);
+ $this->addOptionArray(XoopsLists::getTimeZoneList());
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselecttimezone.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectuser.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectuser.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectuser.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,133 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+// Limitation: Only work with javascript enabled
+
+/**
+ * Parent
+ */
+require_once XOOPS_ROOT_PATH . "/class/xoopsform/formselect.php";
+require_once XOOPS_ROOT_PATH . "/class/xoopsform/formelementtray.php";
+
+// RMV-NOTIFY
+
+/**
+ * A select field with a choice of available users
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsFormSelectUser extends XoopsFormElementTray
+{
+ /**
+ * Constructor
+ *
+ * @param string $caption
+ * @param string $name
+ * @param mixed $value Pre-selected value (or array of them).
+ * For an item with massive members, such as "Registered Users", "$value" should be used to store selected temporary users only instead of all members of that item
+ * @param bool $include_anon Include user "anonymous"?
+ * @param int $size Number or rows. "1" makes a drop-down-list.
+ * @param bool $multiple Allow multiple selections?
+ */
+ function XoopsFormSelectUser($caption, $name, $include_anon = false, $value = array(), $size = 1, $multiple = false)
+ {
+ $this->XoopsFormElementTray($caption, "<br /><br />", $name);
+
+ $select_form = new XoopsFormSelect("", $name, $value, $size, $multiple);
+ if ($include_anon) {
+ $select_form->addOption(0, $GLOBALS["xoopsConfig"]['anonymous']);
+ }
+ $member_handler = &xoops_gethandler('member');
+ $criteria = new CriteriaCompo();
+ if (!is_array($value)) {
+ $value = array($value);
+ }
+ if(is_array($value) && count($value)>0) {
+ $id_in = "(".implode(",", $value).")";
+ $criteria->add(new Criteria("uid", $id_in, "IN"));
+ $criteria->setSort('name');
+ $criteria->setOrder('ASC');
+ $users = $member_handler->getUserList($criteria);
+ $select_form->addOptionArray($member_handler->getUserList($criteria));
+ }
+
+ $action_tray = new XoopsFormElementTray("", " | ");
+ $action_tray->addElement(new XoopsFormLabel('', "<a href='###' onclick='return openWithSelfMain(\"".XOOPS_URL."/modules/system/include/userselect.php?action=1&target=".$name."&multiple=".$multiple."\", \"userselect\", 800, 500, null);' >"._LIST."</a>"));
+ $action_tray->addElement(new XoopsFormLabel('', "<a href='###' onclick='return openWithSelfMain(\"".XOOPS_URL."/modules/system/include/userselect.php?action=0&target=".$name."&multiple=".$multiple."\", \"userselect\", 800, 500, null);' >"._SEARCH."</a>"));
+ $action_tray->addElement(new XoopsFormLabel('', "<a href='###' onclick='var sel = xoopsGetElementById(\"".$name."\");for (var i = sel.options.length-1; i >= 0; i--) {if (sel.options[i].selected) {sel.options[i] = null;}}'>"._REMOVE."</a>".
+ "<script type=\"text/javascript\">
+ function addusers(opts){
+ var num = opts.substring(0, opts.indexOf(\":\"));
+ opts = opts.substring(opts.indexOf(\":\")+1, opts.length);
+ var sel = xoopsGetElementById(\"".$name."\");
+ var arr = new Array(num);
+ for(var n=0; n<num; n++){
+ var nm = opts.substring(0, opts.indexOf(\":\"));
+ opts = opts.substring(opts.indexOf(\":\")+1, opts.length);
+ var val = opts.substring(0, opts.indexOf(\":\"));
+ opts = opts.substring(opts.indexOf(\":\")+1, opts.length);
+ var txt = opts.substring(0, nm - val.length);
+ opts = opts.substring(nm - val.length, opts.length);
+ var added = false;
+ for (var k = 0; k < sel.options.length; k++) {
+ if(sel.options[k].value == val){
+ added = true;
+ break;
+ }
+ }
+ if(added==false){
+ appendSelectOption(\"".$name."\",txt, val);
+ }
+ }
+ return true;
+ }
+ </script>"
+ ));
+
+ $this->addElement($select_form);
+ $this->addElement($action_tray);
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formselectuser.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formtext.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formtext.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formtext.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,137 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * A simple text field
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsFormText extends XoopsFormElement {
+
+ /**
+ * Size
+ * @var int
+ * @access private
+ */
+ var $_size;
+
+ /**
+ * Maximum length of the text
+ * @var int
+ * @access private
+ */
+ var $_maxlength;
+
+ /**
+ * Initial text
+ * @var string
+ * @access private
+ */
+ var $_value;
+
+ /**
+ * Constructor
+ *
+ * @param string $caption Caption
+ * @param string $name "name" attribute
+ * @param int $size Size
+ * @param int $maxlength Maximum length of text
+ * @param string $value Initial text
+ */
+ function XoopsFormText($caption, $name, $size, $maxlength, $value="", $id = ""){
+ $this->setCaption($caption);
+ $this->setName($name);
+ $this->_size = intval($size);
+ $this->_maxlength = intval($maxlength);
+ $this->setValue($value);
+ $this->setId($id);
+ }
+
+ /**
+ * Get size
+ *
+ * @return int
+ */
+ function getSize(){
+ return $this->_size;
+ }
+
+ /**
+ * Get maximum text length
+ *
+ * @return int
+ */
+ function getMaxlength(){
+ return $this->_maxlength;
+ }
+
+ /**
+ * Get initial text value
+ *
+ * @return string
+ */
+ function getValue(){
+ return $this->_value;
+ }
+
+ /**
+ * Set initial text value
+ *
+ * @param $value string
+ */
+ function setValue($value){
+ $this->_value = $value;
+ }
+
+ /**
+ * Prepare HTML for output
+ *
+ * @return string HTML
+ */
+ function render(){
+ return "<input type='text' name='".$this->getName()."' id='".$this->getId()."' size='".$this->getSize()."' maxlength='".$this->getMaxlength()."' value='".$this->getValue()."'".$this->getExtra()." />";
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formtext.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formtextarea.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formtextarea.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formtextarea.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,137 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ *
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+/**
+ * A textarea
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage form
+ */
+class XoopsFormTextArea extends XoopsFormElement {
+ /**
+ * number of columns
+ * @var int
+ * @access private
+ */
+ var $_cols;
+
+ /**
+ * number of rows
+ * @var int
+ * @access private
+ */
+ var $_rows;
+
+ /**
+ * initial content
+ * @var string
+ * @access private
+ */
+ var $_value;
+
+ /**
+ * Constuctor
+ *
+ * @param string $caption caption
+ * @param string $name name
+ * @param string $value initial content
+ * @param int $rows number of rows
+ * @param int $cols number of columns
+ */
+ function XoopsFormTextArea($caption, $name, $value="", $rows=5, $cols=50, $id = ""){
+ $this->setCaption($caption);
+ $this->setName($name);
+ $this->_rows = intval($rows);
+ $this->_cols = intval($cols);
+ $this->setValue($value);
+ $this->setId($id);
+ }
+
+ /**
+ * get number of rows
+ *
+ * @return int
+ */
+ function getRows(){
+ return $this->_rows;
+ }
+
+ /**
+ * Get number of columns
+ *
+ * @return int
+ */
+ function getCols(){
+ return $this->_cols;
+ }
+
+ /**
+ * Get initial content
+ *
+ * @return string
+ */
+ function getValue(){
+ return $this->_value;
+ }
+
+ /**
+ * Set initial content
+ *
+ * @param $value string
+ */
+ function setValue($value){
+ $this->_value = $value;
+ }
+
+ /**
+ * prepare HTML for output
+ *
+ * @return sting HTML
+ */
+ function render(){
+ return "<textarea name='".$this->getName()."' id='".$this->getId()."' rows='".$this->getRows()."' cols='".$this->getCols()."'".$this->getExtra().">".$this->getValue()."</textarea>";
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formtextarea.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formtextdateselect.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formtextdateselect.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formtextdateselect.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,73 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * A text field with calendar popup
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+class XoopsFormTextDateSelect extends XoopsFormCalendar
+{
+
+ function XoopsFormTextDateSelect($caption, $name, $size = 15, $value= 0)
+ {
+ $calendar_options['showsTime'] = false;
+ $field_attributes['size'] = $size;
+ if ($value && intval($value) != 0) {
+ if (intval($value) > 4000) { //If value is greater than 4000, it is (probably) a UNIX timestamp
+ $field_attributes['value'] = strftime('%Y/%m/%d', $value);
+ }
+ else {
+ $field_attributes['value'] = $value;
+ }
+ }
+ else {
+ $field_attributes['value'] = "YYYY/MM/DD";
+ }
+ $this->XoopsFormCalendar($caption, $name, $value, $calendar_options, $field_attributes );
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/formtextdateselect.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/grouppermform.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/grouppermform.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/grouppermform.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,332 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000-2003 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+require_once XOOPS_ROOT_PATH . '/class/xoopsform/formelement.php';
+require_once XOOPS_ROOT_PATH . '/class/xoopsform/formhidden.php';
+require_once XOOPS_ROOT_PATH . '/class/xoopsform/formbutton.php';
+require_once XOOPS_ROOT_PATH . '/class/xoopsform/formelementtray.php';
+require_once XOOPS_ROOT_PATH . '/class/xoopsform/form.php';
+
+/**
+ * Renders a form for setting module specific group permissions
+ *
+ * @author Kazumi Ono <onokazu at myweb.ne.jp>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ * @package kernel
+ * @subpackage form
+ */
+class XoopsGroupPermForm extends XoopsForm
+{
+ /**
+ * Module ID
+ *
+ * @var int
+ */
+ var $_modid;
+ /**
+ * Tree structure of items
+ *
+ * @var array
+ */
+ var $_itemTree;
+ /**
+ * Name of permission
+ *
+ * @var string
+ */
+ var $_permName;
+ /**
+ * Description of permission
+ *
+ * @var string
+ */
+ var $_permDesc;
+
+ /**
+ * Whether to include anonymous users
+ *
+ * @var bool
+ */
+ var $_showAnonymous;
+
+ /**
+ * Constructor
+ */
+ function XoopsGroupPermForm($title, $modid, $permname, $permdesc, $url = "", $anonymous = true)
+ {
+ $this->XoopsForm($title, 'groupperm_form', XOOPS_URL . '/modules/system/admin/groupperm.php', 'post');
+ $this->_modid = intval($modid);
+ $this->_permName = $permname;
+ $this->_permDesc = $permdesc;
+ $this->addElement(new XoopsFormHidden('modid', $this->_modid));
+ if ($url != "") {
+ $this->addElement(new XoopsFormHidden('redirect_url', $url));
+ }
+ $this->_showAnonymous = $anonymous;
+ }
+
+ /**
+ * Adds an item to which permission will be assigned
+ *
+ * @param string $itemName
+ * @param int $itemId
+ * @param int $itemParent
+ * @access public
+ */
+ function addItem($itemId, $itemName, $itemParent = 0)
+ {
+ $this->_itemTree[$itemParent]['children'][] = $itemId;
+ $this->_itemTree[$itemId]['parent'] = $itemParent;
+ $this->_itemTree[$itemId]['name'] = $itemName;
+ $this->_itemTree[$itemId]['id'] = $itemId;
+ }
+
+ /**
+ * Loads all child ids for an item to be used in javascript
+ *
+ * @param int $itemId
+ * @param array $childIds
+ * @access private
+ */
+ function _loadAllChildItemIds($itemId, &$childIds)
+ {
+ if (!empty($this->_itemTree[$itemId]['children'])) {
+ $first_child = $this->_itemTree[$itemId]['children'];
+ foreach ($first_child as $fcid) {
+ array_push($childIds, $fcid);
+ if (!empty($this->_itemTree[$fcid]['children'])) {
+ foreach ($this->_itemTree[$fcid]['children'] as $_fcid) {
+ array_push($childIds, $_fcid);
+ $this->_loadAllChildItemIds($_fcid, $childIds);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Renders the form
+ *
+ * @return string
+ * @access public
+ */
+ function render()
+ {
+ // load all child ids for javascript codes
+ foreach (array_keys($this->_itemTree)as $item_id) {
+ $this->_itemTree[$item_id]['allchild'] = array();
+ $this->_loadAllChildItemIds($item_id, $this->_itemTree[$item_id]['allchild']);
+ }
+ $gperm_handler =& xoops_gethandler('groupperm');
+ $member_handler =& xoops_gethandler('member');
+ $glist =& $member_handler->getGroupList();
+ foreach (array_keys($glist) as $i) {
+ if ($i != XOOPS_GROUP_ANONYMOUS || $this->_showAnonymous) {
+ // get selected item id(s) for each group
+ $selected = $gperm_handler->getItemIds($this->_permName, $i, $this->_modid);
+ $ele = new XoopsGroupFormCheckBox($glist[$i], 'perms[' . $this->_permName . ']', $i, $selected);
+ $ele->setOptionTree($this->_itemTree);
+ $this->addElement($ele);
+ unset($ele);
+ }
+ }
+ $tray = new XoopsFormElementTray('');
+ $tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
+ $tray->addElement(new XoopsFormButton('', 'reset', _CANCEL, 'reset'));
+ $this->addElement($tray);
+ $ret = '<fieldset><legend>' . $this->getTitle() . '</legend><div>' .$this->_permDesc . '</div><br style="clear:both" />';
+ $ret .= "<form name='" . $this->getName() . "' id='" . $this->getName() . "' action='" . $this->getAction() . "' method='" . $this->getMethod() . "'" . $this->getExtra() . ">\n<table width='100%' class='outer' cellspacing='1'>\n";
+ $elements =& $this->getElements();
+ foreach (array_keys($elements) as $i) {
+ if (!is_object($elements[$i])) {
+ $ret .= $elements[$i];
+ } elseif (!$elements[$i]->isHidden()) {
+ $ret .= "<tr valign='top' align='left'><td class='head'>" . $elements[$i]->getCaption();
+ if ($elements[$i]->getDescription() != '') {
+ $ret .= '<br /><br /><span style="font-weight: normal;">' . $elements[$i]->getDescription() . '</span>';
+ }
+ $ret .= "</td>\n<td class='even'>\n" . $elements[$i]->render() . "\n</td></tr>\n";
+ } else {
+ $ret .= $elements[$i]->render();
+ }
+ }
+ $ret .= '</table></form></fieldset>';
+ return $ret;
+ }
+}
+
+/**
+ * Renders checkbox options for a group permission form
+ *
+ * @author Kazumi Ono <onokazu at myweb.ne.jp>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ * @package kernel
+ * @subpackage form
+ */
+class XoopsGroupFormCheckBox extends XoopsFormElement
+{
+ /**
+ * Pre-selected value(s)
+ *
+ * @var array;
+ */
+ var $_value = array();
+ /**
+ * Group ID
+ *
+ * @var int
+ */
+ var $_groupId;
+ /**
+ * Option tree
+ *
+ * @var array
+ */
+ var $_optionTree;
+
+ /**
+ * Constructor
+ */
+ function XoopsGroupFormCheckBox($caption, $name, $groupId, $values = null)
+ {
+ $this->setCaption($caption);
+ $this->setName($name);
+ if (isset($values)) {
+ $this->setValue($values);
+ }
+ $this->_groupId = $groupId;
+ }
+
+ /**
+ * Sets pre-selected values
+ *
+ * @param mixed $value A group ID or an array of group IDs
+ * @access public
+ */
+ function setValue($value)
+ {
+ if (is_array($value)) {
+ foreach ($value as $v) {
+ $this->setValue($v);
+ }
+ } else {
+ $this->_value[] = $value;
+ }
+ }
+
+ /**
+ * Sets the tree structure of items
+ *
+ * @param array $optionTree
+ * @access public
+ */
+ function setOptionTree(&$optionTree)
+ {
+ $this->_optionTree =& $optionTree;
+ }
+
+ /**
+ * Renders checkbox options for this group
+ *
+ * @return string
+ * @access public
+ */
+ function render()
+ {
+ $ret = '<table class="outer"><tr><td class="odd"><table><tr>';
+ $cols = 1;
+ foreach ($this->_optionTree[0]['children'] as $topitem) {
+ if ($cols > 4) {
+ $ret .= '</tr><tr>';
+ $cols = 1;
+ }
+ $tree = '<td>';
+ $prefix = '';
+ $this->_renderOptionTree($tree, $this->_optionTree[$topitem], $prefix);
+ $ret .= $tree.'</td>';
+ $cols++;
+ }
+ $ret .= '</tr></table></td><td class="even">';
+ foreach (array_keys($this->_optionTree) as $id) {
+ if (!empty($id)) {
+ $option_ids[] = "'".$this->getName().'[groups]['.$this->_groupId.']['.$id.']'."'";
+ }
+ }
+ $checkallbtn_id = $this->getName().'[checkallbtn]['.$this->_groupId.']';
+ $option_ids_str = implode(', ', $option_ids);
+ $ret .= _ALL." <input id=\"".$checkallbtn_id."\" type=\"checkbox\" value=\"\" onclick=\"var optionids = new Array(".$option_ids_str."); xoopsCheckAllElements(optionids, '".$checkallbtn_id."');\" />";
+ $ret .= '</td></tr></table>';
+ return $ret;
+ }
+
+ /**
+ * Renders checkbox options for an item tree
+ *
+ * @param string $tree
+ * @param array $option
+ * @param string $prefix
+ * @param array $parentIds
+ * @access private
+ */
+ function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array())
+ {
+ $tree .= $prefix . "<input type=\"checkbox\" name=\"" . $this->getName() . "[groups][" . $this->_groupId . "][" . $option['id'] . "]\" id=\"" . $this->getName() . "[groups][" . $this->_groupId . "][" . $option['id'] . "]\" onclick=\"";
+ // If there are parent elements, add javascript that will
+ // make them selecteded when this element is checked to make
+ // sure permissions to parent items are added as well.
+ foreach ($parentIds as $pid) {
+ $parent_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $pid . ']';
+ $tree .= "var ele = xoopsGetElementById('" . $parent_ele . "'); if(ele.checked != true) {ele.checked = this.checked;}";
+ }
+ // If there are child elements, add javascript that will
+ // make them unchecked when this element is unchecked to make
+ // sure permissions to child items are not added when there
+ // is no permission to this item.
+ foreach ($option['allchild'] as $cid) {
+ $child_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $cid . ']';
+ $tree .= "var ele = xoopsGetElementById('" . $child_ele . "'); if(this.checked != true) {ele.checked = false;}";
+ }
+ $tree .= '" value="1"';
+ if (in_array($option['id'], $this->_value)) {
+ $tree .= ' checked="checked"';
+ }
+ $tree .= " />" . $option['name'] . "<input type=\"hidden\" name=\"" . $this->getName() . "[parents][" . $option['id'] . "]\" value=\"" . implode(':', $parentIds). "\" /><input type=\"hidden\" name=\"" . $this->getName() . "[itemname][" . $option['id'] . "]\" value=\"" . htmlspecialchars($option['name']). "\" /><br />\n";
+ if (isset($option['children'])) {
+ foreach ($option['children'] as $child) {
+ array_push($parentIds, $option['id']);
+ $this->_renderOptionTree($tree, $this->_optionTree[$child], $prefix . ' -', $parentIds);
+ }
+ }
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/grouppermform.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/simpleform.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/simpleform.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/simpleform.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,79 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ *
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * base class
+ */
+include_once XOOPS_ROOT_PATH."/class/xoopsform/form.php";
+
+/**
+ * Form that will output as a simple HTML form with minimum formatting
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage form
+ */
+class XoopsSimpleForm extends XoopsForm
+{
+ /**
+ * create HTML to output the form with minimal formatting
+ *
+ * @return string
+ */
+ function render()
+ {
+ $ret = $this->getTitle()."\n<form name='".$this->getName()."' id='".$this->getName()."' action='".$this->getAction()."' method='".$this->getMethod()."'".$this->getExtra().">\n";
+ foreach ( $this->getElements() as $ele ) {
+ if ( !$ele->isHidden() ) {
+ $ret .= "<b>".$ele->getCaption()."</b><br />".$ele->render()."<br />\n";
+ } else {
+ $ret .= $ele->render()."\n";
+ }
+ }
+ $ret .= "</form>\n";
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/simpleform.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/tableform.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/tableform.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/tableform.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,86 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ *
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+/**
+ * the base class
+ */
+include_once XOOPS_ROOT_PATH."/class/xoopsform/form.php";
+
+/**
+ * Form that will output formatted as a HTML table
+ *
+ * No styles and no JavaScript to check for required fields.
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage form
+ */
+class XoopsTableForm extends XoopsForm
+{
+
+ /**
+ * create HTML to output the form as a table
+ *
+ * @return string
+ */
+ function render()
+ {
+ $hidden = "";
+ $ret = $this->getTitle()."\n<form name='".$this->getName()."' id='".$this->getName()."' action='".$this->getAction()."' method='".$this->getMethod()."'".$this->getExtra().">\n<table border='0' width='100%'>\n";
+ foreach ( $this->getElements() as $ele ) {
+ if ( !$ele->isHidden() ) {
+ $ret .= "<tr valign='top' align='left'><td>".$ele->getCaption();
+ if ($ele->getDescription() != '') {
+ $ret .= '<br /><br /><span style="font-weight: normal;">'.$ele->getDescription().'</span>';
+ }
+ $ret .= "</td><td>".$ele->render()."</td></tr>";
+ } else {
+ $hidden .= $ele->render()."\n";
+ }
+ }
+ $ret .= "</table>".$hidden."\n</form>\n";
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/tableform.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/themeform.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/themeform.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/themeform.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,130 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+/**
+ *
+ *
+ * @package kernel
+ * @subpackage form
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+/**
+ * base class
+ */
+include_once XOOPS_ROOT_PATH."/class/xoopsform/form.php";
+
+/**
+ * Form that will output as a theme-enabled HTML table
+ *
+ * Also adds JavaScript to validate required fields
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage form
+ */
+class XoopsThemeForm extends XoopsForm
+{
+ /**
+ * Insert an empty row in the table to serve as a seperator.
+ *
+ * @param string $extra HTML to be displayed in the empty row.
+ * @param string $class CSS class name for <td> tag
+ */
+ function insertBreak($extra = '', $class= '')
+ {
+ $class = ($class != '') ? " class='$class'" : '';
+ //Fix for $extra tag not showing
+ if ($extra) {
+ $extra = "<tr><td colspan='2' $class>$extra</td></tr>";
+ $this->addElement($extra);
+ } else {
+ $extra = "<tr><td colspan='2' $class> </td></tr>";
+ $this->addElement($extra);
+ }
+ }
+
+ /**
+ * create HTML to output the form as a theme-enabled table with validation.
+ *
+ * @return string
+ */
+ function render()
+ {
+ $hidden = "";
+ $required =& $this->getRequired();
+ // Hack Hervé Thouzard
+ $reqnames=array();
+ foreach(array_keys($required) as $i) {
+ $reqnames[] = $required[$i]->getName();
+ }
+ // End Hack Hervé Thouzard
+ $ret = "<form name='".$this->getName()."' id='".$this->getName()."' action='".$this->getAction()."' method='".$this->getMethod()."' ".$this->getExtra().">\n";
+ foreach ( $this->getElements() as $ele ) {
+ if (is_object($ele) && $ele->isHidden()) {
+ $ret .= $ele->render()."\n";
+ }
+ }
+ $ret .= "<table width='100%' class='outer' cellspacing='1'><tr><th colspan='2'>".$this->getTitle()."</th></tr>";
+ //$count = 0;
+ foreach ( $this->getElements() as $ele ) {
+ if (!is_object($ele)) {
+ $ret .= $ele;
+ } elseif (!$ele->isHidden()) {
+ $class = 'even';
+ $suppl='';
+ if(in_array($ele->getName(),$reqnames)) {
+ $suppl=' *';
+ }
+ $ret .= "<tr valign='top' align='left'><td class='head'>".$ele->getCaption().$suppl;
+ // End Hack Hervé Thouzard
+ if ($ele->getDescription() != '') {
+ $ret .= '<br /><br /><span style="font-weight: normal;">'.$ele->getDescription().'</span>';
+ }
+ $ret .= "</td><td class='$class'>".$ele->render()."</td></tr>";
+ //$count++;
+ }
+ }
+ if (count($reqnames) > 0) {
+ //We have required fields - provide explanation for *
+ $ret .= "<tr class='foot'><td colspan='2'>* = "._REQUIRED."</td></tr>";
+ }
+ $ret .= "</table>\n</form>\n";
+ $ret .= $this->renderValidationJS( true );
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsform/themeform.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsformloader.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsformloader.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsformloader.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,40 @@
+<?php
+// $Id$
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formelement.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/form.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formlabel.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formselect.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formpassword.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formbutton.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formcheckbox.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formhidden.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formfile.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formradio.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formradioyn.php";
+//include_once XOOPS_ROOT_PATH."/class/xoopsform/formselectavatar.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formselectcountry.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formselecttimezone.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formselectlang.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formselectgroup.php";
+// RMV-NOTIFY
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formselectuser.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formselecttheme.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formselectmatchoption.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formtext.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formtextarea.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formdhtmltextarea.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formelementtray.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/themeform.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/simpleform.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formcalendar.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formtextdateselect.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formdatetime.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formhiddentoken.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formeditor.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formselecteditor.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/formselectlist.php";
+//include_once XOOPS_ROOT_PATH."/class/xoopsform/grouppermform.php";
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsformloader.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopslists.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopslists.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopslists.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,533 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: The XOOPS Project //
+// URL: http://www.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+
+if ( !defined("XOOPS_LISTS_INCLUDED") ) {
+ define("XOOPS_LISTS_INCLUDED",1);
+ class XoopsLists
+ {
+ function &getTimeZoneList()
+ {
+ include_once XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/timezone.php';
+ $time_zone_list = array ("-12" => _TZ_GMTM12, "-11" => _TZ_GMTM11, "-10" => _TZ_GMTM10, "-9" => _TZ_GMTM9, "-8" => _TZ_GMTM8, "-7" => _TZ_GMTM7, "-6" => _TZ_GMTM6, "-5" => _TZ_GMTM5, "-4" => _TZ_GMTM4, "-3.5" => _TZ_GMTM35, "-3" => _TZ_GMTM3, "-2" => _TZ_GMTM2, "-1" => _TZ_GMTM1, "0" => _TZ_GMT0, "1" => _TZ_GMTP1, "2" => _TZ_GMTP2, "3" => _TZ_GMTP3, "3.5" => _TZ_GMTP35, "4" => _TZ_GMTP4, "4.5" => _TZ_GMTP45, "5" => _TZ_GMTP5, "5.5" => _TZ_GMTP55, "6" => _TZ_GMTP6, "7" => _TZ_GMTP7, "8" => _TZ_GMTP8, "9" => _TZ_GMTP9, "9.5" => _TZ_GMTP95, "10" => _TZ_GMTP10, "11" => _TZ_GMTP11, "12" => _TZ_GMTP12);
+ return $time_zone_list;
+ }
+
+ /*
+ * gets list of themes folder from themes directory
+ */
+ function &getThemesList()
+ {
+ return XoopsLists::getDirListAsArray(XOOPS_THEME_PATH.'/');
+ }
+
+ /*
+ * gets a list of module folders from the modules directory
+ */
+ function &getModulesList()
+ {
+ return XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH."/modules/");
+ }
+
+ /*
+ * gets list of name of directories inside a directory
+ */
+ function &getDirListAsArray($dirname)
+ {
+ $dirlist = array();
+ if (is_dir($dirname) && $handle = opendir($dirname)) {
+ while (false !== ($file = readdir($handle))) {
+ if ( !preg_match("/^[\.]{1,2}$/",$file) ) {
+ if (strtolower($file) != 'cvs' && is_dir($dirname.$file) ) {
+ $dirlist[$file]=$file;
+ }
+ }
+ }
+ closedir($handle);
+ asort($dirlist);
+ reset($dirlist);
+ }
+ return $dirlist;
+ }
+
+ /*
+ * gets list of all files in a directory
+ */
+ function &getFileListAsArray($dirname, $prefix="")
+ {
+ $filelist = array();
+ if (substr($dirname, -1) == '/') {
+ $dirname = substr($dirname, 0, -1);
+ }
+ if (is_dir($dirname) && $handle = opendir($dirname)) {
+ while (false !== ($file = readdir($handle))) {
+ if (!preg_match("/^[\.]{1,2}$/",$file) && is_file($dirname.'/'.$file)) {
+ $file = $prefix.$file;
+ $filelist[$file]=$file;
+ }
+ }
+ closedir($handle);
+ asort($filelist);
+ reset($filelist);
+ }
+ return $filelist;
+ }
+
+ /*
+ * gets list of image file names in a directory
+ */
+ function &getImgListAsArray($dirname, $prefix="")
+ {
+ $filelist = array();
+ if ($handle = opendir($dirname)) {
+ while (false !== ($file = readdir($handle))) {
+ if ( !preg_match("/^[\.]{1,2}$/",$file) && preg_match("/(\.gif|\.jpg|\.png)$/i",$file) ) {
+ $file = $prefix.$file;
+ $filelist[$file]=$file;
+ }
+ }
+ closedir($handle);
+ asort($filelist);
+ reset($filelist);
+ }
+ return $filelist;
+ }
+
+ /*
+ * gets list of html file names in a certain directory
+ */
+ function &getHtmlListAsArray($dirname, $prefix="")
+ {
+ $filelist = array();
+ if ($handle = opendir($dirname)) {
+ while (false !== ($file = readdir($handle))) {
+ if ( ( !preg_match( "/^[\.]{1,2}$/", $file ) && preg_match( "/(\.htm|\.html|\.xhtml)$/i", $file ) && !is_dir( $file ) ) )
+ {
+ if ( strtolower( $file ) != 'cvs' && !is_dir( $file ) )
+ {
+ $file = $prefix.$file;
+ $filelist[$file] = $prefix.$file;
+ }
+ }
+ }
+ closedir($handle);
+ asort($filelist);
+ reset($filelist);
+ }
+ return $filelist;
+ }
+
+ /*
+ * gets list of avatar file names in a certain directory
+ * if directory is not specified, default directory will be searched
+ */
+ function &getAvatarsList($avatar_dir="")
+ {
+ $avatars = array();
+ if ( $avatar_dir != "" ) {
+ $avatars =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/".$avatar_dir."/", $avatar_dir."/");
+ } else {
+ $avatars =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/");
+ }
+ return $avatars;
+ }
+
+ /*
+ * gets list of all avatar image files inside default avatars directory
+ */
+ function &getAllAvatarsList()
+ {
+ $avatars = array();
+ $dirlist = array();
+ $dirlist =& XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH."/images/avatar/");
+ if ( count($dirlist) > 0 ) {
+ foreach ( $dirlist as $dir ) {
+ $avatars[$dir] =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/".$dir."/", $dir."/");
+ }
+ } else {
+ return false;
+ }
+ return $avatars;
+ }
+
+ /*
+ * gets list of subject icon image file names in a certain directory
+ * if directory is not specified, default directory will be searched
+ */
+ function &getSubjectsList($sub_dir="")
+ {
+ $subjects = array();
+ if($sub_dir != ""){
+ $subjects =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/subject/".$sub_dir, $sub_dir."/");
+ } else {
+ $subjects =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/subject/");
+ }
+ return $subjects;
+ }
+
+ /*
+ * gets list of language folders inside default language directory
+ */
+ function &getLangList()
+ {
+ $lang_list = array();
+ $lang_list =& XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH."/language/");
+ return $lang_list;
+ }
+
+ function &getCountryList()
+ {
+ $country_list = array (
+ "" => "-",
+ "AD" => "Andorra",
+ "AE" => "United Arab Emirates",
+ "AF" => "Afghanistan",
+ "AG" => "Antigua and Barbuda",
+ "AI" => "Anguilla",
+ "AL" => "Albania",
+ "AM" => "Armenia",
+ "AN" => "Netherlands Antilles",
+ "AO" => "Angola",
+ "AQ" => "Antarctica",
+ "AR" => "Argentina",
+ "AS" => "American Samoa",
+ "AT" => "Austria",
+ "AU" => "Australia",
+ "AW" => "Aruba",
+ "AZ" => "Azerbaijan",
+ "BA" => "Bosnia and Herzegovina",
+ "BB" => "Barbados",
+ "BD" => "Bangladesh",
+ "BE" => "Belgium",
+ "BF" => "Burkina Faso",
+ "BG" => "Bulgaria",
+ "BH" => "Bahrain",
+ "BI" => "Burundi",
+ "BJ" => "Benin",
+ "BM" => "Bermuda",
+ "BN" => "Brunei Darussalam",
+ "BO" => "Bolivia",
+ "BR" => "Brazil",
+ "BS" => "Bahamas",
+ "BT" => "Bhutan",
+ "BV" => "Bouvet Island",
+ "BW" => "Botswana",
+ "BY" => "Belarus",
+ "BZ" => "Belize",
+ "CA" => "Canada",
+ "CC" => "Cocos (Keeling) Islands",
+ "CF" => "Central African Republic",
+ "CG" => "Congo",
+ "CH" => "Switzerland",
+ "CI" => "Cote D'Ivoire (Ivory Coast)",
+ "CK" => "Cook Islands",
+ "CL" => "Chile",
+ "CM" => "Cameroon",
+ "CN" => "China",
+ "CO" => "Colombia",
+ "CR" => "Costa Rica",
+ "CS" => "Czechoslovakia (former)",
+ "CU" => "Cuba",
+ "CV" => "Cape Verde",
+ "CX" => "Christmas Island",
+ "CY" => "Cyprus",
+ "CZ" => "Czech Republic",
+ "DE" => "Germany",
+ "DJ" => "Djibouti",
+ "DK" => "Denmark",
+ "DM" => "Dominica",
+ "DO" => "Dominican Republic",
+ "DZ" => "Algeria",
+ "EC" => "Ecuador",
+ "EE" => "Estonia",
+ "EG" => "Egypt",
+ "EH" => "Western Sahara",
+ "ER" => "Eritrea",
+ "ES" => "Spain",
+ "ET" => "Ethiopia",
+ "FI" => "Finland",
+ "FJ" => "Fiji",
+ "FK" => "Falkland Islands (Malvinas)",
+ "FM" => "Micronesia",
+ "FO" => "Faroe Islands",
+ "FR" => "France",
+ "FX" => "France, Metropolitan",
+ "GA" => "Gabon",
+ "GB" => "Great Britain (UK)",
+ "GD" => "Grenada",
+ "GE" => "Georgia",
+ "GF" => "French Guiana",
+ "GH" => "Ghana",
+ "GI" => "Gibraltar",
+ "GL" => "Greenland",
+ "GM" => "Gambia",
+ "GN" => "Guinea",
+ "GP" => "Guadeloupe",
+ "GQ" => "Equatorial Guinea",
+ "GR" => "Greece",
+ "GS" => "S. Georgia and S. Sandwich Isls.",
+ "GT" => "Guatemala",
+ "GU" => "Guam",
+ "GW" => "Guinea-Bissau",
+ "GY" => "Guyana",
+ "HK" => "Hong Kong",
+ "HM" => "Heard and McDonald Islands",
+ "HN" => "Honduras",
+ "HR" => "Croatia (Hrvatska)",
+ "HT" => "Haiti",
+ "HU" => "Hungary",
+ "ID" => "Indonesia",
+ "IE" => "Ireland",
+ "IL" => "Israel",
+ "IN" => "India",
+ "IO" => "British Indian Ocean Territory",
+ "IQ" => "Iraq",
+ "IR" => "Iran",
+ "IS" => "Iceland",
+ "IT" => "Italy",
+ "JM" => "Jamaica",
+ "JO" => "Jordan",
+ "JP" => "Japan",
+ "KE" => "Kenya",
+ "KG" => "Kyrgyzstan",
+ "KH" => "Cambodia",
+ "KI" => "Kiribati",
+ "KM" => "Comoros",
+ "KN" => "Saint Kitts and Nevis",
+ "KP" => "Korea (North)",
+ "KR" => "Korea (South)",
+ "KW" => "Kuwait",
+ "KY" => "Cayman Islands",
+ "KZ" => "Kazakhstan",
+ "LA" => "Laos",
+ "LB" => "Lebanon",
+ "LC" => "Saint Lucia",
+ "LI" => "Liechtenstein",
+ "LK" => "Sri Lanka",
+ "LR" => "Liberia",
+ "LS" => "Lesotho",
+ "LT" => "Lithuania",
+ "LU" => "Luxembourg",
+ "LV" => "Latvia",
+ "LY" => "Libya",
+ "MA" => "Morocco",
+ "MC" => "Monaco",
+ "MD" => "Moldova",
+ "MG" => "Madagascar",
+ "MH" => "Marshall Islands",
+ "MK" => "Macedonia",
+ "ML" => "Mali",
+ "MM" => "Myanmar",
+ "MN" => "Mongolia",
+ "MO" => "Macau",
+ "MP" => "Northern Mariana Islands",
+ "MQ" => "Martinique",
+ "MR" => "Mauritania",
+ "MS" => "Montserrat",
+ "MT" => "Malta",
+ "MU" => "Mauritius",
+ "MV" => "Maldives",
+ "MW" => "Malawi",
+ "MX" => "Mexico",
+ "MY" => "Malaysia",
+ "MZ" => "Mozambique",
+ "NA" => "Namibia",
+ "NC" => "New Caledonia",
+ "NE" => "Niger",
+ "NF" => "Norfolk Island",
+ "NG" => "Nigeria",
+ "NI" => "Nicaragua",
+ "NL" => "Netherlands",
+ "NO" => "Norway",
+ "NP" => "Nepal",
+ "NR" => "Nauru",
+ "NT" => "Neutral Zone",
+ "NU" => "Niue",
+ "NZ" => "New Zealand (Aotearoa)",
+ "OM" => "Oman",
+ "PA" => "Panama",
+ "PE" => "Peru",
+ "PF" => "French Polynesia",
+ "PG" => "Papua New Guinea",
+ "PH" => "Philippines",
+ "PK" => "Pakistan",
+ "PL" => "Poland",
+ "PM" => "St. Pierre and Miquelon",
+ "PN" => "Pitcairn",
+ "PR" => "Puerto Rico",
+ "PT" => "Portugal",
+ "PW" => "Palau",
+ "PY" => "Paraguay",
+ "QA" => "Qatar",
+ "RE" => "Reunion",
+ "RO" => "Romania",
+ "RU" => "Russian Federation",
+ "RW" => "Rwanda",
+ "SA" => "Saudi Arabia",
+ "Sb" => "Solomon Islands",
+ "SC" => "Seychelles",
+ "SD" => "Sudan",
+ "SE" => "Sweden",
+ "SG" => "Singapore",
+ "SH" => "St. Helena",
+ "SI" => "Slovenia",
+ "SJ" => "Svalbard and Jan Mayen Islands",
+ "SK" => "Slovak Republic",
+ "SL" => "Sierra Leone",
+ "SM" => "San Marino",
+ "SN" => "Senegal",
+ "SO" => "Somalia",
+ "SR" => "Suriname",
+ "ST" => "Sao Tome and Principe",
+ "SU" => "USSR (former)",
+ "SV" => "El Salvador",
+ "SY" => "Syria",
+ "SZ" => "Swaziland",
+ "TC" => "Turks and Caicos Islands",
+ "TD" => "Chad",
+ "TF" => "French Southern Territories",
+ "TG" => "Togo",
+ "TH" => "Thailand",
+ "TJ" => "Tajikistan",
+ "TK" => "Tokelau",
+ "TM" => "Turkmenistan",
+ "TN" => "Tunisia",
+ "TO" => "Tonga",
+ "TP" => "East Timor",
+ "TR" => "Turkey",
+ "TT" => "Trinidad and Tobago",
+ "TV" => "Tuvalu",
+ "TW" => "Taiwan",
+ "TZ" => "Tanzania",
+ "UA" => "Ukraine",
+ "UG" => "Uganda",
+ "UK" => "United Kingdom",
+ "UM" => "US Minor Outlying Islands",
+ "US" => "United States",
+ "UY" => "Uruguay",
+ "UZ" => "Uzbekistan",
+ "VA" => "Vatican City State (Holy See)",
+ "VC" => "Saint Vincent and the Grenadines",
+ "VE" => "Venezuela",
+ "VG" => "Virgin Islands (British)",
+ "VI" => "Virgin Islands (U.S.)",
+ "VN" => "Viet Nam",
+ "VU" => "Vanuatu",
+ "WF" => "Wallis and Futuna Islands",
+ "WS" => "Samoa",
+ "YE" => "Yemen",
+ "YT" => "Mayotte",
+ "YU" => "Yugoslavia",
+ "ZA" => "South Africa",
+ "ZM" => "Zambia",
+ "ZR" => "Zaire",
+ "ZW" => "Zimbabwe"
+ );
+ asort($country_list);
+ reset($country_list);
+ return $country_list;
+ }
+
+ function &getHtmlList()
+ {
+ $html_list = array (
+ "a" => "<a>",
+ "abbr" => "<abbr>",
+ "acronym" => "<acronym>",
+ "address" => "<address>",
+ "b" => "<b>",
+ "bdo" => "<bdo>",
+ "big" => "<big>",
+ "blockquote" => "<blockquote>",
+ "caption" => "<caption>",
+ "cite" => "<cite>",
+ "code" => "<code>",
+ "col" => "<col>",
+ "colgroup" => "<colgroup>",
+ "dd" => "<dd>",
+ "del" => "<del>",
+ "dfn" => "<dfn>",
+ "div" => "<div>",
+ "dl" => "<dl>",
+ "dt" => "<dt>",
+ "em" => "<em>",
+ "font" => "<font>",
+ "h1" => "<h1>",
+ "h2" => "<h2>",
+ "h3" => "<h3>",
+ "h4" => "<h4>",
+ "h5" => "<h5>",
+ "h6" => "<h6>",
+ "hr" => "<hr>",
+ "i" => "<i>",
+ "img" => "<img>",
+ "ins" => "<ins>",
+ "kbd" => "<kbd>",
+ "li" => "<li>",
+ "map" => "<map>",
+ "object" => "<object>",
+ "ol" => "<ol>",
+ "samp" => "<samp>",
+ "small" => "<small>",
+ "strong" => "<strong>",
+ "sub" => "<sub>",
+ "sup" => "<sup>",
+ "table" => "<table>",
+ "tbody" => "<tbody>",
+ "td" => "<td>",
+ "tfoot" => "<tfoot>",
+ "th" => "<th>",
+ "thead" => "<thead>",
+ "tr" => "<tr>",
+ "tt" => "<tt>",
+ "ul" => "<ul>",
+ "var" => "<var>"
+ );
+ asort($html_list);
+ reset($html_list);
+ return $html_list;
+ }
+
+ function &getUserRankList()
+ {
+ $db =& Database::getInstance();
+ $myts =& MyTextSanitizer::getInstance();
+ $sql = "SELECT rank_id, rank_title FROM ".$db->prefix("ranks")." WHERE rank_special = 1";
+ $ret = array();
+ $result = $db->query($sql);
+ while ( $myrow = $db->fetchArray($result) ) {
+ $ret[$myrow['rank_id']] = $myts->makeTboxData4Show($myrow['rank_title']);
+ }
+ return $ret;
+ }
+ }
+}
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopslists.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsmailer.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsmailer.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsmailer.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,531 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+if (isset($GLOBALS['xoopsConfig']['language']) && file_exists(XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/mail.php')) {
+ include_once XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/mail.php';
+} else {
+ include_once XOOPS_ROOT_PATH.'/language/english/mail.php';
+}
+
+/**
+ * The new Multimailer class that will carry out the actual sending and will later replace this class.
+ * If you're writing new code, please use that class instead.
+ */
+include_once(XOOPS_ROOT_PATH."/class/mail/xoopsmultimailer.php");
+
+
+/**
+ * Class for sending mail.
+ *
+ * Changed to use the facilities of {@link XoopsMultiMailer}
+ *
+ * @deprecated use {@link XoopsMultiMailer} instead.
+ *
+ * @package class
+ * @subpackage mail
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright (c) 2000-2003 The Xoops Project - www.xoops.org
+ */
+class XoopsMailer
+{
+ /**
+ * reference to a {@link XoopsMultiMailer}
+ *
+ * @var XoopsMultiMailer
+ * @access private
+ * @since 21.02.2003 14:14:13
+ */
+ var $multimailer;
+
+ // sender email address
+ // private
+ var $fromEmail;
+
+ // sender name
+ // private
+ var $fromName;
+
+ // RMV-NOTIFY
+ // sender UID
+ // private
+ var $fromUser;
+
+ // array of user class objects
+ // private
+ var $toUsers;
+
+ // array of email addresses
+ // private
+ var $toEmails;
+
+ // custom headers
+ // private
+ var $headers;
+
+ // subjet of mail
+ // private
+ var $subject;
+
+ // body of mail
+ // private
+ var $body;
+
+ // error messages
+ // private
+ var $errors;
+
+ // messages upon success
+ // private
+ var $success;
+
+ // private
+ var $isMail;
+
+ // private
+ var $isPM;
+
+ // private
+ var $assignedTags;
+
+ // private
+ var $template;
+
+ // private
+ var $templatedir;
+
+ // protected
+ var $charSet = 'iso-8859-1';
+
+ // protected
+ var $encoding = '8bit';
+
+ function XoopsMailer()
+ {
+
+ $this->multimailer = new XoopsMultiMailer();
+ $this->reset();
+ }
+
+ // public
+ // reset all properties to default
+ function reset()
+ {
+ $this->fromEmail = "";
+ $this->fromName = "";
+ $this->fromUser = null; // RMV-NOTIFY
+ $this->priority = '';
+ $this->toUsers = array();
+ $this->toEmails = array();
+ $this->headers = array();
+ $this->subject = "";
+ $this->body = "";
+ $this->errors = array();
+ $this->success = array();
+ $this->isMail = false;
+ $this->isPM = false;
+ $this->assignedTags = array();
+ $this->template = "";
+ $this->templatedir = "";
+ // Change below to \r\n if you have problem sending mail
+ $this->LE ="\n";
+ }
+
+ // public
+ function setTemplateDir($value)
+ {
+ if ( substr($value, -1, 1) != "/" ) {
+ $value .= "/";
+ }
+ $this->templatedir = $value;
+ }
+
+ // public
+ function setTemplate($value)
+ {
+ $this->template = $value;
+ }
+
+ // pupblic
+ function setFromEmail($value)
+ {
+ $this->fromEmail = trim($value);
+ }
+
+ // public
+ function setFromName($value)
+ {
+ $this->fromName = trim($value);
+ }
+
+ // RMV-NOTIFY
+ // public
+ function setFromUser(&$user)
+ {
+ if ( strtolower(get_class($user)) == "xoopsuser" ) {
+ $this->fromUser =& $user;
+ }
+ }
+
+ // public
+ function setPriority($value)
+ {
+ $this->priority = trim($value);
+ }
+
+
+ // public
+ function setSubject($value)
+ {
+ $this->subject = trim($value);
+ }
+
+ // public
+ function setBody($value)
+ {
+ $this->body = trim($value);
+ }
+
+ // public
+ function useMail()
+ {
+ $this->isMail = true;
+ }
+
+ // public
+ function usePM()
+ {
+ $this->isPM = true;
+ }
+
+ // public
+ function send($debug = false)
+ {
+ global $xoopsConfig;
+ if ( $this->body == "" && $this->template == "" ) {
+ if ($debug) {
+ $this->errors[] = _MAIL_MSGBODY;
+ }
+ return false;
+ } elseif ( $this->template != "" ) {
+ $path = ( $this->templatedir != "" ) ? $this->templatedir."".$this->template : (XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/mail_template/".$this->template);
+ if ( !($fd = @fopen($path, 'r')) ) {
+ if ($debug) {
+ $this->errors[] = _MAIL_FAILOPTPL;
+ }
+ return false;
+ }
+ $this->setBody(fread($fd, filesize($path)));
+ }
+
+ // for sending mail only
+ if ( $this->isMail || !empty($this->toEmails) ) {
+ if (!empty($this->priority)) {
+ $this->headers[] = "X-Priority: " . $this->priority;
+ }
+ $this->headers[] = "X-Mailer: PHP/".phpversion();
+ $this->headers[] = "Return-Path: ".$this->fromEmail;
+ $headers = join($this->LE, $this->headers);
+ }
+
+// TODO: we should have an option of no-reply for private messages and emails
+// to which we do not accept replies. e.g. the site admin doesn't want a
+// a lot of message from people trying to unsubscribe. Just make sure to
+// give good instructions in the message.
+
+ // add some standard tags (user-dependent tags are included later)
+ global $xoopsConfig;
+ $this->assign ('X_ADMINMAIL', $xoopsConfig['adminmail']);
+ $this->assign ('X_SITENAME', $xoopsConfig['sitename']);
+ $this->assign ('X_SITEURL', XOOPS_URL);
+ // TODO: also X_ADMINNAME??
+ // TODO: X_SIGNATURE, X_DISCLAIMER ?? - these are probably best
+ // done as includes if mail templates ever get this sophisticated
+
+ // replace tags with actual values
+ foreach ( $this->assignedTags as $k => $v ) {
+ $this->body = str_replace("{".$k."}", $v, $this->body);
+ $this->subject = str_replace("{".$k."}", $v, $this->subject);
+ }
+ $this->body = str_replace("\r\n", "\n", $this->body);
+ $this->body = str_replace("\r", "\n", $this->body);
+ $this->body = str_replace("\n", $this->LE, $this->body);
+
+ // send mail to specified mail addresses, if any
+ foreach ( $this->toEmails as $mailaddr ) {
+ if ( !$this->sendMail($mailaddr, $this->subject, $this->body, $headers) ) {
+ if ($debug) {
+ $this->errors[] = sprintf(_MAIL_SENDMAILNG, $mailaddr);
+ }
+ } else {
+ if ($debug) {
+ $this->success[] = sprintf(_MAIL_MAILGOOD, $mailaddr);
+ }
+ }
+ }
+
+ // send message to specified users, if any
+
+ // NOTE: we don't send to LIST of recipients, because the tags
+ // below are dependent on the user identity; i.e. each user
+ // receives (potentially) a different message
+
+ foreach ( $this->toUsers as $user ) {
+ // set some user specific variables
+ $subject = str_replace("{X_UNAME}", $user->getVar("uname"), $this->subject );
+ $subject = str_replace("{X_LOGINNAME}", $user->getVar("loginname"), $subject );
+ $text = str_replace("{X_UID}", $user->getVar("uid"), $this->body );
+ $text = str_replace("{X_UEMAIL}", $user->getVar("email"), $text );
+ $text = str_replace("{X_UNAME}", $user->getVar("uname"), $text );
+ $text = str_replace("{X_LOGINNAME}", $user->getVar("loginname"), $text );
+ $text = str_replace("{X_UACTLINK}", XOOPS_URL."/modules/profile/activate.php?op=actv&id=".$user->getVar("uid")."&actkey=".$user->getVar('actkey'), $text );
+ // send mail
+ if ( $this->isMail ) {
+ if ( !$this->sendMail($user->getVar("email"), $subject, $text, $headers) ) {
+ if ($debug) {
+ $this->errors[] = sprintf(_MAIL_SENDMAILNG, $user->getVar("uname"));
+ }
+ } else {
+ if ($debug) {
+ $this->success[] = sprintf(_MAIL_MAILGOOD, $user->getVar("uname"));
+ }
+ }
+ }
+ // send private message
+ if ( $this->isPM ) {
+ if ( !$this->sendPM($user->getVar("uid"), $subject, $text) ) {
+ if ($debug) {
+ $this->errors[] = sprintf(_MAIL_SENDPMNG, $user->getVar("uname"));
+ }
+ } else {
+ if ($debug) {
+ $this->success[] = sprintf(_MAIL_PMGOOD, $user->getVar("uname"));
+ }
+ }
+ }
+ flush();
+ }
+ if ( count($this->errors) > 0 ) {
+ return false;
+ }
+ return true;
+ }
+
+ // private
+ function sendPM($uid, $subject, $body)
+ {
+ global $xoopsUser;
+ $pm_handler =& xoops_getmodulehandler('privmessage', 'pm');
+ if (!is_object($pm_handler)) {
+ if ( file_exists(XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php") ) {
+ include_once XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php";
+ } else {
+ include_once XOOPS_ROOT_PATH."/language/english/error.php";
+ }
+ $this->errors[] = _ER_MAIL_PMMODULENOEXIST;
+ return false;
+ }
+ $pm =& $pm_handler->create();
+ $pm->setVar("subject", $subject);
+ // RMV-NOTIFY
+ $pm->setVar('from_userid', !empty($this->fromUser) ? $this->fromUser->getVar('uid') : $xoopsUser->getVar('uid'));
+ $pm->setVar("msg_text", $body);
+ $pm->setVar("to_userid", $uid);
+ if (!$pm_handler->insert($pm)) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Send email
+ *
+ * Uses the new XoopsMultiMailer
+ *
+ * @param string
+ * @param string
+ * @param string
+ * @return boolean FALSE on error.
+ */
+
+ function sendMail($email, $subject, $body, $headers)
+ {
+ $subject = $this->encodeSubject($subject);
+ $this->encodeBody($body);
+ $this->multimailer->ClearAllRecipients();
+ $this->multimailer->AddAddress($email);
+ $this->multimailer->Subject = $subject;
+ $this->multimailer->Body = $body;
+ $this->multimailer->CharSet = $this->charSet;
+ $this->multimailer->Encoding = $this->encoding;
+ if (!empty($this->fromName)) {
+ $this->multimailer->FromName = $this->encodeFromName($this->fromName);
+ }
+ if (!empty($this->fromEmail)) {
+ $this->multimailer->From = $this->fromEmail;
+ }
+ $this->multimailer->ClearCustomHeaders();
+ foreach ($this->headers as $header) {
+ $this->multimailer->AddCustomHeader($header);
+ }
+ if (!$this->multimailer->Send()) {
+ $this->errors[] = $this->multimailer->ErrorInfo;
+ return FALSE;
+ }
+ return TRUE;
+ }
+
+ // public
+ function getErrors($ashtml = true)
+ {
+ if ( !$ashtml ) {
+ return $this->errors;
+ } else {
+ if ( !empty($this->errors) ) {
+ $ret = "<h4>"._ERRORS."</h4>";
+ foreach ( $this->errors as $error ) {
+ $ret .= $error."<br />";
+ }
+ } else {
+ $ret = "";
+ }
+ return $ret;
+ }
+ }
+
+ // public
+ function getSuccess($ashtml = true)
+ {
+ if ( !$ashtml ) {
+ return $this->success;
+ } else {
+ $ret = "";
+ if ( !empty($this->success) ) {
+ foreach ( $this->success as $suc ) {
+ $ret .= $suc."<br />";
+ }
+ }
+ return $ret;
+ }
+ }
+
+ // public
+ function assign($tag, $value=null)
+ {
+ if ( is_array($tag) ) {
+ foreach ( $tag as $k => $v ) {
+ $this->assign($k, $v);
+ }
+ } else {
+ if ( !empty($tag) && isset($value) ) {
+ $tag = strtoupper(trim($tag));
+// RMV-NOTIFY
+// TEMPORARY FIXME: until the X_tags are all in here
+// if ( substr($tag, 0, 2) != "X_" ) {
+ $this->assignedTags[$tag] = $value;
+// }
+ }
+ }
+ }
+
+ // public
+ function addHeaders($value)
+ {
+ $this->headers[] = trim($value).$this->LE;
+ }
+
+ // public
+ function setToEmails($email)
+ {
+ if ( !is_array($email) ) {
+ if (preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$/i",$email) ) {
+ array_push($this->toEmails, $email);
+ }
+ } else {
+ foreach ( $email as $e) {
+ $this->setToEmails($e);
+ }
+ }
+ }
+
+ // public
+ function setToUsers(&$user)
+ {
+ if ( !is_array($user) ) {
+ if ( strtolower(get_class($user)) == "xoopsuser" ) {
+ array_push($this->toUsers, $user);
+ }
+ } else {
+ foreach ( $user as $u) {
+ $this->setToUsers($u);
+ }
+ }
+ }
+
+ // public
+ function setToGroups($group)
+ {
+ if ( !is_array($group) ) {
+ if ( strtolower(get_class($group)) == "xoopsgroup" ) {
+ $member_handler =& xoops_gethandler('member');
+ $this->setToUsers($member_handler->getUsersByGroup($group->getVar('groupid'), true));
+ }
+ } else {
+ foreach ($group as $g) {
+ $this->setToGroups($g);
+ }
+ }
+ }
+
+ // abstract
+ // to be overidden by lang specific mail class, if needed
+ function encodeFromName($text)
+ {
+ return $text;
+ }
+
+ // abstract
+ // to be overidden by lang specific mail class, if needed
+ function encodeSubject($text)
+ {
+ return $text;
+ }
+
+ // abstract
+ // to be overidden by lang specific mail class, if needed
+ function encodeBody(&$text)
+ {
+
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsmailer.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsmodule.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsmodule.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsmodule.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,14 @@
+<?php
+// $Id$
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * this file is for backward compatibility only
+ *
+ **/
+/**
+ * load the new module class
+ **/
+require_once XOOPS_ROOT_PATH.'/kernel/module.php';
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsmodule.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsobject.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsobject.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsobject.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,14 @@
+<?php
+// $Id$
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * this file is for backward compatibility only
+ * @package kernel
+ **/
+/**
+ * Load the new object class
+ **/
+require_once XOOPS_ROOT_PATH.'/kernel/object.php';
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsobject.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopssecurity.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopssecurity.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopssecurity.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,270 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+/*
+ * Class for managing security aspects such as checking referers, applying tokens and checking global variables for contamination
+ *
+ * @package kernel
+ * @subpackage core
+ *
+ * @author Jan Pedersen <mithrandir at xoops.org>
+ * @copyright (c) 2000-2005 The Xoops Project - www.xoops.org
+ */
+
+class XoopsSecurity {
+ var $errors = array();
+ /**
+ * Constructor
+ *
+ **/
+ function XoopsSecurity() {
+ }
+
+ /**
+ * Check if there is a valid token in $_REQUEST['XOOPS_TOKEN_REQUEST'] - can be expanded for more wide use, later (Mith)
+ *
+ * @param bool $clearIfValid whether to clear the token after validation
+ *
+ * @return bool
+ */
+ function check($clearIfValid = true, $token = false) {
+ return $this->validateToken($token, $clearIfValid);
+ }
+
+ /**
+ * Create a token in the user's session
+ *
+ * @param int $timeout time in seconds the token should be valid
+ *
+ * @return string token value
+ */
+ function createToken($timeout = 0)
+ {
+ $this->garbageCollection();
+ if ($timeout == 0) {
+ $timeout = intval($GLOBALS['xoopsConfig']['session_expire']) * 60; //session_expire is in minutes, we need seconds
+ if ($timeout == 0 || $timeout > 1000) { //if timeout is still zero - or a very large value
+ $timeout = 60*60; //set timeout to 60 minutes
+ }
+ }
+ $token_id = md5(uniqid(rand(), true));
+ // save token data on the server
+ if (!isset($_SESSION['XOOPS_TOKEN_SESSION'])) {
+ $_SESSION['XOOPS_TOKEN_SESSION'] = array();
+ }
+ $expire_time = time() + intval($timeout);
+ $token_data = array('id' => $token_id, 'expire' => $expire_time);
+ array_push($_SESSION['XOOPS_TOKEN_SESSION'], $token_data);
+ return md5($token_id.$_SERVER['HTTP_USER_AGENT'].XOOPS_DB_PREFIX);
+ }
+
+ /**
+ * Check if a token is valid. If no token is specified, $_REQUEST['XOOPS_TOKEN_REQUEST'] is checked
+ *
+ * @param string $token token to validate
+ * @param bool $clearIfValid whether to clear the token value if valid
+ *
+ * @return bool
+ **/
+ function validateToken($token = false, $clearIfValid = true)
+ {
+ global $xoopsLogger;
+ if ( file_exists(XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php") ) {
+ include_once XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php";
+ } else {
+ include_once XOOPS_ROOT_PATH."/language/english/error.php";
+ }
+ $token = ($token === false) ? @$_REQUEST['XOOPS_TOKEN_REQUEST'] : $token;
+ if (empty($token) || empty($_SESSION['XOOPS_TOKEN_SESSION'])) {
+ $xoopsLogger->addExtra('Token Validation', _ER_SEC_NOTOKENFOUND);
+ $this->setErrors(_ER_SEC_NOTOKENFOUND);
+ return false;
+ }
+ $validFound = false;
+ $token_data =& $_SESSION['XOOPS_TOKEN_SESSION'];
+ foreach (array_keys($token_data) as $i) {
+ if ($token === md5($token_data[$i]['id'].$_SERVER['HTTP_USER_AGENT'].XOOPS_DB_PREFIX)) {
+ if ($this->filterToken($token_data[$i])) {
+ if ($clearIfValid) {
+ // token should be valid once, so clear it once validated
+ unset($token_data[$i]);
+ }
+ $xoopsLogger->addExtra('Token Validation', 'Valid Token Found');
+ $validFound = true;
+ }
+ else {
+ $str = _ER_SEC_TOKENEXPIRED;
+ $this->setErrors($str);
+ $xoopsLogger->addExtra('Token Validation', $str);
+ }
+ }
+ }
+ if (!$validFound) {
+ $xoopsLogger->addExtra('Token Validation', _ER_SEC_NOTOKENFOUND);
+ $this->setErrors(_ER_SEC_NOTOKENFOUND);
+ }
+ $this->garbageCollection();
+ return $validFound;
+ }
+
+ /**
+ * Clear all token values from user's session
+ **/
+ function clearTokens()
+ {
+ $_SESSION['XOOPS_TOKEN_SESSION'] = array();
+ }
+
+ /**
+ * Check whether a token value is expired or not
+ *
+ * @param string $token
+ *
+ * @return bool
+ **/
+ function filterToken($token)
+ {
+ return (!empty($token['expire']) && $token['expire'] >= time());
+ }
+
+ /**
+ * Perform garbage collection, clearing expired tokens
+ *
+ * @return void
+ **/
+ function garbageCollection() {
+ if (isset($_SESSION['XOOPS_TOKEN_SESSION']) && count($_SESSION['XOOPS_TOKEN_SESSION']) > 0) {
+ $_SESSION['XOOPS_TOKEN_SESSION'] = array_filter($_SESSION['XOOPS_TOKEN_SESSION'], array($this, 'filterToken'));
+ }
+ }
+ /**
+ * Check the user agent's HTTP REFERER against XOOPS_URL
+ *
+ * @param int $docheck 0 to not check the referer (used with XML-RPC), 1 to actively check it
+ *
+ * @return bool
+ **/
+ function checkReferer($docheck=1)
+ {
+ if ($docheck == 0) {
+ return true;
+ }
+ $ref = xoops_getenv('HTTP_REFERER');
+ if ($ref == '') {
+ return false;
+ }
+ $pref = parse_url($ref);
+ if ( $pref['host'] != $_SERVER['HTTP_HOST']
+ // PORT might be appended to $_SERVER['HTTP_HOST'] by some browsers
+ && $pref['host'].":".$pref['port'] != $_SERVER['HTTP_HOST']
+ ) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Check superglobals for contamination
+ *
+ * @return void
+ **/
+ function checkSuperglobals() {
+ foreach (array('GLOBALS', '_SESSION', 'HTTP_SESSION_VARS', '_GET', 'HTTP_GET_VARS', '_POST', 'HTTP_POST_VARS', '_COOKIE', 'HTTP_COOKIE_VARS', '_REQUEST', '_SERVER', 'HTTP_SERVER_VARS', '_ENV', 'HTTP_ENV_VARS', '_FILES', 'HTTP_POST_FILES', 'xoopsDB', 'xoopsUser', 'xoopsUserId', 'xoopsUserGroups', 'xoopsUserIsAdmin', 'xoopsConfig', 'xoopsOption', 'xoopsModule', 'xoopsModuleConfig', 'xoopsRequestUri') as $bad_global) {
+ if (isset($_REQUEST[$bad_global])) {
+ header('Location: '.XOOPS_URL.'/');
+ exit();
+ }
+ }
+ }
+
+ /**
+ * Check if visitor's IP address is banned
+ * Should be changed to return bool and let the action be up to the calling script
+ *
+ * @return void
+ **/
+ function checkBadips() {
+ global $xoopsConfig;
+ if ($xoopsConfig['enable_badips'] == 1 && isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] != '') {
+ foreach ($xoopsConfig['bad_ips'] as $bi) {
+ if (!empty($bi) && preg_match("/".$bi."/", $_SERVER['REMOTE_ADDR'])) {
+ exit();
+ }
+ }
+ }
+ unset($bi);
+ unset($bad_ips);
+ unset($xoopsConfig['badips']);
+ }
+
+ /**
+ * Get the HTML code for a XoopsFormHiddenToken object - used in forms that do not use XoopsForm elements
+ *
+ * @return string
+ **/
+ function getTokenHTML() {
+ require_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
+ $token = new XoopsFormHiddenToken();
+ return $token->render();
+ }
+
+ /**
+ * Add an error
+ *
+ * @param string $error
+ **/
+ function setErrors($error)
+ {
+ $this->errors[] = trim($error);
+ }
+
+ /**
+ * Get generated errors
+ *
+ * @param bool $ashtml Format using HTML?
+ *
+ * @return array|string Array of array messages OR HTML string
+ */
+ function &getErrors($ashtml = false)
+ {
+ if (!$ashtml) {
+ return $this->errors;
+ } else {
+ $ret = '';
+ if (count($this->errors) > 0) {
+ foreach ($this->errors as $error) {
+ $ret .= $error.'<br />';
+ }
+ }
+ return $ret;
+ }
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopssecurity.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsstory.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsstory.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsstory.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,434 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+include_once XOOPS_ROOT_PATH."/class/xoopstopic.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsuser.php";
+
+class XoopsStory
+{
+ var $table;
+ var $storyid;
+ var $topicid;
+ var $uid;
+ var $title;
+ var $hometext;
+ var $bodytext="";
+ var $counter;
+ var $created;
+ var $published;
+ var $expired;
+ var $hostname;
+ var $nohtml=0;
+ var $nosmiley=0;
+ var $ihome=0;
+ var $notifypub=0;
+ var $type;
+ var $approved;
+ var $topicdisplay;
+ var $topicalign;
+ var $db;
+ var $topicstable;
+ var $comments;
+
+ function Story($storyid=-1)
+ {
+ $this->db =& Database::getInstance();
+ $this->table = "";
+ $this->topicstable = "";
+ if ( is_array($storyid) ) {
+ $this->makeStory($storyid);
+ } elseif ( $storyid != -1 ) {
+ $this->getStory(intval($storyid));
+ }
+ }
+
+ function setStoryId($value)
+ {
+ $this->storyid = intval($value);
+ }
+
+ function setTopicId($value)
+ {
+ $this->topicid = intval($value);
+ }
+
+ function setUid($value)
+ {
+ $this->uid = intval($value);
+ }
+
+ function setTitle($value)
+ {
+ $this->title = $value;
+ }
+
+ function setHometext($value)
+ {
+ $this->hometext = $value;
+ }
+
+ function setBodytext($value)
+ {
+ $this->bodytext = $value;
+ }
+
+ function setPublished($value)
+ {
+ $this->published = intval($value);
+ }
+
+ function setExpired($value)
+ {
+ $this->expired = intval($value);
+ }
+
+ function setHostname($value)
+ {
+ $this->hostname = $value;
+ }
+
+ function setNohtml($value=0)
+ {
+ $this->nohtml = $value;
+ }
+
+ function setNosmiley($value=0)
+ {
+ $this->nosmiley = $value;
+ }
+
+ function setIhome($value)
+ {
+ $this->ihome = $value;
+ }
+
+ function setNotifyPub($value)
+ {
+ $this->notifypub = $value;
+ }
+
+ function setType($value)
+ {
+ $this->type = $value;
+ }
+
+ function setApproved($value)
+ {
+ $this->approved = intval($value);
+ }
+
+ function setTopicdisplay($value)
+ {
+ $this->topicdisplay = $value;
+ }
+
+ function setTopicalign($value)
+ {
+ $this->topicalign = $value;
+ }
+
+ function setComments($value)
+ {
+ $this->comments = intval($value);
+ }
+
+ function store($approved=false)
+ {
+ //$newpost = 0;
+ $myts =& MyTextSanitizer::getInstance();
+ $title =$myts->censorString($this->title);
+ $hometext =$myts->censorString($this->hometext);
+ $bodytext =$myts->censorString($this->bodytext);
+ $title = $myts->makeTboxData4Save($title);
+ $hometext = $myts->makeTareaData4Save($hometext);
+ $bodytext = $myts->makeTareaData4Save($bodytext);
+ if ( !isset($this->nohtml) || $this->nohtml != 1 ) {
+ $this->nohtml = 0;
+ }
+ if ( !isset($this->nosmiley) || $this->nosmiley != 1 ) {
+ $this->nosmiley = 0;
+ }
+ if ( !isset($this->notifypub) || $this->notifypub != 1 ) {
+ $this->notifypub = 0;
+ }
+ if( !isset($this->topicdisplay) || $this->topicdisplay != 0 ) {
+ $this->topicdisplay = 1;
+ }
+ $expired = !empty($this->expired) ? $this->expired : 0;
+ if ( !isset($this->storyid) ) {
+ //$newpost = 1;
+ $newstoryid = $this->db->genId($this->table."_storyid_seq");
+ $created = time();
+ $published = ( $this->approved ) ? $this->published : 0;
+
+ $sql = sprintf("INSERT INTO %s (storyid, uid, title, created, published, expired, hostname, nohtml, nosmiley, hometext, bodytext, counter, topicid, ihome, notifypub, story_type, topicdisplay, topicalign, comments) VALUES (%u, %u, '%s', %u, %u, %u, '%s', %u, %u, '%s', '%s', %u, %u, %u, %u, '%s', %u, '%s', %u)", $this->table, $newstoryid, $this->uid, $title, $created, $published, $expired, $this->hostname, $this->nohtml, $this->nosmiley, $hometext, $bodytext, 0, $this->topicid, $this->ihome, $this->notifypub, $this->type, $this->topicdisplay, $this->topicalign, $this->comments);
+ } else {
+ if ( $this->approved ) {
+ $sql = sprintf("UPDATE %s SET title = '%s', published = %u, expired = %u, nohtml = %u, nosmiley = %u, hometext = '%s', bodytext = '%s', topicid = %u, ihome = %u, topicdisplay = %u, topicalign = '%s', comments = %u WHERE storyid = %u", $this->table, $title, $this->published, $expired, $this->nohtml, $this->nosmiley, $hometext, $bodytext, $this->topicid, $this->ihome, $this->topicdisplay, $this->topicalign, $this->comments, $this->storyid);
+ } else {
+ $sql = sprintf("UPDATE %s SET title = '%s', expired = %u, nohtml = %u, nosmiley = %u, hometext = '%s', bodytext = '%s', topicid = %u, ihome = %u, topicdisplay = %u, topicalign = '%s', comments = %u WHERE storyid = %u", $this->table, $title, $expired, $this->nohtml, $this->nosmiley, $hometext, $bodytext, $this->topicid, $this->ihome, $this->topicdisplay, $this->topicalign, $this->comments, $this->storyid);
+ }
+ $newstoryid = $this->storyid;
+ }
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ if ( empty($newstoryid) ) {
+ $newstoryid = $this->db->getInsertId();
+ $this->storyid = $newstoryid;
+ }
+ return $newstoryid;
+ }
+
+ function getStory($storyid)
+ {
+ $sql = "SELECT * FROM ".$this->table." WHERE storyid=".$storyid."";
+ $array = $this->db->fetchArray($this->db->query($sql));
+ $this->makeStory($array);
+ }
+
+ function makeStory($array)
+ {
+ foreach ( $array as $key=>$value ){
+ $this->$key = $value;
+ }
+ }
+
+ function delete()
+ {
+ $sql = sprintf("DELETE FROM %s WHERE storyid = %u", $this->table, $this->storyid);
+ if( !$result = $this->db->query($sql) ) {
+ return false;
+ }
+ return true;
+ }
+
+ function updateCounter()
+ {
+ $sql = sprintf("UPDATE %s SET counter = counter+1 WHERE storyid = %u", $this->table, $this->storyid);
+ if ( !$result = $this->db->queryF($sql) ) {
+ return false;
+ }
+ return true;
+ }
+
+ function updateComments($total)
+ {
+ $sql = sprintf("UPDATE %s SET comments = %u WHERE storyid = %u", $this->table, $total, $this->storyid);
+ if ( !$result = $this->db->queryF($sql) ) {
+ return false;
+ }
+ return true;
+ }
+
+ function topicid()
+ {
+ return $this->topicid;
+ }
+
+ function topic()
+ {
+ return new XoopsTopic($this->topicstable, $this->topicid);
+ }
+
+ function uid()
+ {
+ return $this->uid;
+ }
+
+ function uname()
+ {
+ return XoopsUser::getUnameFromId($this->uid);
+ }
+
+ function title($format="Show")
+ {
+ $myts =& MyTextSanitizer::getInstance();
+ $smiley = 1;
+ if ( $this->nosmiley() ) {
+ $smiley = 0;
+ }
+ switch ( $format ) {
+ case "Show":
+ $title = $myts->makeTboxData4Show($this->title,$smiley);
+ break;
+ case "Edit":
+ $title = $myts->makeTboxData4Edit($this->title);
+ break;
+ case "Preview":
+ $title = $myts->makeTboxData4Preview($this->title,$smiley);
+ break;
+ case "InForm":
+ $title = $myts->makeTboxData4PreviewInForm($this->title);
+ break;
+ }
+ return $title;
+ }
+
+ function hometext($format="Show")
+ {
+ $myts =& MyTextSanitizer::getInstance();
+ $html = 1;
+ $smiley = 1;
+ $xcodes = 1;
+ if ( $this->nohtml() ) {
+ $html = 0;
+ }
+ if ( $this->nosmiley() ) {
+ $smiley = 0;
+ }
+ switch ( $format ) {
+ case "Show":
+ $hometext = $myts->makeTareaData4Show($this->hometext,$html,$smiley,$xcodes);
+ break;
+ case "Edit":
+ $hometext = $myts->makeTareaData4Edit($this->hometext);
+ break;
+ case "Preview":
+ $hometext = $myts->makeTareaData4Preview($this->hometext,$html,$smiley,$xcodes);
+ break;
+ case "InForm":
+ $hometext = $myts->makeTareaData4PreviewInForm($this->hometext);
+ break;
+ }
+ return $hometext;
+ }
+
+ function bodytext($format="Show")
+ {
+ $myts =& MyTextSanitizer::getInstance();
+ $html = 1;
+ $smiley = 1;
+ $xcodes = 1;
+ if ( $this->nohtml() ) {
+ $html = 0;
+ }
+ if ( $this->nosmiley() ) {
+ $smiley = 0;
+ }
+ switch ( $format ) {
+ case "Show":
+ $bodytext = $myts->makeTareaData4Show($this->bodytext,$html,$smiley,$xcodes);
+ break;
+ case "Edit":
+ $bodytext = $myts->makeTareaData4Edit($this->bodytext);
+ break;
+ case "Preview":
+ $bodytext = $myts->makeTareaData4Preview($this->bodytext,$html,$smiley, $xcodes);
+ break;
+ case "InForm":
+ $bodytext = $myts->makeTareaData4PreviewInForm($this->bodytext);
+ break;
+ }
+ return $bodytext;
+ }
+
+ function counter()
+ {
+ return $this->counter;
+ }
+
+ function created()
+ {
+ return $this->created;
+ }
+
+ function published()
+ {
+ return $this->published;
+ }
+
+ function expired()
+ {
+ return $this->expired;
+ }
+
+ function hostname()
+ {
+ return $this->hostname;
+ }
+
+ function storyid()
+ {
+ return $this->storyid;
+ }
+
+ function nohtml()
+ {
+ return $this->nohtml;
+ }
+
+ function nosmiley()
+ {
+ return $this->nosmiley;
+ }
+
+ function notifypub()
+ {
+ return $this->notifypub;
+ }
+
+ function type()
+ {
+ return $this->type;
+ }
+
+ function ihome()
+ {
+ return $this->ihome;
+ }
+
+ function topicdisplay()
+ {
+ return $this->topicdisplay;
+ }
+
+ function topicalign($astext=true)
+ {
+ if ( $astext ) {
+ if ( $this->topicalign == "R" ) {
+ $ret = "right";
+ } else {
+ $ret = "left";
+ }
+ return $ret;
+ }
+ return $this->topicalign;
+ }
+
+ function comments()
+ {
+ return $this->comments;
+ }
+}
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsstory.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopstopic.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopstopic.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopstopic.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,340 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+include_once XOOPS_ROOT_PATH."/class/xoopstree.php";
+
+class XoopsTopic
+{
+ var $table;
+ var $topic_id;
+ var $topic_pid;
+ var $topic_title;
+ var $topic_imgurl;
+ var $prefix; // only used in topic tree
+ var $use_permission=false;
+ var $mid; // module id used for setting permission
+
+ function XoopsTopic($table, $topicid=0)
+ {
+ $this->db =& Database::getInstance();
+ $this->table = $table;
+ if ( is_array($topicid) ) {
+ $this->makeTopic($topicid);
+ } elseif ( $topicid != 0 ) {
+ $this->getTopic(intval($topicid));
+ } else {
+ $this->topic_id = $topicid;
+ }
+ }
+
+ function setTopicTitle($value)
+ {
+ $this->topic_title = $value;
+ }
+
+ function setTopicImgurl($value)
+ {
+ $this->topic_imgurl = $value;
+ }
+
+ function setTopicPid($value)
+ {
+ $this->topic_pid = $value;
+ }
+
+ function getTopic($topicid)
+ {
+ $sql = "SELECT * FROM ".$this->table." WHERE topic_id=".$topicid."";
+ $array = $this->db->fetchArray($this->db->query($sql));
+ $this->makeTopic($array);
+ }
+
+ function makeTopic($array)
+ {
+ foreach($array as $key=>$value){
+ $this->$key = $value;
+ }
+ }
+
+ function usePermission($mid)
+ {
+ $this->mid = $mid;
+ $this->use_permission = true;
+ }
+
+ function store()
+ {
+ $myts =& MyTextSanitizer::getInstance();
+ $title = "";
+ $imgurl = "";
+ if ( isset($this->topic_title) && $this->topic_title != "" ) {
+ $title = $myts->makeTboxData4Save($this->topic_title);
+ }
+ if ( isset($this->topic_imgurl) && $this->topic_imgurl != "" ) {
+ $imgurl = $myts->makeTboxData4Save($this->topic_imgurl);
+ }
+ if ( !isset($this->topic_pid) || !is_numeric($this->topic_pid) ) {
+ $this->topic_pid = 0;
+ }
+ if ( empty($this->topic_id) ) {
+ $this->topic_id = $this->db->genId($this->table."_topic_id_seq");
+ $sql = sprintf("INSERT INTO %s (topic_id, topic_pid, topic_imgurl, topic_title) VALUES (%u, %u, '%s', '%s')", $this->table, $this->topic_id, $this->topic_pid, $imgurl, $title);
+ } else {
+ $sql = sprintf("UPDATE %s SET topic_pid = %u, topic_imgurl = '%s', topic_title = '%s' WHERE topic_id = %u", $this->table, $this->topic_pid, $imgurl, $title, $this->topic_id);
+ }
+ if ( !$result = $this->db->query($sql) ) {
+ ErrorHandler::show('0022');
+ }
+ if ( $this->use_permission == true ) {
+ if ( empty($this->topic_id) ) {
+ $this->topic_id = $this->db->getInsertId();
+ }
+ $xt = new XoopsTree($this->table, "topic_id", "topic_pid");
+ $parent_topics = $xt->getAllParentId($this->topic_id);
+ if ( !empty($this->m_groups) && is_array($this->m_groups) ){
+ foreach ( $this->m_groups as $m_g ) {
+ $moderate_topics = XoopsPerms::getPermitted($this->mid, "ModInTopic", $m_g);
+ $add = true;
+ // only grant this permission when the group has this permission in all parent topics of the created topic
+ foreach($parent_topics as $p_topic){
+ if ( !in_array($p_topic, $moderate_topics) ) {
+ $add = false;
+ continue;
+ }
+ }
+ if ( $add == true ) {
+ $xp = new XoopsPerms();
+ $xp->setModuleId($this->mid);
+ $xp->setName("ModInTopic");
+ $xp->setItemId($this->topic_id);
+ $xp->store();
+ $xp->addGroup($m_g);
+ }
+ }
+ }
+ if ( !empty($this->s_groups) && is_array($this->s_groups) ){
+ foreach ( $s_groups as $s_g ) {
+ $submit_topics = XoopsPerms::getPermitted($this->mid, "SubmitInTopic", $s_g);
+ $add = true;
+ foreach($parent_topics as $p_topic){
+ if ( !in_array($p_topic, $submit_topics) ) {
+ $add = false;
+ continue;
+ }
+ }
+ if ( $add == true ) {
+ $xp = new XoopsPerms();
+ $xp->setModuleId($this->mid);
+ $xp->setName("SubmitInTopic");
+ $xp->setItemId($this->topic_id);
+ $xp->store();
+ $xp->addGroup($s_g);
+ }
+ }
+ }
+ if ( !empty($this->r_groups) && is_array($this->r_groups) ){
+ foreach ( $r_groups as $r_g ) {
+ $read_topics = XoopsPerms::getPermitted($this->mid, "ReadInTopic", $r_g);
+ $add = true;
+ foreach($parent_topics as $p_topic){
+ if ( !in_array($p_topic, $read_topics) ) {
+ $add = false;
+ continue;
+ }
+ }
+ if ( $add == true ) {
+ $xp = new XoopsPerms();
+ $xp->setModuleId($this->mid);
+ $xp->setName("ReadInTopic");
+ $xp->setItemId($this->topic_id);
+ $xp->store();
+ $xp->addGroup($r_g);
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+ function delete()
+ {
+ $sql = sprintf("DELETE FROM %s WHERE topic_id = %u", $this->table, $this->topic_id);
+ $this->db->query($sql);
+ }
+
+ function topic_id()
+ {
+ return $this->topic_id;
+ }
+
+ function topic_pid()
+ {
+ return $this->topic_pid;
+ }
+
+ function topic_title($format="S")
+ {
+ $myts =& MyTextSanitizer::getInstance();
+ switch($format){
+ case "S":
+ $title = $myts->makeTboxData4Show($this->topic_title);
+ break;
+ case "E":
+ $title = $myts->makeTboxData4Edit($this->topic_title);
+ break;
+ case "P":
+ $title = $myts->makeTboxData4Preview($this->topic_title);
+ break;
+ case "F":
+ $title = $myts->makeTboxData4PreviewInForm($this->topic_title);
+ break;
+ }
+ return $title;
+ }
+
+ function topic_imgurl($format="S")
+ {
+ $myts =& MyTextSanitizer::getInstance();
+ switch($format){
+ case "S":
+ $imgurl= $myts->makeTboxData4Show($this->topic_imgurl);
+ break;
+ case "E":
+ $imgurl = $myts->makeTboxData4Edit($this->topic_imgurl);
+ break;
+ case "P":
+ $imgurl = $myts->makeTboxData4Preview($this->topic_imgurl);
+ break;
+ case "F":
+ $imgurl = $myts->makeTboxData4PreviewInForm($this->topic_imgurl);
+ break;
+ }
+ return $imgurl;
+ }
+
+ function prefix()
+ {
+ if ( isset($this->prefix) ) {
+ return $this->prefix;
+ }
+ }
+
+ function getFirstChildTopics()
+ {
+ $ret = array();
+ $xt = new XoopsTree($this->table, "topic_id", "topic_pid");
+ $topic_arr = $xt->getFirstChild($this->topic_id, "topic_title");
+ if ( is_array($topic_arr) && count($topic_arr) ) {
+ foreach($topic_arr as $topic){
+ $ret[] = new XoopsTopic($this->table, $topic);
+ }
+ }
+ return $ret;
+ }
+
+ function getAllChildTopics()
+ {
+ $ret = array();
+ $xt = new XoopsTree($this->table, "topic_id", "topic_pid");
+ $topic_arr = $xt->getAllChild($this->topic_id, "topic_title");
+ if ( is_array($topic_arr) && count($topic_arr) ) {
+ foreach($topic_arr as $topic){
+ $ret[] = new XoopsTopic($this->table, $topic);
+ }
+ }
+ return $ret;
+ }
+
+ function getChildTopicsTreeArray()
+ {
+ $ret = array();
+ $xt = new XoopsTree($this->table, "topic_id", "topic_pid");
+ $topic_arr = $xt->getChildTreeArray($this->topic_id, "topic_title");
+ if ( is_array($topic_arr) && count($topic_arr) ) {
+ foreach($topic_arr as $topic){
+ $ret[] = new XoopsTopic($this->table, $topic);
+ }
+ }
+ return $ret;
+ }
+
+ function makeTopicSelBox($none=0, $seltopic=-1, $selname="", $onchange="")
+ {
+ $xt = new XoopsTree($this->table, "topic_id", "topic_pid");
+ if ( $seltopic != -1 ) {
+ $xt->makeMySelBox("topic_title", "topic_title", $seltopic, $none, $selname, $onchange);
+ } elseif ( !empty($this->topic_id) ) {
+ $xt->makeMySelBox("topic_title", "topic_title", $this->topic_id, $none, $selname, $onchange);
+ } else {
+ $xt->makeMySelBox("topic_title", "topic_title", 0, $none, $selname, $onchange);
+ }
+ }
+
+ //generates nicely formatted linked path from the root id to a given id
+ function getNiceTopicPathFromId($funcURL)
+ {
+ $xt = new XoopsTree($this->table, "topic_id", "topic_pid");
+ $ret = $xt->getNicePathFromId($this->topic_id, "toppic_title", $funcURL);
+ return $ret;
+ }
+
+ function getAllChildTopicsId()
+ {
+ $xt = new XoopsTree($this->table, "topic_id", "topic_pid");
+ $ret = $xt->getAllChildId($this->topic_id, "toppic_title");
+ return $ret;
+ }
+
+ function &getTopicsList()
+ {
+ $result = $this->db->query('SELECT topic_id, topic_pid, topic_title FROM '.$this->table);
+ $ret = array();
+ $myts =& MyTextSanitizer::getInstance();
+ while ($myrow = $this->db->fetchArray($result)) {
+ $ret[$myrow['topic_id']] = array('title' => $myts->htmlspecialchars($myrow['topic_title']), 'pid' => $myrow['topic_pid']);
+ }
+ return $ret;
+ }
+
+ function topicExists($pid, $title) {
+ $sql = "SELECT COUNT(*) from ".$this->table." WHERE topic_pid = ".intval($pid)." AND topic_title = '".trim($title)."'";
+ $rs = $this->db->query($sql);
+ list($count) = $this->db->fetchRow($rs);
+ if ($count > 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopstopic.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopstree.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopstree.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopstree.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,257 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+class XoopsTree
+{
+ var $table; //table with parent-child structure
+ var $id; //name of unique id for records in table $table
+ var $pid; // name of parent id used in table $table
+ var $order; //specifies the order of query results
+ var $title; // name of a field in table $table which will be used when selection box and paths are generated
+ var $db;
+
+ //constructor of class XoopsTree
+ //sets the names of table, unique id, and parend id
+ function XoopsTree($table_name, $id_name, $pid_name)
+ {
+ $this->db =& Database::getInstance();
+ $this->table = $table_name;
+ $this->id = $id_name;
+ $this->pid = $pid_name;
+ }
+
+
+ // returns an array of first child objects for a given id($sel_id)
+ function getFirstChild($sel_id, $order="")
+ {
+ $arr =array();
+ $sql = "SELECT * FROM ".$this->table." WHERE ".$this->pid."=".$sel_id."";
+ if ( $order != "" ) {
+ $sql .= " ORDER BY $order";
+ }
+ $result = $this->db->query($sql);
+ $count = $this->db->getRowsNum($result);
+ if ( $count==0 ) {
+ return $arr;
+ }
+ while ( $myrow=$this->db->fetchArray($result) ) {
+ array_push($arr, $myrow);
+ }
+ return $arr;
+ }
+
+ // returns an array of all FIRST child ids of a given id($sel_id)
+ function getFirstChildId($sel_id)
+ {
+ $idarray =array();
+ $result = $this->db->query("SELECT ".$this->id." FROM ".$this->table." WHERE ".$this->pid."=".$sel_id."");
+ $count = $this->db->getRowsNum($result);
+ if ( $count == 0 ) {
+ return $idarray;
+ }
+ while ( list($id) = $this->db->fetchRow($result) ) {
+ array_push($idarray, $id);
+ }
+ return $idarray;
+ }
+
+ //returns an array of ALL child ids for a given id($sel_id)
+ function getAllChildId($sel_id, $order="", $idarray = array())
+ {
+ $sql = "SELECT ".$this->id." FROM ".$this->table." WHERE ".$this->pid."=".$sel_id."";
+ if ( $order != "" ) {
+ $sql .= " ORDER BY $order";
+ }
+ $result=$this->db->query($sql);
+ $count = $this->db->getRowsNum($result);
+ if ( $count==0 ) {
+ return $idarray;
+ }
+ while ( list($r_id) = $this->db->fetchRow($result) ) {
+ array_push($idarray, $r_id);
+ $idarray = $this->getAllChildId($r_id,$order,$idarray);
+ }
+ return $idarray;
+ }
+
+ //returns an array of ALL parent ids for a given id($sel_id)
+ function getAllParentId($sel_id, $order="", $idarray = array())
+ {
+ $sql = "SELECT ".$this->pid." FROM ".$this->table." WHERE ".$this->id."=".$sel_id."";
+ if ( $order != "" ) {
+ $sql .= " ORDER BY $order";
+ }
+ $result=$this->db->query($sql);
+ list($r_id) = $this->db->fetchRow($result);
+ if ( $r_id == 0 ) {
+ return $idarray;
+ }
+ array_push($idarray, $r_id);
+ $idarray = $this->getAllParentId($r_id,$order,$idarray);
+ return $idarray;
+ }
+
+ //generates path from the root id to a given id($sel_id)
+ // the path is delimetered with "/"
+ function getPathFromId($sel_id, $title, $path="")
+ {
+ $result = $this->db->query("SELECT ".$this->pid.", ".$title." FROM ".$this->table." WHERE ".$this->id."=$sel_id");
+ if ( $this->db->getRowsNum($result) == 0 ) {
+ return $path;
+ }
+ list($parentid,$name) = $this->db->fetchRow($result);
+ $myts =& MyTextSanitizer::getInstance();
+ $name = $myts->makeTboxData4Show($name);
+ $path = "/".$name.$path."";
+ if ( $parentid == 0 ) {
+ return $path;
+ }
+ $path = $this->getPathFromId($parentid, $title, $path);
+ return $path;
+ }
+
+ //makes a nicely ordered selection box
+ //$preset_id is used to specify a preselected item
+ //set $none to 1 to add a option with value 0
+ function makeMySelBox($title,$order="",$preset_id=0, $none=0, $sel_name="", $onchange="")
+ {
+ if ( $sel_name == "" ) {
+ $sel_name = $this->id;
+ }
+ $myts =& MyTextSanitizer::getInstance();
+ echo "<select name='".$sel_name."'";
+ if ( $onchange != "" ) {
+ echo " onchange='".$onchange."'";
+ }
+ echo ">\n";
+ $sql = "SELECT ".$this->id.", ".$title." FROM ".$this->table." WHERE ".$this->pid."=0";
+ if ( $order != "" ) {
+ $sql .= " ORDER BY $order";
+ }
+ $result = $this->db->query($sql);
+ if ( $none ) {
+ echo "<option value='0'>----</option>\n";
+ }
+ while ( list($catid, $name) = $this->db->fetchRow($result) ) {
+ $sel = "";
+ if ( $catid == $preset_id ) {
+ $sel = " selected='selected'";
+ }
+ echo "<option value='$catid'$sel>$name</option>\n";
+ $sel = "";
+ $arr = $this->getChildTreeArray($catid, $order);
+ foreach ( $arr as $option ) {
+ $option['prefix'] = str_replace(".","--",$option['prefix']);
+ $catpath = $option['prefix']." ".$myts->makeTboxData4Show($option[$title]);
+ if ( $option[$this->id] == $preset_id ) {
+ $sel = " selected='selected'";
+ }
+ echo "<option value='".$option[$this->id]."'$sel>$catpath</option>\n";
+ $sel = "";
+ }
+ }
+ echo "</select>\n";
+ }
+
+ //generates nicely formatted linked path from the root id to a given id
+ function getNicePathFromId($sel_id, $title, $funcURL, $path="")
+ {
+ $sql = "SELECT ".$this->pid.", ".$title." FROM ".$this->table." WHERE ".$this->id."=$sel_id";
+ $result = $this->db->query($sql);
+ if ( $this->db->getRowsNum($result) == 0 ) {
+ return $path;
+ }
+ list($parentid,$name) = $this->db->fetchRow($result);
+ $myts =& MyTextSanitizer::getInstance();
+ $name = $myts->makeTboxData4Show($name);
+ $path = "<a href='".$funcURL."&".$this->id."=".$sel_id."'>".$name."</a> : ".$path."";
+ if ( $parentid == 0 ) {
+ return $path;
+ }
+ $path = $this->getNicePathFromId($parentid, $title, $funcURL, $path);
+ return $path;
+ }
+
+ //generates id path from the root id to a given id
+ // the path is delimetered with "/"
+ function getIdPathFromId($sel_id, $path="")
+ {
+ $result = $this->db->query("SELECT ".$this->pid." FROM ".$this->table." WHERE ".$this->id."=$sel_id");
+ if ( $this->db->getRowsNum($result) == 0 ) {
+ return $path;
+ }
+ list($parentid) = $this->db->fetchRow($result);
+ $path = "/".$sel_id.$path."";
+ if ( $parentid == 0 ) {
+ return $path;
+ }
+ $path = $this->getIdPathFromId($parentid, $path);
+ return $path;
+ }
+
+ function getAllChild($sel_id=0,$order="",$parray = array())
+ {
+ $sql = "SELECT * FROM ".$this->table." WHERE ".$this->pid."=".$sel_id."";
+ if ( $order != "" ) {
+ $sql .= " ORDER BY $order";
+ }
+ $result = $this->db->query($sql);
+ $count = $this->db->getRowsNum($result);
+ if ( $count == 0 ) {
+ return $parray;
+ }
+ while ( $row = $this->db->fetchArray($result) ) {
+ array_push($parray, $row);
+ $parray=$this->getAllChild($row[$this->id],$order,$parray);
+ }
+ return $parray;
+ }
+
+ function getChildTreeArray($sel_id=0,$order="",$parray = array(),$r_prefix="")
+ {
+ $sql = "SELECT * FROM ".$this->table." WHERE ".$this->pid."=".$sel_id."";
+ if ( $order != "" ) {
+ $sql .= " ORDER BY $order";
+ }
+ $result = $this->db->query($sql);
+ $count = $this->db->getRowsNum($result);
+ if ( $count == 0 ) {
+ return $parray;
+ }
+ while ( $row = $this->db->fetchArray($result) ) {
+ $row['prefix'] = $r_prefix.".";
+ array_push($parray, $row);
+ $parray = $this->getChildTreeArray($row[$this->id],$order,$parray,$row['prefix']);
+ }
+ return $parray;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopstree.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsuser.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsuser.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsuser.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,8 @@
+<?php
+// $Id$
+// this file is for backward compatibility only
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+require_once XOOPS_ROOT_PATH.'/kernel/user.php';
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/xoopsuser.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/class/zipdownloader.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/class/zipdownloader.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/class/zipdownloader.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,82 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+include_once XOOPS_ROOT_PATH.'/class/downloader.php';
+include_once XOOPS_ROOT_PATH.'/class/class.zipfile.php';
+
+class XoopsZipDownloader extends XoopsDownloader
+{
+ function XoopsZipDownloader($ext = '.zip', $mimyType = 'application/x-zip')
+ {
+ $this->archiver = new zipfile();
+ $this->ext = trim($ext);
+ $this->mimeType = trim($mimyType);
+ }
+
+ function addFile($filepath, $newfilename=null)
+ {
+ // Read in the file's contents
+ $fp = fopen($filepath, "r");
+ $data = fread($fp, filesize($filepath));
+ fclose($fp);
+ $filename = (isset($newfilename) && trim($newfilename) != '') ? trim($newfilename) : $filepath;
+ $this->archiver->addFile($data, $filename, filemtime($filepath));
+ }
+
+ function addBinaryFile($filepath, $newfilename=null)
+ {
+ // Read in the file's contents
+ $fp = fopen($filepath, "rb");
+ $data = fread($fp, filesize($filepath));
+ fclose($fp);
+ $filename = (isset($newfilename) && trim($newfilename) != '') ? trim($newfilename) : $filepath;
+ $this->archiver->addFile($data, $filename, filemtime($filepath));
+ }
+
+ function addFileData(&$data, $filename, $time=0)
+ {
+ $this->archiver->addFile($data, $filename, $time);
+ }
+
+ function addBinaryFileData(&$data, $filename, $time=0)
+ {
+ $this->addFileData($data, $filename, $time);
+ }
+
+ function download($name, $gzip = true)
+ {
+ $this->_header($name.$this->ext);
+ echo $this->archiver->file();
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/class/zipdownloader.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/edituser.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/edituser.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/edituser.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,32 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include 'mainfile.php';
+$url = "modules/profile/edituser.php";
+//this file is deprecated
+header("location: ".$url);
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/edituser.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/error.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/error.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/error.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,48 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+include 'mainfile.php';
+$xoopsOption['template_main'] = "system_error.html";
+include 'header.php';
+$module_handler =& xoops_gethandler('module');
+if (!isset($_REQUEST['m']) || $_REQUEST['m'] == 0) {
+ $module =& $module_handler->create(false);
+ $module->assignVar('dirname', 'system');
+}
+else {
+ $module =& $module_handler->get($_REQUEST['m']);
+}
+$error_arr =& $module->loadErrorMessages();
+$constant_name = $module->getVar('dirname')."_ERROR";
+$errormessage = (isset($_REQUEST['c']) && defined(strtoupper($constant_name).intval($_REQUEST['c']))) ? constant(strtoupper($constant_name).intval($_REQUEST['c'])) : _NOERRORMESSAGE;
+
+$errormessage = str_replace("{SITE_NAME}", $xoopsConfig['sitename'], $errormessage );
+$errormessage = str_replace("{SITE_URL}", XOOPS_URL, $errormessage );
+
+$myts =& MyTextSanitizer::getInstance();
+$xoopsTpl->assign('errormsg', $myts->displayTarea($errormessage));
+include 'footer.php';
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/error.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/favicon.ico
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/favicon.ico
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: XoopsCore/branches/2.2.x/2.2-main/html/footer.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/footer.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/footer.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,57 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+
+if ( !defined("XOOPS_FOOTER_INCLUDED") ) {
+ global $xoopsLogger, $xoopsOption, $xTheme, $xoopsConfig, $xoopsUser, $xoopsModule, $xoopsTpl;
+ $xoopsLogger->context = "core";
+ define("XOOPS_FOOTER_INCLUDED",1);
+ // RMV-NOTIFY
+ include_once XOOPS_ROOT_PATH . '/include/notification_select.php';
+
+ if (!isset($xoopsOption['template_main'])) {
+ $template = null;
+ } else {
+ $template = 'db:'.$xoopsOption['template_main'];
+ }
+
+ // Ensure charset
+ if (!headers_sent()) {
+ header('Content-Type:text/html; charset='._CHARSET);
+ }
+
+ //serve page
+ $GLOBALS['xTheme']->display($template);
+
+ $xoopsLogger->stopTime();
+ if (in_array(2, $xoopsConfig['debug_mode']) && $xoopsUser && $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
+ echo $xoopsLogger->getSQLDebug();
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/footer.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/header.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/header.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/header.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,46 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+
+$GLOBALS['xoopsLogger']->context = "core";
+
+// Get blocks
+$block_handler =& xoops_gethandler('block');
+$block_handler->assignBlocks();
+
+$GLOBALS['xTheme']->checkCache();
+
+if (!isset($GLOBALS['xoopsOption']['template_main'])) {
+ // new themes using Smarty does not have old functions that are required in old modules, so include them now
+ include XOOPS_ROOT_PATH.'/include/old_theme_functions.php';
+ // need this also
+ $xoopsTheme['thename'] = $GLOBALS['xoopsConfig']['theme_set'];
+}
+$GLOBALS['xoopsLogger']->context = "module";
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/header.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/image.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/image.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/image.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,66 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+set_magic_quotes_runtime(0);
+if (function_exists('mb_http_output')) {
+ mb_http_output('pass');
+}
+$image_id = isset($_GET['id']) ? intval($_GET['id']) : 0;
+if (empty($image_id)) {
+ header('Content-type: image/gif');
+ readfile(XOOPS_UPLOAD_PATH.'/blank.gif');
+ exit();
+}
+$xoopsOption['nocommon'] = 1;
+include './mainfile.php';
+include XOOPS_ROOT_PATH.'/include/functions.php';
+include_once XOOPS_ROOT_PATH.'/class/logger.php';
+$xoopsLogger =& XoopsLogger::instance();
+$xoopsLogger->startTime();
+include_once XOOPS_ROOT_PATH.'/class/database/databasefactory.php';
+define('XOOPS_DB_PROXY', 1);
+$xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
+// ################# Include class manager file ##############
+require_once XOOPS_ROOT_PATH.'/kernel/object.php';
+require_once XOOPS_ROOT_PATH.'/class/criteria.php';
+$imagehandler =& xoops_gethandler('image');
+$criteria = new CriteriaCompo(new Criteria('i.image_display', 1));
+$criteria->add(new Criteria('i.image_id', $image_id));
+$image =& $imagehandler->getObjects($criteria, false, true);
+if (count($image) > 0) {
+ header('Content-type: '.$image[0]->getVar('image_mimetype'));
+ header('Cache-control: max-age=31536000');
+ header('Expires: '.gmdate("D, d M Y H:i:s",time()+31536000).'GMT');
+ header('Content-disposition: filename='.$image[0]->getVar('image_name'));
+ header('Content-Length: '.strlen($image[0]->getVar('image_body')));
+ header('Last-Modified: '.gmdate("D, d M Y H:i:s",$image[0]->getVar('image_created')).'GMT');
+ echo $image[0]->getVar('image_body');
+} else {
+ header('Content-type: image/gif');
+ readfile(XOOPS_ROOT_PATH.'/images/blank.gif');
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/image.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/imagemanager.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/imagemanager.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/imagemanager.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,266 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include './mainfile.php';
+if (!isset($_REQUEST['target'])) {
+ exit();
+}
+$target = $_REQUEST['target'];
+$op = 'list';
+if (isset($_GET['op']) && $_GET['op'] == 'upload') {
+ $op = 'upload';
+} elseif (isset($_POST['op']) && $_POST['op'] == 'doupload') {
+ $op = 'doupload';
+}
+
+$wysiwyg = empty($_REQUEST['wysiwyg'])?0:1;
+//echo "<br />wysiwyg:".$wysiwyg;
+if (!is_object($xoopsUser)) {
+ $group = array(XOOPS_GROUP_ANONYMOUS);
+} else {
+ $group =& $xoopsUser->getGroups();
+}
+if ($op == 'list') {
+ $xoopsTpl->assign('lang_imgmanager', _IMGMANAGER);
+ $target = htmlspecialchars($_GET['target'], ENT_QUOTES);
+ $xoopsTpl->assign('target', $target);
+ $imgcat_handler =& xoops_gethandler('imagecategory');
+ $catlist =& $imgcat_handler->getList($group, 'imgcat_read', 1);
+ $catcount = count($catlist);
+ $xoopsTpl->assign('lang_align', _ALIGN);
+ $xoopsTpl->assign('lang_add', _ADD);
+ $xoopsTpl->assign('lang_close', _CLOSE);
+ if ($catcount > 0) {
+ $xoopsTpl->assign('lang_go', _GO);
+ $catshow = !isset($_GET['cat_id']) ? 0 : intval($_GET['cat_id']);
+ $catshow = (!empty($catshow) && in_array($catshow, array_keys($catlist))) ? $catshow : 0;
+ $xoopsTpl->assign('show_cat', $catshow);
+ if ($catshow > 0) {
+ $xoopsTpl->assign('lang_addimage', _ADDIMAGE);
+ }
+ $catlist = array('0' => '--') + $catlist;
+ $cat_options = '';
+ foreach ($catlist as $c_id => $c_name) {
+ $sel = '';
+ if ($c_id == $catshow) {
+ $sel = ' selected="selected"';
+ }
+ $cat_options .= '<option value="'.$c_id.'"'.$sel.'>'.$c_name.'</option>';
+ }
+ $xoopsTpl->assign('cat_options', $cat_options);
+ if ($catshow > 0) {
+ $image_handler = xoops_gethandler('image');
+ $criteria = new CriteriaCompo(new Criteria('imgcat_id', $catshow));
+ $criteria->add(new Criteria('image_display', 1));
+ $total = $image_handler->getCount($criteria);
+ if ($total > 0) {
+ $imgcat_handler =& xoops_gethandler('imagecategory');
+ $imgcat =& $imgcat_handler->get($catshow);
+ $xoopsTpl->assign('image_total', $total);
+ $xoopsTpl->assign('lang_image', _IMAGE);
+ $xoopsTpl->assign('lang_imagename', _IMAGENAME);
+ $xoopsTpl->assign('lang_imagemime', _IMAGEMIME);
+ $start = isset($_GET['start']) ? intval($_GET['start']) : 0;
+ $criteria->setLimit(10);
+ $criteria->setStart($start);
+ $storetype = $imgcat->getVar('imgcat_storetype');
+ if ($storetype == 'db') {
+ $images =& $image_handler->getObjects($criteria, false, true);
+ } else {
+ $images =& $image_handler->getObjects($criteria, false, false);
+ }
+ $imgcount = count($images);
+ $max = ($imgcount > 10) ? 10 : $imgcount;
+
+ for ($i = 0; $i < $max; $i++) {
+ if ($storetype == 'db') {
+ if(!empty($wysiwyg)){
+ $lcode = "\\\"".XOOPS_URL.'/image.php?id='.$images[$i]->getVar('image_id')."\\\", \\\"".$images[$i]->getVar('image_nicename')."\\\",\\\"left\\\"";
+ $code = "\\\"".XOOPS_URL.'/image.php?id='.$images[$i]->getVar('image_id')."\\\", \\\"".$images[$i]->getVar('image_nicename')."\\\",\\\"center\\\"";
+ $rcode = "\\\"".XOOPS_URL.'/image.php?id='.$images[$i]->getVar('image_id')."\\\", \\\"".$images[$i]->getVar('image_nicename')."\\\",\\\"right\\\"";
+ }else{
+ $lcode = '[img align=left id='.$images[$i]->getVar('image_id').']'.$images[$i]->getVar('image_nicename').'[/img]';
+ $code = '[img id='.$images[$i]->getVar('image_id').']'.$images[$i]->getVar('image_nicename').'[/img]';
+ $rcode = '[img align=right id='.$images[$i]->getVar('image_id').']'.$images[$i]->getVar('image_nicename').'[/img]';
+ }
+ $src = XOOPS_URL."/image.php?id=".$images[$i]->getVar('image_id');
+ } else {
+ if(!empty($wysiwyg)){
+ $lcode = "\\\"".XOOPS_UPLOAD_URL.'/'.$images[$i]->getVar('image_name')."\\\", \\\"".$images[$i]->getVar('image_nicename')."\\\",\\\"left\\\"";
+ $code = "\\\"".XOOPS_UPLOAD_URL.'/'.$images[$i]->getVar('image_name')."\\\", \\\"".$images[$i]->getVar('image_nicename')."\\\",\\\"center\\\"";
+ $rcode = "\\\"".XOOPS_UPLOAD_URL.'/'.$images[$i]->getVar('image_name')."\\\", \\\"".$images[$i]->getVar('image_nicename')."\\\",\\\"right\\\"";
+ }else{
+ $lcode = '[img align=left]'.XOOPS_UPLOAD_URL.'/'.$images[$i]->getVar('image_name').'[/img]';
+ $code = '[img]'.XOOPS_UPLOAD_URL.'/'.$images[$i]->getVar('image_name').'[/img]';
+ $rcode = '[img align=right]'.XOOPS_UPLOAD_URL.'/'.$images[$i]->getVar('image_name').'[/img]';
+ }
+ $src = XOOPS_UPLOAD_URL.'/'.$images[$i]->getVar('image_name');
+ }
+ $xoopsTpl->append('images', array('id' => $images[$i]->getVar('image_id'), 'nicename' => $images[$i]->getVar('image_nicename'), 'mimetype' => $images[$i]->getVar('image_mimetype'), 'src' => $src, 'lxcode' => $lcode, 'xcode' => $code, 'rxcode' => $rcode));
+ }
+ if ($total > 10) {
+ include_once XOOPS_ROOT_PATH.'/class/pagenav.php';
+ $nav = new XoopsPageNav($total, 10, $start, 'start', 'target='.$target.'&cat_id='.$catshow);
+ $xoopsTpl->assign('pagenav', $nav->renderNav());
+ }
+ } else {
+ $xoopsTpl->assign('image_total', 0);
+ }
+ }
+ $xoopsTpl->assign('xsize', 600);
+ $xoopsTpl->assign('ysize', 400);
+ } else {
+ $xoopsTpl->assign('xsize', 400);
+ $xoopsTpl->assign('ysize', 180);
+ }
+ $xoopsTpl->assign('wysiwyg', $wysiwyg);
+
+ $xoopsTpl->display('db:system_imagemanager.html');
+ exit();
+}
+
+if ($op == 'upload') {
+ $imgcat_handler =& xoops_gethandler('imagecategory');
+ $imgcat_id = intval($_GET['imgcat_id']);
+ $imgcat =& $imgcat_handler->get($imgcat_id);
+ $error = false;
+ if (!is_object($imgcat)) {
+ $error = true;
+ } else {
+ $imgcatperm_handler =& xoops_gethandler('groupperm');
+ if (is_object($xoopsUser)) {
+ if (!$imgcatperm_handler->checkRight('imgcat_write', $imgcat_id, $xoopsUser->getGroups())) {
+ $error = true;
+ }
+ } else {
+ if (!$imgcatperm_handler->checkRight('imgcat_write', $imgcat_id, XOOPS_GROUP_ANONYMOUS)) {
+ $error = true;
+ }
+ }
+ }
+ if ($error != false) {
+ xoops_header(false);
+ echo '</head><body><div style="text-align:center;"><input value="'._BACK.'" type="button" onclick="javascript:history.go(-1);" /></div>';
+ xoops_footer();
+ exit();
+ }
+ $xoopsTpl->assign('show_cat', $imgcat_id);
+ $xoopsTpl->assign('lang_imgmanager', _IMGMANAGER);
+ $xoopsTpl->assign('target', htmlspecialchars($_GET['target'], ENT_QUOTES));
+ include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+ $form = new XoopsThemeForm('', 'image_form', 'imagemanager.php', 'post', true);
+ $form->setExtra('enctype="multipart/form-data"');
+ $form->addElement(new XoopsFormText(_IMAGENAME, 'image_nicename', 20, 255), true);
+ $form->addElement(new XoopsFormLabel(_IMAGECAT, $imgcat->getVar('imgcat_name')));
+ $form->addElement(new XoopsFormFile(_IMAGEFILE, 'image_file', $imgcat->getVar('imgcat_maxsize')), true);
+ $form->addElement(new XoopsFormLabel(_IMGMAXSIZE, $imgcat->getVar('imgcat_maxsize')));
+ $form->addElement(new XoopsFormLabel(_IMGMAXWIDTH, $imgcat->getVar('imgcat_maxwidth')));
+ $form->addElement(new XoopsFormLabel(_IMGMAXHEIGHT, $imgcat->getVar('imgcat_maxheight')));
+ $form->addElement(new XoopsFormHidden('imgcat_id', $imgcat_id));
+ $form->addElement(new XoopsFormHidden('op', 'doupload'));
+ $form->addElement(new XoopsFormHidden('target', $target));
+ $form->addElement(new XoopsFormButton('', 'img_button', _SUBMIT, 'submit'));
+ $form->assign($xoopsTpl);
+ $xoopsTpl->assign('lang_close', _CLOSE);
+ $xoopsTpl->display('db:system_imagemanager2.html');
+ exit();
+}
+
+if ($op == 'doupload') {
+ if ($GLOBALS['xoopsSecurity']->check()) {
+ $image_nicename = isset($_POST['image_nicename']) ? $_POST['image_nicename'] : '';
+ $xoops_upload_file = isset($_POST['xoops_upload_file']) ? $_POST['xoops_upload_file'] : array();
+ $imgcat_id = isset($_POST['imgcat_id']) ? intval($_POST['imgcat_id']) : 0;
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ $imgcat_handler =& xoops_gethandler('imagecategory');
+ $imgcat =& $imgcat_handler->get($imgcat_id);
+ $error = false;
+ if (!is_object($imgcat)) {
+ $error = true;
+ } else {
+ $imgcatperm_handler =& xoops_gethandler('groupperm');
+ if (is_object($xoopsUser)) {
+ if (!$imgcatperm_handler->checkRight('imgcat_write', $imgcat_id, $xoopsUser->getGroups())) {
+ $error = true;
+ }
+ } else {
+ if (!$imgcatperm_handler->checkRight('imgcat_write', $imgcat_id, XOOPS_GROUP_ANONYMOUS)) {
+ $error = true;
+ }
+ }
+ }
+ }
+ else {
+ $error = true;
+ }
+ if ($error != false) {
+ xoops_header(false);
+ echo '</head><body><div style="text-align:center;">'.implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()).'<br /><input value="'._BACK.'" type="button" onclick="javascript:history.go(-1);" /></div>';
+ xoops_footer();
+ exit();
+ }
+ $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'), $imgcat->getVar('imgcat_maxsize'), $imgcat->getVar('imgcat_maxwidth'), $imgcat->getVar('imgcat_maxheight'));
+ $uploader->setPrefix('img');
+ if ($uploader->fetchMedia($xoops_upload_file[0])) {
+ if (!$uploader->upload()) {
+ $err = $uploader->getErrors();
+ } else {
+ $image_handler =& xoops_gethandler('image');
+ $image =& $image_handler->create();
+ $image->setVar('image_name', $uploader->getSavedFileName());
+ $image->setVar('image_nicename', $image_nicename);
+ $image->setVar('image_mimetype', $uploader->getMediaType());
+ $image->setVar('image_created', time());
+ $image->setVar('image_display', 1);
+ $image->setVar('image_weight', 0);
+ $image->setVar('imgcat_id', $imgcat_id);
+ if ($imgcat->getVar('imgcat_storetype') == 'db') {
+ $fp = @fopen($uploader->getSavedDestination(), 'rb');
+ $fbinary = @fread($fp, filesize($uploader->getSavedDestination()));
+ @fclose($fp);
+ $image->setVar('image_body', addslashes($fbinary));
+ @unlink($uploader->getSavedDestination());
+ }
+ if (!$image_handler->insert($image)) {
+ $err = sprintf(_FAILSAVEIMG, $image->getVar('image_nicename'));
+ }
+ }
+ } else {
+ $err = sprintf(_FAILFETCHIMG, 0);
+ $err .= '<br />'.implode('<br />', $uploader->getErrors(false));
+ }
+ if (isset($err)) {
+ xoops_header(false);
+ xoops_error($err);
+ echo '</head><body><div style="text-align:center;"><input value="'._BACK.'" type="button" onclick="javascript:history.go(-1);" /></div>';
+ xoops_footer();
+ exit();
+ }
+ header('location: imagemanager.php?cat_id='.$imgcat_id.'&target='.$target);
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/imagemanager.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/aligncenter.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/aligncenter.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/alignleft.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/alignleft.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/alignright.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/alignright.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/await.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/await.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/banners/banner.swf
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/banners/banner.swf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/banners/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/images/banners/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/images/banners/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/banners/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/banners/xoops_banner.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/banners/xoops_banner.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/banners/xoops_banner_2.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/banners/xoops_banner_2.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/blank.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/blank.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/bold.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/bold.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/code.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/code.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/download.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/download.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/email.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/email.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/aim.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/aim.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/delete.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/delete.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/edit.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/edit.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/em_small.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/em_small.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/email.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/email.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/icq_add.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/icq_add.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/index.html
===================================================================
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/ip.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/ip.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/msnm.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/msnm.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/no_posticon.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/no_posticon.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/pm_small.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/pm_small.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/posticon.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/posticon.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/posticon2.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/posticon2.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/profile.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/profile.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/reply.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/reply.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/www.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/www.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/yim.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/icons/yim.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/image.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/image.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/imgsrc.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/imgsrc.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/images/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/images/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/italic.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/italic.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/linethrough.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/linethrough.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/logo.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/logo.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/pagact.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/pagact.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/paginact.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/paginact.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/pagneutral.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/pagneutral.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/pointer.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/pointer.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/poweredby.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/poweredby.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/quote.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/quote.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/s_poweredby.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/s_poweredby.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon1.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon1.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon2.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon2.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon3.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon3.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon4.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon4.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon5.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon5.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon6.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon6.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon7.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/subject/icon7.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/subject/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/images/subject/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/images/subject/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/subject/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/underline.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/underline.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/images/url.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/images/url.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/checklogin.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/checklogin.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/checklogin.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,117 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/user.php';
+$uname = !isset($_POST['uname']) ? '' : trim($_POST['uname']);
+$pass = !isset($_POST['pass']) ? '' : trim($_POST['pass']);
+if ($uname == '' || $pass == '') {
+ redirect_header(XOOPS_URL.'/user.php', 1, _US_INCORRECTLOGIN);
+ exit();
+}
+$member_handler =& xoops_gethandler('member');
+$myts =& MyTextsanitizer::getInstance();
+
+// Place here the Auth class calls
+//**** BEGIN AUTH ****
+require_once XOOPS_ROOT_PATH.'/class/auth/authfactory.php';
+$xoopsAuth =& XoopsAuthFactory::getAuthConnection();
+$auth = $xoopsAuth->authenticate($myts->addSlashes($uname), $myts->addSlashes($pass));
+if (!$auth) {
+ redirect_header(XOOPS_URL . '/user.php', 5, _US_INCORRECTLOGIN. $xoopsAuth->getHtmlErrors());
+ exit();
+}
+//**** END AUTH ****
+
+$user =& $member_handler->loginUser($myts->addSlashes($uname), $myts->addslashes($pass));
+if (false != $user) {
+ if (0 >= $user->getVar('level')) {
+ redirect_header(XOOPS_URL.'/index.php', 5, _US_NOACTTPADM);
+ exit();
+ }
+ if ($xoopsConfig['closesite'] == 1) {
+ $allowed = false;
+ foreach ($user->getGroups() as $group) {
+ if (in_array($group, $xoopsConfig['closesite_okgrp']) || XOOPS_GROUP_ADMIN == $group) {
+ $allowed = true;
+ break;
+ }
+ }
+ if (!$allowed) {
+ redirect_header(XOOPS_URL.'/index.php', 1, _NOPERM);
+ exit();
+ }
+ }
+ $_SESSION = array();
+ $_SESSION['xoopsUserId'] = $user->getVar('uid');
+ $_SESSION['xoopsUserGroups'] = $user->getGroups();
+ if ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
+ setcookie($xoopsConfig['session_name'], session_id(), time()+(60 * $xoopsConfig['session_expire']), '/', '', 0);
+ }
+ $_SESSION['xoopsUserLastLogin'] = $user->getVar('last_login');
+ if (!$member_handler->updateUserByField($user, 'last_login', time())) {
+ }
+ $user_theme = $user->getVar('theme');
+ if (in_array($user_theme, $xoopsConfig['theme_set_allowed'])) {
+ $_SESSION['xoopsUserTheme'] = $user_theme;
+ }
+ if (!empty($_POST['xoops_redirect']) && !strpos($_POST['xoops_redirect'], 'register')) {
+// if (!preg_match("/^http[s]*:\/\//i", $_POST['xoops_redirect'])) {
+// $url = XOOPS_URL.trim($_POST['xoops_redirect']);
+// }
+// else {
+ $url = $_POST['xoops_redirect'];
+// }
+ /*$parsed = parse_url(XOOPS_URL);
+ $url = isset($parsed['scheme']) ? $parsed['scheme'].'://' : 'http://';
+ if (isset($parsed['host'])) {
+ $url .= isset($parsed['port']) ?$parsed['host'].':'.$parsed['port'].trim($_POST['xoops_redirect']): $parsed['host'].trim($_POST['xoops_redirect']);
+ } else {
+ $url .= xoops_getenv('HTTP_HOST').trim($_POST['xoops_redirect']);
+ }*/
+ } else {
+ $url = XOOPS_URL.'/index.php';
+ }
+
+ // RMV-NOTIFY
+ // Perform some maintenance of notification records
+ $notification_handler =& xoops_gethandler('notification');
+ $notification_handler->doLoginMaintenance($user->getVar('uid'));
+
+ redirect_header($url, 1, sprintf(_US_LOGGINGU, $user->getVar('uname')));
+} else {
+
+ redirect_header(XOOPS_URL.'/user.php',1,_US_INCORRECTLOGIN);
+}
+exit();
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/checklogin.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/comment_constants.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/comment_constants.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/comment_constants.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,42 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+
+define('XOOPS_COMMENT_APPROVENONE', 0);
+define('XOOPS_COMMENT_APPROVEALL', 1);
+define('XOOPS_COMMENT_APPROVEUSER', 2);
+define('XOOPS_COMMENT_APPROVEADMIN', 3);
+define('XOOPS_COMMENT_PENDING', 1);
+define('XOOPS_COMMENT_ACTIVE', 2);
+define('XOOPS_COMMENT_HIDDEN', 3);
+define('XOOPS_COMMENT_OLD1ST', 0);
+define('XOOPS_COMMENT_NEW1ST', 1);
+include_once XOOPS_ROOT_PATH.'/modules/system/constants.php';
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/comment_constants.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/comment_delete.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/comment_delete.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/comment_delete.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,283 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH') || !is_object($xoopsModule)) {
+ exit();
+}
+include_once XOOPS_ROOT_PATH.'/include/comment_constants.php';
+$op = 'delete';
+if (!empty($_POST)) {
+ extract($_POST);
+ $com_mode = isset($com_mode) ? htmlspecialchars(trim($com_mode), ENT_QUOTES) : 'flat';
+ $com_order = isset($com_order) ? intval($com_order) : XOOPS_COMMENT_OLD1ST;
+ $com_id = isset($com_id) ? intval($com_id) : 0;
+} else {
+ $com_mode = isset($_GET['com_mode']) ? htmlspecialchars(trim($_GET['com_mode']), ENT_QUOTES) : 'flat';
+ $com_order = isset($_GET['com_order']) ? intval($_GET['com_order']) : XOOPS_COMMENT_OLD1ST;
+ $com_id = isset($_GET['com_id']) ? intval($_GET['com_id']) : 0;
+
+}
+
+if ('system' == $xoopsModule->getVar('dirname')) {
+ $comment_handler =& xoops_gethandler('comment');
+ $comment =& $comment_handler->get($com_id);
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->get($comment->getVar('com_modid'));
+ $comment_config = $module->getInfo('comments');
+ $com_modid = $module->getVar('mid');
+ $redirect_page = XOOPS_URL.'/modules/system/admin.php?fct=comments&com_modid='.$com_modid.'&com_itemid';
+ $moddir = $module->getVar('dirname');
+ unset($comment);
+} else {
+ if (XOOPS_COMMENT_APPROVENONE == $xoopsModuleConfig['com_rule']) {
+ exit();
+ }
+ $comment_config = $xoopsModule->getInfo('comments');
+ $com_modid = $xoopsModule->getVar('mid');
+ $redirect_page = $comment_config['pageName'].'?';
+ $comment_confirm_extra = array();
+ if (isset($comment_config['extraParams']) && is_array($comment_config['extraParams'])) {
+ foreach ($comment_config['extraParams'] as $extra_param) {
+ if (isset(${$extra_param})) {
+ $redirect_page .= $extra_param.'='.${$extra_param}.'&';
+
+ // for the confirmation page
+ $comment_confirm_extra [$extra_param] = ${$extra_param};
+ } elseif (isset($_GET[$extra_param])) {
+ $redirect_page .= $extra_param.'='.$_GET[$extra_param].'&';
+
+ // for the confirmation page
+ $comment_confirm_extra [$extra_param] = $_GET[$extra_param];
+ }
+ }
+ }
+ $redirect_page .= $comment_config['itemName'];
+ $moddir = $xoopsModule->getVar('dirname');
+}
+
+$accesserror = false;
+if (!is_object($xoopsUser)) {
+ $accesserror = true;
+} else {
+ if (!$xoopsUser->isAdmin($com_modid)) {
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_COMMENT, $xoopsUser->getGroups())) {
+ $accesserror = true;
+ }
+ }
+}
+
+if (false != $accesserror) {
+ $ref = xoops_getenv('HTTP_REFERER');
+ if ($ref != '') {
+ redirect_header($ref, 2, _NOPERM);
+ } else {
+ redirect_header($redirect_page.'?'.$comment_config['itemName'].'='.intval($com_itemid), 2, _NOPERM);
+ }
+ exit();
+}
+
+include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
+
+switch ($op) {
+case 'delete_one':
+ $comment_handler = xoops_gethandler('comment');
+ $comment =& $comment_handler->get($com_id);
+ if (!$comment_handler->delete($comment)) {
+ include XOOPS_ROOT_PATH.'/header.php';
+ xoops_error(_CM_COMDELETENG.' (ID: '.$comment->getVar('com_id').')');
+ include XOOPS_ROOT_PATH.'/footer.php';
+ exit();
+ }
+
+ $com_itemid = $comment->getVar('com_itemid');
+
+ // execute updateStat callback function if set
+ if (isset($comment_config['callback']['update']) && trim($comment_config['callback']['update']) != '') {
+ $skip = false;
+ if (!function_exists($comment_config['callback']['update'])) {
+ if (isset($comment_config['callbackFile'])) {
+ $callbackfile = trim($comment_config['callbackFile']);
+ if ($callbackfile != '' && file_exists(XOOPS_ROOT_PATH.'/modules/'.$moddir.'/'.$callbackfile)) {
+ include_once XOOPS_ROOT_PATH.'/modules/'.$moddir.'/'.$callbackfile;
+ }
+ if (!function_exists($comment_config['callback']['update'])) {
+ $skip = true;
+ }
+ } else {
+ $skip = true;
+ }
+ }
+ if (!$skip) {
+ $criteria = new CriteriaCompo(new Criteria('com_modid', $com_modid));
+ $criteria->add(new Criteria('com_itemid', $com_itemid));
+ $criteria->add(new Criteria('com_status', XOOPS_COMMENT_ACTIVE));
+ $comment_count = $comment_handler->getCount($criteria);
+ $comment_config['callback']['update']($com_itemid, $comment_count);
+ }
+ }
+
+ // update user posts if its not an anonymous post
+ if ($comment->getVar('com_uid') != 0) {
+ $member_handler =& xoops_gethandler('member');
+ $com_poster =& $member_handler->getUser($comment->getVar('com_uid'));
+ if (is_object($com_poster)) {
+ $member_handler->updateUserByField($com_poster, 'posts', $com_poster->getVar('posts') - 1);
+ }
+ }
+
+ // get all comments posted later within the same thread
+ $thread_comments =& $comment_handler->getThread($comment->getVar('com_rootid'), $com_id);
+
+ include_once XOOPS_ROOT_PATH.'/class/tree.php';
+ $xot = new XoopsObjectTree($thread_comments, 'com_id', 'com_pid', 'com_rootid');
+
+ $child_comments =& $xot->getFirstChild($com_id);
+
+ // now set new parent ID for direct child comments
+ $new_pid = $comment->getVar('com_pid');
+ $errs = array();
+ foreach (array_keys($child_comments) as $i) {
+ $child_comments[$i]->setVar('com_pid', $new_pid);
+ // if the deleted comment is a root comment, need to change root id to own id
+ if (false != $comment->isRoot()) {
+ $new_rootid = $child_comments[$i]->getVar('com_id');
+ $child_comments[$i]->setVar('com_rootid', $child_comments[$i]->getVar('com_id'));
+ if (!$comment_handler->insert($child_comments[$i])) {
+ $errs[] = 'Could not change comment parent ID from <b>'.$com_id.'</b> to <b>'.$new_pid.'</b>. (ID: '.$new_rootid.')';
+ } else {
+ // need to change root id for all its child comments as well
+ $c_child_comments =& $xot->getAllChild($new_rootid);
+ $cc_count = count($c_child_comments);
+ foreach (array_keys($c_child_comments) as $j) {
+ $c_child_comments[$j]->setVar('com_rootid', $new_rootid);
+ if (!$comment_handler->insert($c_child_comments[$j])) {
+ $errs[] = 'Could not change comment root ID from <b>'.$com_id.'</b> to <b>'.$new_rootid.'</b>.';
+ }
+ }
+ }
+ } else {
+ if (!$comment_handler->insert($child_comments[$i])) {
+ $errs[] = 'Could not change comment parent ID from <b>'.$com_id.'</b> to <b>'.$new_pid.'</b>.';
+ }
+ }
+ }
+ if (count($errs) > 0) {
+ include XOOPS_ROOT_PATH.'/header.php';
+ xoops_error($errs);
+ include XOOPS_ROOT_PATH.'/footer.php';
+ exit();
+ }
+ redirect_header($redirect_page.'='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode, 1, _CM_COMDELETED);
+ break;
+
+case 'delete_all':
+ $comment_handler = xoops_gethandler('comment');
+ $comment =& $comment_handler->get($com_id);
+ $com_rootid = $comment->getVar('com_rootid');
+
+ // get all comments posted later within the same thread
+ $thread_comments =& $comment_handler->getThread($com_rootid, $com_id);
+
+ // construct a comment tree
+ include_once XOOPS_ROOT_PATH.'/class/tree.php';
+ $xot = new XoopsObjectTree($thread_comments, 'com_id', 'com_pid', 'com_rootid');
+ $child_comments =& $xot->getAllChild($com_id);
+ // add itself here
+ $child_comments[$com_id] =& $comment;
+ $msgs = array();
+ $deleted_num = array();
+ $member_handler =& xoops_gethandler('member');
+ foreach (array_keys($child_comments) as $i) {
+ if (!$comment_handler->delete($child_comments[$i])) {
+ $msgs[] = _CM_COMDELETENG.' (ID: '.$child_comments[$i]->getVar('com_id').')';
+ } else {
+ $msgs[] = _CM_COMDELETED.' (ID: '.$child_comments[$i]->getVar('com_id').')';
+ // store poster ID and deleted post number into array for later use
+ $poster_id = $child_comments[$i]->getVar('com_uid');
+ if ($poster_id > 0) {
+ $deleted_num[$poster_id] = !isset($deleted_num[$poster_id]) ? 1 : ($deleted_num[$poster_id] + 1);
+ }
+ }
+ }
+ foreach ($deleted_num as $user_id => $post_num) {
+ // update user posts
+ $com_poster = $member_handler->getUser($user_id);
+ if (is_object($com_poster)) {
+ $member_handler->updateUserByField($com_poster, 'posts', $com_poster->getVar('posts') - $post_num);
+ }
+ }
+
+ $com_itemid = $comment->getVar('com_itemid');
+
+ // execute updateStat callback function if set
+ if (isset($comment_config['callback']['update']) && trim($comment_config['callback']['update']) != '') {
+ $skip = false;
+ if (!function_exists($comment_config['callback']['update'])) {
+ if (isset($comment_config['callbackFile'])) {
+ $callbackfile = trim($comment_config['callbackFile']);
+ if ($callbackfile != '' && file_exists(XOOPS_ROOT_PATH.'/modules/'.$moddir.'/'.$callbackfile)) {
+ include_once XOOPS_ROOT_PATH.'/modules/'.$moddir.'/'.$callbackfile;
+ }
+ if (!function_exists($comment_config['callback']['update'])) {
+ $skip = true;
+ }
+ } else {
+ $skip = true;
+ }
+ }
+ if (!$skip) {
+ $criteria = new CriteriaCompo(new Criteria('com_modid', $com_modid));
+ $criteria->add(new Criteria('com_itemid', $com_itemid));
+ $criteria->add(new Criteria('com_status', XOOPS_COMMENT_ACTIVE));
+ $comment_count = $comment_handler->getCount($criteria);
+ $comment_config['callback']['update']($com_itemid, $comment_count);
+ }
+ }
+
+ include XOOPS_ROOT_PATH.'/header.php';
+ xoops_result($msgs);
+ echo '<br /><a href="'.$redirect_page.'='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode.'">'._BACK.'</a>';
+ include XOOPS_ROOT_PATH.'/footer.php';
+ break;
+
+case 'delete':
+default:
+ include XOOPS_ROOT_PATH.'/header.php';
+ $comment_confirm = array('com_id' => $com_id, 'com_mode' => $com_mode, 'com_order' => $com_order, 'op' => array(_CM_DELETEONE => 'delete_one', _CM_DELETEALL => 'delete_all'));
+ if (!empty($comment_confirm_extra) && is_array($comment_confirm_extra)) {
+ $comment_confirm = $comment_confirm + $comment_confirm_extra;
+ }
+ xoops_confirm($comment_confirm, 'comment_delete.php', _CM_DELETESELECT);
+ include XOOPS_ROOT_PATH.'/footer.php';
+ break;
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/comment_delete.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/comment_edit.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/comment_edit.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/comment_edit.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,81 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH') || !is_object($xoopsModule)) {
+ exit();
+}
+include_once(XOOPS_ROOT_PATH."/include/comment_constants.php");
+if ('system' != $xoopsModule->getVar('dirname') && XOOPS_COMMENT_APPROVENONE == $xoopsModuleConfig['com_rule']) {
+ exit();
+}
+
+include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
+$com_id = isset($_GET['com_id']) ? intval($_GET['com_id']) : 0;
+$com_mode = isset($_GET['com_mode']) ? htmlspecialchars(trim($_GET['com_mode']), ENT_QUOTES) : '';
+if ($com_mode == '') {
+ if (is_object($xoopsUser)) {
+ $com_mode = $xoopsUser->getVar('umode');
+ } else {
+ $com_mode = $xoopsConfig['com_mode'];
+ }
+}
+if (!isset($_GET['com_order'])) {
+ if (is_object($xoopsUser)) {
+ $com_order = $xoopsUser->getVar('uorder');
+ } else {
+ $com_order = $xoopsConfig['com_order'];
+ }
+} else {
+ $com_order = intval($_GET['com_order']);
+}
+$comment_handler =& xoops_gethandler('comment');
+$comment =& $comment_handler->get($com_id);
+$dohtml = $comment->getVar('dohtml');
+$dosmiley = $comment->getVar('dosmiley');
+$dobr = $comment->getVar('dobr');
+$doxcode = $comment->getVar('doxcode');
+$com_icon = $comment->getVar('com_icon');
+$com_itemid = $comment->getVar('com_itemid');
+$com_title = $comment->getVar('com_title', 'E');
+$com_text = $comment->getVar('com_text', 'E');
+$com_pid = $comment->getVar('com_pid');
+$com_status = $comment->getVar('com_status');
+$com_rootid = $comment->getVar('com_rootid');
+if ($xoopsModule->getVar('dirname') != 'system') {
+ include XOOPS_ROOT_PATH.'/header.php';
+ include XOOPS_ROOT_PATH.'/include/comment_form.php';
+ include XOOPS_ROOT_PATH.'/footer.php';
+} else {
+ xoops_cp_header();
+ include XOOPS_ROOT_PATH.'/include/comment_form.php';
+ xoops_cp_footer();
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/comment_edit.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/comment_form.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/comment_form.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/comment_form.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,125 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH') || !is_object($xoopsModule)) {
+ exit();
+}
+$com_modid = $xoopsModule->getVar('mid');
+include_once XOOPS_ROOT_PATH."/class/xoopslists.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+$cform = new XoopsThemeForm(_CM_POSTCOMMENT, "commentform", 'comment_post.php', 'post', true);
+if (isset($xoopsModuleConfig['com_rule'])) {
+ include_once XOOPS_ROOT_PATH.'/include/comment_constants.php';
+ switch ($xoopsModuleConfig['com_rule']) {
+ case XOOPS_COMMENT_APPROVEALL:
+ $rule_text = _CM_COMAPPROVEALL;
+ break;
+ case XOOPS_COMMENT_APPROVEUSER:
+ $rule_text = _CM_COMAPPROVEUSER;
+ break;
+ case XOOPS_COMMENT_APPROVEADMIN:
+ default:
+ $rule_text = _CM_COMAPPROVEADMIN;
+ break;
+ }
+ $cform->addElement(new XoopsFormLabel(_CM_COMRULES, $rule_text));
+}
+
+$cform->addElement(new XoopsFormText(_CM_TITLE, 'com_title', 50, 255, $com_title), true);
+$icons_radio = new XoopsFormRadio(_MESSAGEICON, 'com_icon', $com_icon);
+$subject_icons = XoopsLists::getSubjectsList();
+foreach ($subject_icons as $iconfile) {
+ $icons_radio->addOption($iconfile, '<img src="'.XOOPS_URL.'/images/subject/'.$iconfile.'" alt="" />');
+}
+$cform->addElement($icons_radio);
+$cform->addElement(new XoopsFormDhtmlTextArea(_CM_MESSAGE, 'com_text', $com_text, 10, 50), true);
+$option_tray = new XoopsFormElementTray(_OPTIONS,'<br />');
+
+$button_tray = new XoopsFormElementTray('' ,' ');
+
+
+if (is_object($xoopsUser)) {
+ if ($xoopsModuleConfig['com_anonpost'] == 1) {
+ $noname = !empty($noname) ? 1 : 0;
+ $noname_checkbox = new XoopsFormCheckBox('', 'noname', $noname);
+ $noname_checkbox->addOption(1, _POSTANON);
+ $option_tray->addElement($noname_checkbox);
+ }
+ if (false != $xoopsUser->isAdmin($com_modid)) {
+ // show status change box when editing (comment id is not empty)
+ if (!empty($com_id)) {
+ include_once XOOPS_ROOT_PATH.'/include/comment_constants.php';
+ $status_select = new XoopsFormSelect(_CM_STATUS, 'com_status', $com_status);
+ $status_select->addOptionArray(array(XOOPS_COMMENT_PENDING => _CM_PENDING, XOOPS_COMMENT_ACTIVE => _CM_ACTIVE, XOOPS_COMMENT_HIDDEN => _CM_HIDDEN));
+ $cform->addElement($status_select);
+ }
+ $html_checkbox = new XoopsFormCheckBox('', 'dohtml', $dohtml);
+ $html_checkbox->addOption(1, _CM_DOHTML);
+ $option_tray->addElement($html_checkbox);
+ $button_tray->addElement(new XoopsFormButton('', 'com_dodelete', _DELETE, 'submit'));
+ }
+}
+$smiley_checkbox = new XoopsFormCheckBox('', 'dosmiley', $dosmiley);
+$smiley_checkbox->addOption(1, _CM_DOSMILEY);
+$option_tray->addElement($smiley_checkbox);
+$xcode_checkbox = new XoopsFormCheckBox('', 'doxcode', $doxcode);
+$xcode_checkbox->addOption(1, _CM_DOXCODE);
+$option_tray->addElement($xcode_checkbox);
+$br_checkbox = new XoopsFormCheckBox('', 'dobr', $dobr);
+$br_checkbox->addOption(1, _CM_DOAUTOWRAP);
+$option_tray->addElement($br_checkbox);
+
+$cform->addElement($option_tray);
+$cform->addElement(new XoopsFormHidden('com_pid', intval($com_pid)));
+$cform->addElement(new XoopsFormHidden('com_rootid', intval($com_rootid)));
+$cform->addElement(new XoopsFormHidden('com_id', $com_id));
+$cform->addElement(new XoopsFormHidden('com_itemid', $com_itemid));
+$cform->addElement(new XoopsFormHidden('com_order', $com_order));
+$cform->addElement(new XoopsFormHidden('com_mode', $com_mode));
+
+// add module specific extra params
+
+if ('system' != $xoopsModule->getVar('dirname')) {
+ $comment_config = $xoopsModule->getInfo('comments');
+ if (isset($comment_config['extraParams']) && is_array($comment_config['extraParams'])) {
+ $myts =& MyTextSanitizer::getInstance();
+ foreach ($comment_config['extraParams'] as $extra_param) {
+ // This routine is included from forms accessed via both GET and POST
+ if (isset($_REQUEST[$extra_param])) {
+ $hidden_value = htmlspecialchars($_REQUEST[$extra_param]);
+ } else {
+ $hidden_value = '';
+ }
+ $cform->addElement(new XoopsFormHidden($extra_param, $hidden_value));
+ }
+ }
+}
+$button_tray->addElement(new XoopsFormButton('', 'com_dopreview', _PREVIEW, 'submit'));
+$button_tray->addElement(new XoopsFormButton('', 'com_dopost', _CM_POSTCOMMENT, 'submit'));
+$cform->addElement($button_tray);
+$cform->display();
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/comment_form.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/comment_new.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/comment_new.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/comment_new.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,90 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH') || !is_object($xoopsModule)) {
+ exit();
+}
+
+include_once XOOPS_ROOT_PATH.'/include/comment_constants.php';
+if ('system' != $xoopsModule->getVar('dirname') && XOOPS_COMMENT_APPROVENONE == $xoopsModuleConfig['com_rule']) {
+ exit();
+}
+
+include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
+$com_itemid = isset($_GET['com_itemid']) ? intval($_GET['com_itemid']) : 0;
+
+if ($com_itemid > 0) {
+ include XOOPS_ROOT_PATH.'/header.php';
+ if (isset($com_replytitle)) {
+ if (isset($com_replytext)) {
+ themecenterposts($com_replytitle, $com_replytext);
+ }
+ $myts =& MyTextSanitizer::getInstance();
+ $com_title = $myts->htmlSpecialChars($com_replytitle);
+ if (!preg_match("/^re:/i", $com_title)) {
+ $com_title = "Re: ".xoops_substr($com_title, 0, 56);
+ }
+ } else {
+ $com_title = '';
+ }
+ $com_mode = isset($_GET['com_mode']) ? htmlspecialchars(trim($_GET['com_mode']), ENT_QUOTES) : '';
+ if ($com_mode == '') {
+ if (is_object($xoopsUser)) {
+ $com_mode = $xoopsUser->getVar('umode');
+ } else {
+ $com_mode = $xoopsConfig['com_mode'];
+ }
+ }
+
+ if (!isset($_GET['com_order'])) {
+ if (is_object($xoopsUser)) {
+ $com_order = $xoopsUser->getVar('uorder');
+ } else {
+ $com_order = $xoopsConfig['com_order'];
+ }
+ } else {
+ $com_order = intval($_GET['com_order']);
+ }
+ $com_id = 0;
+ $noname = 0;
+ $dosmiley = 1;
+ $dohtml = 0;
+ $dobr = 1;
+ $doxcode = 1;
+ $com_icon = '';
+ $com_pid = 0;
+ $com_rootid = 0;
+ $com_text = '';
+
+ include XOOPS_ROOT_PATH.'/include/comment_form.php';
+ include XOOPS_ROOT_PATH.'/footer.php';
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/comment_new.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/comment_post.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/comment_post.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/comment_post.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,408 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH') || !is_object($xoopsModule)) {
+ exit();
+}
+include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
+include_once XOOPS_ROOT_PATH.'/include/comment_constants.php';
+if ('system' == $xoopsModule->getVar('dirname')) {
+ $com_id = isset($_POST['com_id']) ? intval($_POST['com_id']) : 0;
+ if (empty($com_id)) {
+ exit();
+ }
+ $comment_handler =& xoops_gethandler('comment');
+ $comment =& $comment_handler->get($com_id);
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->get($comment->getVar('com_modid'));
+ $comment_config = $module->getInfo('comments');
+ $com_modid = $module->getVar('mid');
+ $redirect_page = XOOPS_URL.'/modules/system/admin.php?fct=comments&com_modid='.$com_modid.'&com_itemid';
+ $moddir = $module->getVar('dirname');
+ unset($comment);
+} else {
+ if (XOOPS_COMMENT_APPROVENONE == $xoopsModuleConfig['com_rule']) {
+ exit();
+ }
+ $comment_config = $xoopsModule->getInfo('comments');
+ $com_modid = $xoopsModule->getVar('mid');
+ $redirect_page = $comment_config['pageName'].'?';
+ if (isset($comment_config['extraParams']) && is_array($comment_config['extraParams'])) {
+ $extra_params = '';
+ foreach ($comment_config['extraParams'] as $extra_param) {
+ $extra_params .= isset($_POST[$extra_param]) ? $extra_param.'='.$_POST[$extra_param].'&' : $extra_param.'=&';
+ }
+ $redirect_page .= $extra_params;
+ }
+ $redirect_page .= $comment_config['itemName'];
+ $comment_url = $redirect_page;
+ $moddir = $xoopsModule->getVar('dirname');
+}
+$op = '';
+if (!empty($_POST)) {
+ foreach ($_POST as $k => $v) {
+ ${$k} = $v;
+ }
+
+ if (isset($com_dopost)) {
+ $op = 'post';
+ } elseif (isset($com_dopreview)) {
+ $op = 'preview';
+ }
+ if (isset($com_dodelete)) {
+ $op = 'delete';
+ }
+
+ if ($op == 'preview' || $op == 'post') {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ $op = '';
+ }
+ }
+
+ $com_mode = isset($com_mode) ? htmlspecialchars(trim($com_mode), ENT_QUOTES) : 'flat';
+ $com_order = isset($com_order) ? intval($com_order) : XOOPS_COMMENT_OLD1ST;
+ $com_id = isset($com_id) ? intval($com_id) : 0;
+ $com_itemid = isset($com_itemid) ? intval($com_itemid) : 0;
+ $com_status = isset($com_status) ? intval($com_status) : 0;
+ $dosmiley = (isset($dosmiley) && intval($dosmiley) > 0) ? 1 : 0;
+ $doxcode = (isset($doxcode) && intval($doxcode) > 0) ? 1 : 0;
+ $dobr = (isset($dobr) && intval($dobr) > 0) ? 1 : 0;
+} else {
+ exit();
+}
+
+switch ( $op ) {
+
+case "delete":
+ include XOOPS_ROOT_PATH.'/include/comment_delete.php';
+ break;
+case "preview":
+ $myts =& MyTextSanitizer::getInstance();
+ $doimage = 1;
+ $com_title = $myts->htmlSpecialChars($myts->stripSlashesGPC($com_title));
+ $dohtml = isset($dohtml) ? intval($dohtml) : 0;
+ if ($dohtml != 0) {
+ if (is_object($xoopsUser)) {
+ if (!$xoopsUser->isAdmin($com_modid)) {
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_COMMENT, $xoopsUser->getGroups())) {
+ $dohtml = 0;
+ }
+ }
+ } else {
+ $dohtml = 0;
+ }
+ }
+ $p_comment =& $myts->previewTarea($com_text, $dohtml, $dosmiley, $doxcode, $doimage, $dobr);
+ $com_icon = isset($com_icon) ? $com_icon : '';
+ $noname = isset($noname) ? intval($noname) : 0;
+ $com_text = $myts->htmlSpecialChars($myts->stripSlashesGPC($com_text));
+ if ($xoopsModule->getVar('dirname') != 'system') {
+ include XOOPS_ROOT_PATH.'/header.php';
+ themecenterposts($com_title, $p_comment);
+ include XOOPS_ROOT_PATH.'/include/comment_form.php';
+ include XOOPS_ROOT_PATH.'/footer.php';
+ } else {
+ xoops_cp_header();
+ themecenterposts($com_title, $p_comment);
+ include XOOPS_ROOT_PATH.'/include/comment_form.php';
+ xoops_cp_footer();
+ }
+ break;
+case "post":
+ $doimage = 1;
+ $comment_handler =& xoops_gethandler('comment');
+ $add_userpost = false;
+ $call_approvefunc = false;
+ $call_updatefunc = false;
+ // RMV-NOTIFY - this can be set to 'comment' or 'comment_submit'
+ $notify_event = false;
+ if (!empty($com_id)) {
+ $comment =& $comment_handler->get($com_id);
+ $accesserror = false;
+
+ if (is_object($xoopsUser)) {
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ if ($xoopsUser->isAdmin($com_modid) || $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_COMMENT, $xoopsUser->getGroups())) {
+ $dohtml = (!empty($dohtml)) ? 1 : 0;
+ if (!empty($com_status) && $com_status != XOOPS_COMMENT_PENDING) {
+ $old_com_status = $comment->getVar('com_status');
+ $comment->setVar('com_status', $com_status);
+ // if changing status from pending state, increment user post
+ if (XOOPS_COMMENT_PENDING == $old_com_status) {
+ $add_userpost = true;
+ if (XOOPS_COMMENT_ACTIVE == $com_status) {
+ $call_updatefunc = true;
+ $call_approvefunc = true;
+ // RMV-NOTIFY
+ $notify_event = 'comment';
+ }
+ } elseif (XOOPS_COMMENT_HIDDEN == $old_com_status && XOOPS_COMMENT_ACTIVE == $com_status) {
+ $call_updatefunc = true;
+ // Comments can not be directly posted hidden,
+ // no need to send notification here
+ } elseif (XOOPS_COMMENT_ACTIVE == $old_com_status && XOOPS_COMMENT_HIDDEN == $com_status) {
+ $call_updatefunc = true;
+ }
+ }
+ } else {
+ $dohtml = 0;
+ if ($comment->getVar('com_uid') != $xoopsUser->getVar('uid')) {
+ $accesserror = true;
+ }
+ }
+ } else {
+ $dohtml = 0;
+ $accesserror = true;
+ }
+ if (false != $accesserror) {
+ redirect_header($redirect_page.'='.$com_itemid.'&com_id='.$com_id.'&com_mode='.$com_mode.'&com_order='.$com_order, 1, _NOPERM);
+ exit();
+ }
+ } else {
+ $comment = $comment_handler->create();
+ $comment->setVar('com_created', time());
+ $comment->setVar('com_pid', $com_pid);
+ $comment->setVar('com_itemid', $com_itemid);
+ $comment->setVar('com_rootid', $com_rootid);
+ $comment->setVar('com_ip', xoops_getenv('REMOTE_ADDR'));
+ if (is_object($xoopsUser)) {
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ if ($xoopsUser->isAdmin($com_modid) || $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_COMMENT, $xoopsUser->getGroups())) {
+ $dohtml = (!empty($dohtml)) ? 1 : 0;
+ $comment->setVar('com_status', XOOPS_COMMENT_ACTIVE);
+ $add_userpost = true;
+ $call_approvefunc = true;
+ $call_updatefunc = true;
+ // RMV-NOTIFY
+ $notify_event = 'comment';
+ } else {
+ $dohtml = 0;
+ switch ($xoopsModuleConfig['com_rule']) {
+ case XOOPS_COMMENT_APPROVEALL:
+ case XOOPS_COMMENT_APPROVEUSER:
+ $comment->setVar('com_status', XOOPS_COMMENT_ACTIVE);
+ $add_userpost = true;
+ $call_approvefunc = true;
+ $call_updatefunc = true;
+ // RMV-NOTIFY
+ $notify_event = 'comment';
+ break;
+ case XOOPS_COMMENT_APPROVEADMIN:
+ default:
+ $comment->setVar('com_status', XOOPS_COMMENT_PENDING);
+ $notify_event = 'comment_submit';
+ break;
+ }
+ }
+ if (!empty($xoopsModuleConfig['com_anonpost']) && !empty($noname)) {
+ $uid = 0;
+ } else {
+ $uid = $xoopsUser->getVar('uid');
+ }
+ } else {
+ $dohtml = 0;
+ $uid = 0;
+ if ($xoopsModuleConfig['com_anonpost'] != 1) {
+ redirect_header($redirect_page.'='.$com_itemid.'&com_id='.$com_id.'&com_mode='.$com_mode.'&com_order='.$com_order, 1, _NOPERM);
+ exit();
+ }
+ }
+ if ($uid == 0) {
+ switch ($xoopsModuleConfig['com_rule']) {
+ case XOOPS_COMMENT_APPROVEALL:
+ $comment->setVar('com_status', XOOPS_COMMENT_ACTIVE);
+ $add_userpost = true;
+ $call_approvefunc = true;
+ $call_updatefunc = true;
+ // RMV-NOTIFY
+ $notify_event = 'comment';
+ break;
+ case XOOPS_COMMENT_APPROVEADMIN:
+ case XOOPS_COMMENT_APPROVEUSER:
+ default:
+ $comment->setVar('com_status', XOOPS_COMMENT_PENDING);
+ // RMV-NOTIFY
+ $notify_event = 'comment_submit';
+ break;
+ }
+ }
+ $comment->setVar('com_uid', $uid);
+ }
+ $com_title = xoops_trim($com_title);
+ $com_title = ($com_title == '') ? _NOTITLE : $com_title;
+ $comment->setVar('com_title', $com_title);
+ $comment->setVar('com_text', $com_text);
+ $comment->setVar('dohtml', $dohtml);
+ $comment->setVar('dosmiley', $dosmiley);
+ $comment->setVar('doxcode', $doxcode);
+ $comment->setVar('doimage', $doimage);
+ $comment->setVar('dobr', $dobr);
+ $icon = isset($com_icon) ? $com_icon : '';
+ $comment->setVar('com_icon', $icon);
+ $comment->setVar('com_modified', time());
+ $comment->setVar('com_modid', $com_modid);
+ if (isset($extra_params)) {
+ $comment->setVar('com_exparams', $extra_params);
+ }
+ if (false != $comment_handler->insert($comment)) {
+ $newcid = $comment->getVar('com_id');
+
+ // set own id as root id if this is a top comment
+ if ($com_rootid == 0) {
+ $com_rootid = $newcid;
+ if (!$comment_handler->updateByField($comment, 'com_rootid', $com_rootid)) {
+ $comment_handler->delete($comment);
+ include XOOPS_ROOT_PATH.'/header.php';
+ xoops_error();
+ include XOOPS_ROOT_PATH.'/footer.php';
+ }
+ }
+
+ // call custom approve function if any
+ if (false != $call_approvefunc && isset($comment_config['callback']['approve']) && trim($comment_config['callback']['approve']) != '') {
+ $skip = false;
+ if (!function_exists($comment_config['callback']['approve'])) {
+ if (isset($comment_config['callbackFile'])) {
+ $callbackfile = trim($comment_config['callbackFile']);
+ if ($callbackfile != '' && file_exists(XOOPS_ROOT_PATH.'/modules/'.$moddir.'/'.$callbackfile)) {
+ include_once XOOPS_ROOT_PATH.'/modules/'.$moddir.'/'.$callbackfile;
+ }
+ if (!function_exists($comment_config['callback']['approve'])) {
+ $skip = true;
+ }
+ } else {
+ $skip = true;
+ }
+ }
+ if (!$skip) {
+ $comment_config['callback']['approve']($comment);
+ }
+ }
+
+ // call custom update function if any
+ if (false != $call_updatefunc && isset($comment_config['callback']['update']) && trim($comment_config['callback']['update']) != '') {
+ $skip = false;
+ if (!function_exists($comment_config['callback']['update'])) {
+ if (isset($comment_config['callbackFile'])) {
+ $callbackfile = trim($comment_config['callbackFile']);
+ if ($callbackfile != '' && file_exists(XOOPS_ROOT_PATH.'/modules/'.$moddir.'/'.$callbackfile)) {
+ include_once XOOPS_ROOT_PATH.'/modules/'.$moddir.'/'.$callbackfile;
+ }
+ if (!function_exists($comment_config['callback']['update'])) {
+ $skip = true;
+ }
+ } else {
+ $skip = true;
+ }
+ }
+ if (!$skip) {
+ $criteria = new CriteriaCompo(new Criteria('com_modid', $com_modid));
+ $criteria->add(new Criteria('com_itemid', $com_itemid));
+ $criteria->add(new Criteria('com_status', XOOPS_COMMENT_ACTIVE));
+ $comment_count = $comment_handler->getCount($criteria);
+ $func = $comment_config['callback']['update'];
+ call_user_func_array($func, array($com_itemid, $comment_count, $comment->getVar('com_id')));
+ }
+ }
+
+ // increment user post if needed
+ $uid = $comment->getVar('com_uid');
+ if ($uid > 0 && false != $add_userpost) {
+ $member_handler =& xoops_gethandler('member');
+ $poster =& $member_handler->getUser($uid);
+ if (is_object($poster)) {
+ $member_handler->updateUserByField($poster, 'posts', $poster->getVar('posts') + 1);
+ }
+ }
+
+ // RMV-NOTIFY
+ // trigger notification event if necessary
+ if ($notify_event) {
+ $not_modid = $com_modid;
+ include_once XOOPS_ROOT_PATH . '/include/notification_functions.php';
+ $not_catinfo =& notificationCommentCategoryInfo($not_modid);
+ $not_category = $not_catinfo['name'];
+ $not_itemid = $com_itemid;
+ $not_event = $notify_event;
+ // Build an ABSOLUTE URL to view the comment. Make sure we
+ // point to a viewable page (i.e. not the system administration
+ // module).
+ $comment_tags = array();
+ if ('system' == $xoopsModule->getVar('dirname')) {
+ $module_handler =& xoops_gethandler('module');
+ $not_module =& $module_handler->get($not_modid);
+ } else {
+ $not_module =& $xoopsModule;
+ }
+ if (!isset($comment_url)) {
+ $com_config =& $not_module->getInfo('comments');
+ $comment_url = $com_config['pageName'] . '?';
+ if (isset($com_config['extraParams']) && is_array($com_config['extraParams'])) {
+ $extra_params = '';
+ foreach ($com_config['extraParams'] as $extra_param) {
+ $extra_params .= isset($_POST[$extra_param]) ? $extra_param.'='.htmlspecialchars($_POST[$extra_param]).'&' : $extra_param.'=&';
+ //$extra_params .= isset($_GET[$extra_param]) ? $extra_param.'='.$_GET[$extra_param].'&' : $extra_param.'=&';
+ }
+ $comment_url .= $extra_params;
+ }
+ $comment_url .= $com_config['itemName'];
+ }
+ $comment_tags['X_COMMENT_URL'] = XOOPS_URL . '/modules/' . $not_module->getVar('dirname') . '/' .$comment_url . '=' . $com_itemid.'&com_id='.$newcid.'&com_rootid='.$com_rootid.'&com_mode='.$com_mode.'&com_order='.$com_order.'#comment'.$newcid;
+ $notification_handler =& xoops_gethandler('notification');
+ $notification_handler->triggerEvent ($not_category, $not_itemid, $not_event, $comment_tags, false, $not_modid);
+ }
+
+ if (!isset($comment_post_results)) {
+
+ // if the comment is active, redirect to posted comment
+ if ($comment->getVar('com_status') == XOOPS_COMMENT_ACTIVE) {
+ redirect_header($redirect_page.'='.$com_itemid.'&com_id='.$newcid.'&com_rootid='.$com_rootid.'&com_mode='.$com_mode.'&com_order='.$com_order.'#comment'.$newcid, 2, _CM_THANKSPOST);
+ } else {
+ // not active, so redirect to top comment page
+ redirect_header($redirect_page.'='.$com_itemid.'&com_mode='.$com_mode.'&com_order='.$com_order.'#comment'.$newcid, 2, _CM_THANKSPOST);
+ }
+ }
+ } else {
+ if (!isset($purge_comment_post_results)) {
+ include XOOPS_ROOT_PATH.'/header.php';
+ xoops_error($comment->getHtmlErrors());
+ include XOOPS_ROOT_PATH.'/footer.php';
+ } else {
+ $comment_post_results = $comment->getErrors();
+ }
+ }
+ break;
+default:
+ redirect_header(XOOPS_URL.'/',3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ break;
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/comment_post.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/comment_reply.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/comment_reply.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/comment_reply.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,76 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH') || !is_object($xoopsModule)) {
+ exit();
+}
+include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
+$com_id = isset($_GET['com_id']) ? intval($_GET['com_id']) : 0;
+$com_mode = isset($_GET['com_mode']) ? htmlspecialchars(trim($_GET['com_mode']), ENT_QUOTES) : '';
+if ($com_mode == '') {
+ if (is_object($xoopsUser)) {
+ $com_mode = $xoopsUser->getVar('umode');
+ } else {
+ $com_mode = $xoopsConfig['com_mode'];
+ }
+}
+if (!isset($_GET['com_order'])) {
+ if (is_object($xoopsUser)) {
+ $com_order = $xoopsUser->getVar('uorder');
+ } else {
+ $com_order = $xoopsConfig['com_order'];
+ }
+} else {
+ $com_order = intval($_GET['com_order']);
+}
+$comment_handler =& xoops_gethandler('comment');
+$comment =& $comment_handler->get($com_id);
+$r_name = XoopsUser::getUnameFromId($comment->getVar('com_uid'));
+$r_text = _CM_POSTER.': <b>'.$r_name.'</b> '._CM_POSTED.': <b>'.formatTimestamp($comment->getVar('com_created')).'</b><br /><br />'.$comment->getVar('com_text');$com_title = $comment->getVar('com_title', 'E');
+if (!preg_match("/^re:/i", $com_title)) {
+ $com_title = "Re: ".xoops_substr($com_title, 0, 56);
+}
+$com_pid = $com_id;
+$com_text = '';
+$com_id = 0;
+$dosmiley = 1;
+$dohtml = 0;
+$doxcode = 1;
+$dobr = 1;
+$doimage = 1;
+$com_icon = '';
+$com_rootid = $comment->getVar('com_rootid');
+$com_itemid = $comment->getVar('com_itemid');
+include XOOPS_ROOT_PATH.'/header.php';
+themecenterposts($comment->getVar('com_title'), $r_text);
+include XOOPS_ROOT_PATH.'/include/comment_form.php';
+include XOOPS_ROOT_PATH.'/footer.php';
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/comment_reply.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/comment_view.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/comment_view.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/comment_view.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,217 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH') || !is_object($xoopsModule)) {
+ exit();
+}
+include_once XOOPS_ROOT_PATH.'/include/comment_constants.php';
+include_once XOOPS_ROOT_PATH.'/modules/system/constants.php';
+
+if (XOOPS_COMMENT_APPROVENONE != $xoopsModuleConfig['com_rule']) {
+
+ $gperm_handler = & xoops_gethandler( 'groupperm' );
+ $groups = ( $xoopsUser ) ? $xoopsUser -> getGroups() : XOOPS_GROUP_ANONYMOUS;
+ $xoopsTpl->assign( 'xoops_iscommentadmin', $gperm_handler->checkRight( 'system_admin', XOOPS_SYSTEM_COMMENT, $groups) );
+
+ include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
+ $comment_config = $xoopsModule->getInfo('comments');
+ $com_itemid = (trim($comment_config['itemName']) != '' && isset($_GET[$comment_config['itemName']])) ? intval($_GET[$comment_config['itemName']]) : 0;
+
+ if ($com_itemid > 0) {
+ $com_mode = isset($_GET['com_mode']) ? htmlspecialchars(trim($_GET['com_mode']), ENT_QUOTES) : '';
+ if ($com_mode == '') {
+ if (is_object($xoopsUser) && $xoopsUser->getVar('umode') != "") {
+ $com_mode = $xoopsUser->getVar('umode');
+ } else {
+ $com_mode = $xoopsConfig['com_mode'];
+ }
+ }
+ $xoopsTpl->assign('comment_mode', $com_mode);
+ if (!isset($_GET['com_order'])) {
+ if (is_object($xoopsUser) && $xoopsUser->getVar('uorder') != "") {
+ $com_order = $xoopsUser->getVar('uorder');
+ } else {
+ $com_order = $xoopsConfig['com_order'];
+ }
+ } else {
+ $com_order = intval($_GET['com_order']);
+ }
+ if ($com_order != XOOPS_COMMENT_OLD1ST) {
+ $xoopsTpl->assign(array('comment_order' => XOOPS_COMMENT_NEW1ST, 'order_other' => XOOPS_COMMENT_OLD1ST));
+ $com_dborder = 'DESC';
+ } else {
+ $xoopsTpl->assign(array('comment_order' => XOOPS_COMMENT_OLD1ST, 'order_other' => XOOPS_COMMENT_NEW1ST));
+ $com_dborder = 'ASC';
+ }
+ // admins can view all comments and IPs, others can only view approved(active) comments
+ if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
+ $admin_view = true;
+ } else {
+ $admin_view = false;
+ }
+
+ $com_id = isset($_GET['com_id']) ? intval($_GET['com_id']) : 0;
+ $com_rootid = isset($_GET['com_rootid']) ? intval($_GET['com_rootid']) : 0;
+ $comment_handler =& xoops_gethandler('comment');
+ if ($com_mode == 'flat') {
+ $comments =& $comment_handler->getByItemId($xoopsModule->getVar('mid'), $com_itemid, $com_dborder);
+ include_once XOOPS_ROOT_PATH.'/class/commentrenderer.php';
+ $renderer =& XoopsCommentRenderer::instance($xoopsTpl);
+ $renderer->setComments($comments);
+ $renderer->renderFlatView($admin_view);
+ } elseif ($com_mode == 'thread') {
+ // RMV-FIX... added extraParam stuff here
+ $comment_url = $comment_config['pageName'] . '?';
+ if (isset($comment_config['extraParams']) && is_array($comment_config['extraParams'])) {
+ $extra_params = '';
+ foreach ($comment_config['extraParams'] as $extra_param) {
+ // This page is included in the module hosting page -- param could be from anywhere
+ if (isset(${$extra_param})) {
+ $extra_params .= $extra_param .'='.${$extra_param}.'&';
+ } elseif (isset($_POST[$extra_param])) {
+ $extra_params .= $extra_param .'='.$_POST[$extra_param].'&';
+ } elseif (isset($_GET[$extra_param])) {
+ $extra_params .= $extra_param .'='.$_GET[$extra_param].'&';
+ } else {
+ $extra_params .= $extra_param .'=&';
+ }
+ //$extra_params .= isset(${$extra_param}) ? $extra_param .'='.${$extra_param}.'&' : $extra_param .'=&';
+ }
+ $comment_url .= $extra_params;
+ }
+ $xoopsTpl->assign('comment_url', $comment_url.$comment_config['itemName'].'='.$com_itemid.'&com_mode=thread&com_order='.$com_order);
+ if (!empty($com_id) && !empty($com_rootid) && ($com_id != $com_rootid)) {
+ // Show specific thread tree
+ $comments =& $comment_handler->getThread($com_rootid, $com_id);
+ if (false != $comments) {
+ include_once XOOPS_ROOT_PATH.'/class/commentrenderer.php';
+ $renderer =& XoopsCommentRenderer::instance($xoopsTpl);
+ $renderer->setComments($comments);
+ $renderer->renderThreadView($com_id, $admin_view);
+ }
+ } else {
+ // Show all threads
+ $top_comments =& $comment_handler->getTopComments($xoopsModule->getVar('mid'), $com_itemid, $com_dborder);
+ $c_count = count($top_comments);
+ if ($c_count> 0) {
+ for ($i = 0; $i < $c_count; $i++) {
+ $comments =& $comment_handler->getThread($top_comments[$i]->getVar('com_rootid'), $top_comments[$i]->getVar('com_id'));
+ if (false != $comments) {
+ include_once XOOPS_ROOT_PATH.'/class/commentrenderer.php';
+ $renderer =& XoopsCommentRenderer::instance($xoopsTpl);
+ $renderer->setComments($comments);
+ $renderer->renderThreadView($top_comments[$i]->getVar('com_id'), $admin_view);
+ }
+ unset($comments);
+ }
+ }
+ }
+ } else {
+ // Show all threads
+ $top_comments =& $comment_handler->getTopComments($xoopsModule->getVar('mid'), $com_itemid, $com_dborder);
+ $c_count = count($top_comments);
+ if ($c_count> 0) {
+ for ($i = 0; $i < $c_count; $i++) {
+ $comments =& $comment_handler->getThread($top_comments[$i]->getVar('com_rootid'), $top_comments[$i]->getVar('com_id'));
+ include_once XOOPS_ROOT_PATH.'/class/commentrenderer.php';
+ $renderer =& XoopsCommentRenderer::instance($xoopsTpl);
+ $renderer->setComments($comments);
+ $renderer->renderNestView($top_comments[$i]->getVar('com_id'), $admin_view);
+ }
+ }
+ }
+
+ // assign comment nav bar
+ $navbar = '
+<form method="get" action="'.$comment_config['pageName'].'">
+<table width="95%" class="outer" cellspacing="1">
+ <tr>
+ <td class="even" align="center"><select name="com_mode"><option value="flat"';
+ if ($com_mode == 'flat') {
+ $navbar .= ' selected="selected"';
+ }
+ $navbar .= '>'._FLAT.'</option><option value="thread"';
+ if ($com_mode == 'thread' || $com_mode == '') {
+ $navbar .= ' selected="selected"';
+ }
+ $navbar .= '>'. _THREADED .'</option><option value="nest"';
+ if ($com_mode == 'nest') {
+ $navbar .= ' selected="selected"';
+ }
+ $navbar .= '>'. _NESTED .'</option></select> <select name="com_order"><option value="'.XOOPS_COMMENT_OLD1ST.'"';
+ if ($com_order == XOOPS_COMMENT_OLD1ST) {
+ $navbar .= ' selected="selected"';
+ }
+ $navbar .= '>'. _OLDESTFIRST .'</option><option value="'.XOOPS_COMMENT_NEW1ST.'"';
+ if ($com_order == XOOPS_COMMENT_NEW1ST) {
+ $navbar .= ' selected="selected"';
+ }
+ unset($postcomment_link);
+ $navbar .= '>'. _NEWESTFIRST .'</option></select><input type="hidden" name="'.$comment_config['itemName'].'" value="'.$com_itemid.'" /> <input type="submit" value="'. _CM_REFRESH .'" class="formButton" />';
+ if (!empty($xoopsModuleConfig['com_anonpost']) || is_object($xoopsUser)) {
+ $postcomment_link = 'comment_new.php?com_itemid='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode;
+
+ $xoopsTpl->assign('anon_canpost', true);
+ }
+ $link_extra = '';
+ if (isset($comment_config['extraParams']) && is_array($comment_config['extraParams'])) {
+ foreach ($comment_config['extraParams'] as $extra_param) {
+ if (isset(${$extra_param})) {
+ $link_extra .= '&'.$extra_param.'='.${$extra_param};
+ $hidden_value = htmlspecialchars(${$extra_param}, ENT_QUOTES);
+ $extra_param_val = ${$extra_param};
+ } elseif (isset($_POST[$extra_param])) {
+ $extra_param_val = $_POST[$extra_param];
+ } elseif (isset($_GET[$extra_param])) {
+ $extra_param_val = $_GET[$extra_param];
+ }
+ if (isset($extra_param_val)) {
+ $link_extra .= '&'.$extra_param.'='.$extra_param_val;
+ $hidden_value = htmlspecialchars($extra_param_val, ENT_QUOTES);
+ $navbar .= '<input type="hidden" name="'.$extra_param.'" value="'.$hidden_value.'" />';
+ }
+ }
+ }
+ if (isset($postcomment_link)) {
+ $navbar .= ' <input type="button" onclick="self.location.href=\''.$postcomment_link.''.$link_extra.'\'" class="formButton" value="'._CM_POSTCOMMENT.'" />';
+ }
+ $navbar .= '
+ </td>
+ </tr>
+</table>
+</form>';
+ $xoopsTpl->assign(array('commentsnav' => $navbar, 'editcomment_link' => 'comment_edit.php?com_itemid='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode.''.$link_extra, 'deletecomment_link' => 'comment_delete.php?com_itemid='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode.''.$link_extra, 'replycomment_link' => 'comment_reply.php?com_itemid='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode.''.$link_extra));
+
+ // assign some lang variables
+ $xoopsTpl->assign(array('lang_from' => _CM_FROM, 'lang_joined' => _CM_JOINED, 'lang_posts' => _CM_POSTS, 'lang_poster' => _CM_POSTER, 'lang_thread' => _CM_THREAD, 'lang_edit' => _EDIT, 'lang_delete' => _DELETE, 'lang_reply' => _REPLY, 'lang_subject' => _CM_REPLIES, 'lang_posted' => _CM_POSTED, 'lang_updated' => _CM_UPDATED, 'lang_notice' => _CM_NOTICE));
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/comment_view.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/commentform.inc.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/commentform.inc.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/commentform.inc.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,71 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+include_once XOOPS_ROOT_PATH."/class/xoopslists.php";
+include XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+$cform = new XoopsThemeForm(_CM_POSTCOMMENT, "commentform", "postcomment.php", "post", true);
+if (!preg_match("/^re:/i", $subject)) {
+ $subject = "Re: ".xoops_substr($subject,0,56);
+}
+$cform->addElement(new XoopsFormText(_CM_TITLE, 'subject', 50, 255, $subject), true);
+$icons_radio = new XoopsFormRadio(_MESSAGEICON, 'icon', $icon);
+$subject_icons = XoopsLists::getSubjectsList();
+foreach ($subject_icons as $iconfile) {
+ $icons_radio->addOption($iconfile, '<img src="'.XOOPS_URL.'/images/subject/'.$iconfile.'" alt="" />');
+}
+$cform->addElement($icons_radio);
+$cform->addElement(new XoopsFormDhtmlTextArea(_CM_MESSAGE, 'message', $message, 10, 50), true);
+$option_tray = new XoopsFormElementTray(_OPTIONS,'<br />');
+if ($xoopsUser) {
+ if ($xoopsConfig['anonpost'] == 1) {
+ $noname_checkbox = new XoopsFormCheckBox('', 'noname', $noname);
+ $noname_checkbox->addOption(1, _POSTANON);
+ $option_tray->addElement($noname_checkbox);
+ }
+ if ($xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
+ $nohtml_checkbox = new XoopsFormCheckBox('', 'nohtml', $nohtml);
+ $nohtml_checkbox->addOption(1, _DISABLEHTML);
+ $option_tray->addElement($nohtml_checkbox);
+ }
+}
+$smiley_checkbox = new XoopsFormCheckBox('', 'nosmiley', $nosmiley);
+$smiley_checkbox->addOption(1, _DISABLESMILEY);
+$option_tray->addElement($smiley_checkbox);
+
+$cform->addElement($option_tray);
+$cform->addElement(new XoopsFormHidden('pid', intval($pid)));
+$cform->addElement(new XoopsFormHidden('comment_id', intval($comment_id)));
+$cform->addElement(new XoopsFormHidden('item_id', intval($item_id)));
+$cform->addElement(new XoopsFormHidden('order', intval($order)));
+$button_tray = new XoopsFormElementTray('' ,' ');
+$button_tray->addElement(new XoopsFormButton('', 'preview', _PREVIEW, 'submit'));
+$button_tray->addElement(new XoopsFormButton('', 'post', _CM_POSTCOMMENT, 'submit'));
+$cform->addElement($button_tray);
+$cform->display();
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/commentform.inc.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/common.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/common.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/common.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,282 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+if (!defined("XOOPS_MAINFILE_INCLUDED")) {
+ exit();
+} else {
+ //Instantiate security object
+ require_once XOOPS_ROOT_PATH."/class/xoopssecurity.php";
+ $xoopsSecurity = new XoopsSecurity();
+ global $xoopsSecurity;
+ //Check super globals
+ $xoopsSecurity->checkSuperglobals();
+
+ // ############## Activate error handler ##############
+ include_once XOOPS_ROOT_PATH . '/class/errorhandler.php';
+ $xoopsErrorHandler =& XoopsErrorHandler::getInstance();
+ // Turn on error handler by default (until config value obtained from DB)
+ $xoopsErrorHandler->activate(true);
+
+ define("XOOPS_SIDEBLOCK_LEFT",0);
+ define("XOOPS_SIDEBLOCK_RIGHT",1);
+ define("XOOPS_SIDEBLOCK_BOTH",2);
+ define("XOOPS_CENTERBLOCK_LEFT",3);
+ define("XOOPS_CENTERBLOCK_RIGHT",4);
+ define("XOOPS_CENTERBLOCK_CENTER",5);
+ define("XOOPS_CENTERBLOCK_ALL",6);
+ define("XOOPS_BLOCK_INVISIBLE",0);
+ define("XOOPS_BLOCK_VISIBLE",1);
+ define("XOOPS_MATCH_START",0);
+ define("XOOPS_MATCH_END",1);
+ define("XOOPS_MATCH_EQUAL",2);
+ define("XOOPS_MATCH_CONTAIN",3);
+ define("SMARTY_DIR", XOOPS_ROOT_PATH."/class/smarty/");
+// define("XOOPS_CACHE_PATH", XOOPS_ROOT_PATH."/cache");
+// define("XOOPS_UPLOAD_PATH", XOOPS_ROOT_PATH."/uploads");
+// define("XOOPS_THEME_PATH", XOOPS_ROOT_PATH."/themes");
+// define("XOOPS_COMPILE_PATH", XOOPS_ROOT_PATH."/templates_c");
+// define("XOOPS_THEME_URL", XOOPS_URL."/themes");
+// define("XOOPS_UPLOAD_URL", XOOPS_URL."/uploads");
+ set_magic_quotes_runtime(0);
+ include_once XOOPS_ROOT_PATH.'/class/logger.php';
+ $xoopsLogger =& XoopsLogger::instance();
+ $xoopsLogger->startTime();
+ if (!defined('XOOPS_XMLRPC')) {
+ define('XOOPS_DB_CHKREF', 1);
+ } else {
+ define('XOOPS_DB_CHKREF', 0);
+ }
+
+ // ############## Include common functions file ##############
+ include_once XOOPS_ROOT_PATH.'/include/functions.php';
+
+ // ################# Include required files ##############
+ require_once XOOPS_ROOT_PATH.'/kernel/object.php';
+ require_once XOOPS_ROOT_PATH.'/class/criteria.php';
+
+ // #################### Include text sanitizer ##################
+ include_once XOOPS_ROOT_PATH."/class/module.textsanitizer.php";
+
+ /**#@+
+ * Host abstraction layer
+ */
+ if ( !isset($_SERVER['PATH_TRANSLATED']) && isset($_SERVER['SCRIPT_FILENAME']) ) {
+ $_SERVER['PATH_TRANSLATED'] =& $_SERVER['SCRIPT_FILENAME']; // For Apache CGI
+ } elseif ( isset($_SERVER['PATH_TRANSLATED']) && !isset($_SERVER['SCRIPT_FILENAME']) ) {
+ $_SERVER['SCRIPT_FILENAME'] =& $_SERVER['PATH_TRANSLATED']; // For IIS/2K now I think :-(
+ }
+
+ if ( empty( $_SERVER[ 'REQUEST_URI' ] ) ) { // Not defined by IIS
+ // Under some configs, IIS makes SCRIPT_NAME point to php.exe :-(
+ if ( !( $_SERVER[ 'REQUEST_URI' ] = @$_SERVER['PHP_SELF'] ) ) {
+ $_SERVER[ 'REQUEST_URI' ] = $_SERVER['SCRIPT_NAME'];
+ }
+ if ( isset( $_SERVER[ 'QUERY_STRING' ] ) ) {
+ $_SERVER[ 'REQUEST_URI' ] .= '?' . $_SERVER[ 'QUERY_STRING' ];
+ }
+ }
+ if (!strpos($_SERVER['REQUEST_URI'], ".php")) {
+ if (strpos($_SERVER['REQUEST_URI'], "?")) {
+ $_SERVER['REQUEST_URI'] = preg_replace("/(\/\?)/U", "/index.php?", $_SERVER['REQUEST_URI']);
+ }
+ else {
+ $_SERVER['REQUEST_URI'] .= "index.php";
+ }
+ }
+ $xoopsRequestUri = $_SERVER[ 'REQUEST_URI' ]; // Deprecated (use the corrected $_SERVER variable now)
+ /**#@-*/
+
+
+ define("XOOPS_CACHE_PATH", XOOPS_ROOT_PATH."/cache");
+ define("XOOPS_UPLOAD_PATH", XOOPS_ROOT_PATH."/uploads");
+ define("XOOPS_THEME_PATH", XOOPS_ROOT_PATH."/themes");
+ define("XOOPS_COMPILE_PATH", XOOPS_ROOT_PATH."/templates_c");
+ define("XOOPS_THEME_URL", XOOPS_URL."/themes");
+ define("XOOPS_UPLOAD_URL", XOOPS_URL."/uploads");
+
+ // #################### Connect to DB ##################
+ require_once XOOPS_ROOT_PATH.'/class/database/databasefactory.php';
+ if ($_SERVER['REQUEST_METHOD'] != 'POST' || !$xoopsSecurity->checkReferer(XOOPS_DB_CHKREF)) {
+ define('XOOPS_DB_PROXY', 1);
+ }
+ $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
+
+ // ################# Load Config Settings ##############
+ $config_handler =& xoops_gethandler('config');
+ $xoopsConfig =& $config_handler->getConfigsByCat(XOOPS_CONF);
+
+ // #################### Error reporting settings ##################
+ error_reporting(0);
+
+ if (!isset($xoopsConfig['debug_mode']) || in_array(1, $xoopsConfig['debug_mode'])) {
+ error_reporting(E_ALL);
+ } else {
+ // Turn off error handler
+ $xoopsErrorHandler->activate(false);
+ }
+
+ $xoopsSecurity->checkBadips();
+
+ // ################# Include version info file ##############
+ include_once XOOPS_ROOT_PATH."/include/version.php";
+
+// for older versions...DEPRECATED! use XOOPS_URL and XOOPS_ROOT_PATH instead
+// $xoopsConfig['xoops_url'] = XOOPS_URL;
+// $xoopsConfig['root_path'] = XOOPS_ROOT_PATH."/";
+
+
+ // #################### Include site-wide lang file ##################
+ if ( file_exists(XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/global.php") ) {
+ include_once XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/global.php";
+ } else {
+ include_once XOOPS_ROOT_PATH."/language/english/global.php";
+ }
+
+ // ################ Include page-specific lang file ################
+ if (isset($xoopsOption['pagetype']) && false === strpos($xoopsOption['pagetype'], '.')) {
+ if ( file_exists(XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/".$xoopsOption['pagetype'].".php") ) {
+ include_once XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/".$xoopsOption['pagetype'].".php";
+ } else {
+ include_once XOOPS_ROOT_PATH."/language/english/".$xoopsOption['pagetype'].".php";
+ }
+ }
+
+ if ( !defined("XOOPS_USE_MULTIBYTES") ) {
+ define("XOOPS_USE_MULTIBYTES",0);
+ }
+
+ // #################### Include local string/encoding handler file ##################
+ if ( file_exists(XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/local.php") ) {
+ include_once XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/local.php";
+ } else {
+ include_once XOOPS_ROOT_PATH."/language/english/local.php";
+ }
+
+ // ############## Login a user with a valid session ##############
+ $xoopsUser = '';
+ $xoopsUserIsAdmin = false;
+ $member_handler =& xoops_gethandler('member');
+ $sess_handler =& xoops_gethandler('session');
+ if ($xoopsConfig['use_ssl'] && isset($_POST[$xoopsConfig['sslpost_name']]) && $_POST[$xoopsConfig['sslpost_name']] != '') {
+ session_id($_POST[$xoopsConfig['sslpost_name']]);
+ } elseif ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
+ if (isset($_COOKIE[$xoopsConfig['session_name']])) {
+ session_id($_COOKIE[$xoopsConfig['session_name']]);
+ } else {
+ // no custom session cookie set, destroy session if any
+ $_SESSION = array();
+ //session_destroy();
+ }
+ if (function_exists('session_cache_expire')) {
+ session_cache_expire($xoopsConfig['session_expire']);
+ }
+ }
+ session_set_save_handler(array(&$sess_handler, 'open'), array(&$sess_handler, 'close'), array(&$sess_handler, 'read'), array(&$sess_handler, 'write'), array(&$sess_handler, 'destroy'), array(&$sess_handler, 'gc'));
+ session_start();
+
+ if (!empty($_SESSION['xoopsUserId'])) {
+ $xoopsUser =& $member_handler->getUser($_SESSION['xoopsUserId']);
+ if (!is_object($xoopsUser)) {
+ $xoopsUser = '';
+ $_SESSION = array();
+ } else {
+ if ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
+ setcookie($xoopsConfig['session_name'], session_id(), time()+(60*$xoopsConfig['session_expire']), '/', '', 0);
+ }
+ $xoopsUser->setGroups($_SESSION['xoopsUserGroups']);
+ }
+ }
+
+ $accessviolation = false;
+ $module_handler =& xoops_gethandler('module');
+ $xoopsModule =& $module_handler->loadModule();
+ if ($xoopsModule && $xoopsModule->getVar('isactive')) {
+ if ($xoopsModule->getVar('dirname') != 'system' && !$xoopsModule->checkAccess()) {
+ $accessviolation = true;
+ }
+
+ if ($xoopsModule->getVar('hasconfig') == 1 || $xoopsModule->getVar('hascomments') == 1 || $xoopsModule->getVar( 'hasnotification' ) == 1) {
+ $xoopsModuleConfig =& $config_handler->getConfigsByCat(0, $xoopsModule->getVar('mid'));
+ }
+ if (!isset($xoopsOption['pagetype'])) {
+ $xoopsOption['pagetype'] = 'main';
+ }
+ $xoopsModule->loadLanguage($xoopsOption['pagetype']);
+
+ $xoopsUserIsAdmin = $xoopsUser ? $xoopsUser->isAdmin($xoopsModule->getVar('mid')) : false;
+ }
+ // Instantiate Theme object
+
+ require_once XOOPS_ROOT_PATH.'/class/theme.php';
+ global $xoopsTpl;
+ $xTheme = new XTheme($xoopsConfig['banners'] == 1, in_array(3, $xoopsConfig['debug_mode']));
+
+ //
+ if (isset($xoopsConfig) && $xoopsConfig['closesite'] == 1) {
+ $allowed = false;
+ if (is_object($xoopsUser)) {
+ foreach ($xoopsUser->getGroups() as $group) {
+ if (in_array($group, $xoopsConfig['closesite_okgrp']) || XOOPS_GROUP_ADMIN == $group) {
+ $allowed = true;
+ break;
+ }
+ }
+ } elseif (!empty($_POST['xoops_login'])) {
+ $xoopsConfig['theme_set'] = "default";
+ include_once XOOPS_ROOT_PATH.'/include/checklogin.php';
+ exit();
+ }
+ if (!$allowed) {
+ //use default theme for site closed
+ $xoopsConfig['theme_set'] = "default";
+ $xTheme->tplEngine->assign(array('lang_login' => _LOGIN,
+ 'lang_username' => _USERNAME,
+ 'lang_password' => _PASSWORD,
+ 'lang_siteclosemsg' => $xoopsConfig['closesite_text']));
+ $xTheme->tplEngine->xoops_setCaching(1);
+ $xoopsOption['template_main'] = "system_siteclosed.html";
+ include(XOOPS_ROOT_PATH."/footer.php");
+ exit();
+ }
+ unset($allowed, $group);
+ }
+
+ if ($accessviolation != false) {
+ if (!$xoopsUser) {
+ redirect_header(XOOPS_URL."/user.php", 2, _NOPERM);
+ }
+ else {
+ redirect_header(XOOPS_URL, 2, _NOPERM);
+ }
+ }
+ unset($accessviolation);
+
+ if (!isset($xoopsModule) || !is_object($xoopsModule) || !$xoopsModule->getVar('isactive')) {
+ redirect_header(XOOPS_URL, 3, _MODULENOEXIST);
+ }
+ $xoopsLogger->context = "module";
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/common.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/cp_functions.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/cp_functions.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/cp_functions.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,197 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+define('XOOPS_CPFUNC_LOADED', 1);
+
+function xoops_cp_header()
+{
+ global $xoopsConfig, $xoopsUser, $xoopsOption, $xoopsTpl;
+ $GLOBALS['xoopsLogger']->context = "core";
+
+ // Disabling gzip compression since it is causing problems. Will have to investigate a better way to use it - also frontside
+ // if ($xoopsConfig['gzip_compression'] == 1) {
+ // ob_start("ob_gzhandler");
+ // } else {
+ // ob_start();
+ // }
+ $moduleperm_handler =& xoops_gethandler('groupperm');
+ $admin_mids =& $moduleperm_handler->getItemIds('module_admin', $xoopsUser->getGroups());
+
+
+ $module_handler =& xoops_gethandler('module');
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('hasadmin', 1));
+ $criteria->add(new Criteria('isactive', 1));
+ $criteria->add(new Criteria('mid', "(".implode(',', $admin_mids).")", 'IN'));
+ $criteria->setSort('name');
+ $mods =& $module_handler->getObjects($criteria, true);
+
+ //load module items
+ $adminmenu = array();
+ include_once XOOPS_ROOT_PATH."/modules/system/constants.php";
+ $isPrefAdmin = $moduleperm_handler->checkRight('system_admin', XOOPS_SYSTEM_PREF, $xoopsUser->getGroups());
+
+ //load system items
+ $system_rights =& $moduleperm_handler->getItemIds('system_admin', $xoopsUser->getGroups());
+ if (count($system_rights) > 0 && is_object($mods[1])) {
+ $menuitems = $mods[1]->getAdminMenu();
+ if (count($menuitems) > 0) {
+ foreach ($system_rights as $k) {
+ if (isset($menuitems[$k])) {
+
+ $menuitems[$k]['link'] = trim($menuitems[$k]['link']);
+ $menuitems[$k]['target'] = isset($menuitems[$k]['target']) ? trim($menuitems[$k]['target']) : '';
+
+ if (isset($menuitems[$k]['absolute']) && $menuitems[$k]['absolute']) {
+ $menuitems[$k]['link'] = (empty($menuitems[$k]['link'])) ? "#" : $menuitems[$k]['link'];
+ } else {
+ $menuitems[$k]['link'] = (empty($menuitems[$k]['link'])) ? "#" : XOOPS_URL."/modules/".$mods[1]->getVar('dirname')."/".$menuitems[$k]['link'];
+ }
+ }
+ }
+ }
+ $systemmenu = array('name' => $mods[1]->getVar('name'),
+ 'dirname' => $mods[1]->getVar('dirname'),
+ 'version' => $mods[1]->getVar('version'),
+ 'links' => $menuitems);
+ }
+
+ if ($isPrefAdmin) {
+ if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/preferences.php")) {
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/preferences.php");
+ }
+ else {
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/english/admin/preferences.php");
+ }
+ $confcat_handler =& xoops_gethandler('configcategory');
+ $confcats =& $confcat_handler->getObjects(new Criteria('confcat_modid', "(".implode(',', array_keys($mods)).")", "IN"));
+ foreach (array_keys($confcats) as $i) {
+ $modnames[$confcats[$i]->getVar('confcat_modid')] = ucfirst($mods[$confcats[$i]->getVar('confcat_modid')]->getVar('name'));
+ if ($confcats[$i]->getVar('confcat_modid') == 1) {
+ //Put System module at the top of the list
+ $modnames[$confcats[$i]->getVar('confcat_modid')] = " ".$mods[$confcats[$i]->getVar('confcat_modid')]->getVar('name');
+ }
+ }
+ foreach (array_keys($confcats) as $i) {
+ $mods[$confcats[$i]->getVar('confcat_modid')]->loadLanguage('modinfo');
+ $menulinks[$confcats[$i]->getVar('confcat_modid')]['name'] = $mods[$confcats[$i]->getVar('confcat_modid')]->getVar('name');
+ $menulinks[$confcats[$i]->getVar('confcat_modid')]['cats'][] = array(
+ 'link' => XOOPS_URL."/modules/system/admin.php?fct=preferences&op=showmod&mod=".$confcats[$i]->getVar('confcat_modid')."&confcat_id=".$confcats[$i]->getVar('confcat_id'),
+ 'title' => constant($confcats[$i]->getVar('confcat_name'))
+ );
+ }
+ array_multisort($modnames, SORT_ASC, $menulinks);
+ $systemmenu['links'][XOOPS_SYSTEM_PREF]['sublinks'] = $menulinks;
+ }
+
+ foreach (array_keys($mods) as $i) {
+ if ($i > 1) {
+ if (in_array($mods[$i]->getVar('mid'), $admin_mids)) {
+ $menuitems = $mods[$i]->getAdminMenu();
+
+ if (count($menuitems) > 0) {
+ foreach (array_keys($menuitems) as $k) {
+ $menuitems[$k]['link'] = trim($menuitems[$k]['link']);
+ $menuitems[$k]['target'] = isset($menuitems[$k]['target']) ? trim($menuitems[$k]['target']) : '';
+
+ if (isset($menuitems[$k]['absolute']) && $menuitems[$k]['absolute']) {
+ $menuitems[$k]['link'] = (empty($menuitems[$k]['link'])) ? "#" : $menuitems[$k]['link'];
+ } else {
+ $menuitems[$k]['link'] = (empty($menuitems[$k]['link'])) ? "#" : XOOPS_URL."/modules/".$mods[$i]->getVar('dirname')."/".$menuitems[$k]['link'];
+ }
+ }
+ $adminmenu[$mods[$i]->getVar('mid')] = array('name' => $mods[$i]->getVar('name'),
+ 'dirname' => $mods[$i]->getVar('dirname'),
+ 'version' => $mods[$i]->getVar('version'),
+ 'links' => $menuitems);
+ }
+ }
+ }
+ }
+
+ $xoopsTpl->xoops_setCaching(0);
+
+ $xoopsTpl->assign_by_ref('adminmenu', $adminmenu);
+ $xoopsTpl->assign_by_ref('systemmenu', $systemmenu);
+ $adminmenucount = (count($system_rights) > 0) ? count($adminmenu) + 1 : count($adminmenu);
+ $xoopsTpl->assign('adminmenucount', $adminmenucount);
+
+ $GLOBALS['xoopsLogger']->context = "module";
+}
+
+function xoops_cp_footer()
+{
+ global $xoopsConfig, $xoopsLogger, $xoopsTpl, $xoopsOption, $xoopsModule, $xoopsUser, $xTheme;
+
+ include XOOPS_ROOT_PATH."/footer.php";
+}
+
+// We need these because theme files will not be included
+function OpenTable()
+{
+ echo "<table width='100%' border='0' cellspacing='1' cellpadding='8' style='border: 2px solid #2F5376;'><tr class='bg4'><td valign='top'>\n";
+}
+
+function CloseTable()
+{
+ echo '</td></tr></table>';
+}
+
+function themecenterposts($title, $content)
+{
+ echo '<table cellpadding="4" cellspacing="1" width="98%" class="outer"><tr><td class="head">'.$title.'</td></tr><tr><td><br />'.$content.'<br /></td></tr></table>';
+}
+
+function myTextForm($url , $value)
+{
+ return '<form action="'.$url.'" method="post"><input type="submit" value="'.$value.'" /></form>';
+}
+/*
+function xoopsfwrite()
+{
+if ($_SERVER['REQUEST_METHOD'] != 'POST') {
+return false;
+} else {
+
+}
+if (!xoops_refcheck()) {
+return false;
+} else {
+
+}
+return true;
+}
+*/
+function xoops_module_get_admin_menu()
+{
+
+}
+
+function xoops_module_write_admin_menu($content)
+{
+
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/cp_functions.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/cp_header.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/cp_header.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/cp_header.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,21 @@
+<?php
+// $Id$
+/**
+ * module files can include this file for admin authorization
+ * the file that will include this file must be located under xoops_url/modules/module_directory_name/admin_directory_name/
+ */
+error_reporting(0);
+include_once '../../../mainfile.php';
+if (!$xoopsUser) {
+ redirect_header(XOOPS_URL."/user.php", 3, _AD_NORIGHT);
+}
+// include system category definitions
+include_once XOOPS_ROOT_PATH."/modules/system/constants.php";
+if (file_exists(XOOPS_ROOT_PATH."/language/" . $xoopsConfig['language'] . "/admin.php")) {
+ include_once XOOPS_ROOT_PATH."/language/" . $xoopsConfig['language'] . "/admin.php";
+}
+else {
+ include_once XOOPS_ROOT_PATH."/language/english/admin.php";
+}
+include_once XOOPS_ROOT_PATH . "/include/cp_functions.php";
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/cp_header.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/functions.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/functions.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/functions.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,846 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+// ################## Various functions from here ################
+
+function xoops_header($closehead=true)
+{
+ global $xoopsConfig, $xoopsTheme, $xoopsConfigMetaFooter;
+ $myts =& MyTextSanitizer::getInstance();
+ if ($xoopsConfig['gzip_compression'] == 1) {
+ ob_start("ob_gzhandler");
+ } else {
+ ob_start();
+ }
+ if (!headers_sent()) {
+ header('Content-Type:text/html; charset='._CHARSET);
+ header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+ header('Cache-Control: no-store, no-cache, max-age=1, s-maxage=1, must-revalidate, post-check=0, pre-check=0');
+ header("Pragma: no-cache");
+ }
+ echo "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>";
+ echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'._LANGCODE.'" lang="'._LANGCODE.'">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" />
+ <meta http-equiv="content-language" content="'._LANGCODE.'" />
+ <meta name="robots" content="'.$xoopsConfigMetaFooter['meta_robots'].'" />
+ <meta name="keywords" content="'.$xoopsConfigMetaFooter['meta_keywords'].'" />
+ <meta name="description" content="'.$xoopsConfigMetaFooter['meta_desc'].'" />
+ <meta name="rating" content="'.$xoopsConfigMetaFooter['meta_rating'].'" />
+ <meta name="author" content="'.$xoopsConfigMetaFooter['meta_author'].'" />
+ <meta name="copyright" content="'.$xoopsConfigMetaFooter['meta_copyright'].'" />
+ <meta name="generator" content="XOOPS" />
+ <title>'.$xoopsConfig['sitename'].'</title>
+ <script type="text/javascript" src="'.XOOPS_URL.'/include/xoops.js"></script>
+ ';
+ $themecss = getcss($xoopsConfig['theme_set']);
+ echo '<link rel="stylesheet" type="text/css" media="all" href="'.XOOPS_URL.'/xoops.css" />';
+ if ($themecss) {
+ echo '<link rel="stylesheet" type="text/css" media="all" href="'.$themecss.'" />';
+ //echo '<style type="text/css" media="all"><!-- @import url('.$themecss.'); --></style>';
+ }
+ if ($closehead) {
+ echo '</head><body>';
+ }
+}
+
+function xoops_footer()
+{
+ echo '</body></html>';
+ ob_end_flush();
+}
+
+function xoops_error($msg, $title='')
+{
+ echo '
+ <div class="errorMsg">';
+ if ($title != '') {
+ echo '<h4>'.$title.'</h4>';
+ }
+ if (is_array($msg)) {
+ foreach ($msg as $m) {
+ echo $m.'<br />';
+ }
+ } else {
+ echo $msg;
+ }
+ echo '</div>';
+}
+
+function xoops_result($msg, $title='')
+{
+ echo '
+ <div class="resultMsg">';
+ if ($title != '') {
+ echo '<h4>'.$title.'</h4>';
+ }
+ if (is_array($msg)) {
+ foreach ($msg as $m) {
+ echo $m.'<br />';
+ }
+ } else {
+ echo $msg;
+ }
+ echo '</div>';
+}
+
+function xoops_confirm($hiddens, $action, $msg, $submit='', $return = '', $addtoken = true)
+{
+ $submit = ($submit != '') ? trim($submit) : _SUBMIT;
+ echo '
+ <div class="confirmMsg">
+ <h4>'.$msg.'</h4><br style="clear:both" />
+ <form method="post" action="'.$action.'">
+ ';
+ foreach ($hiddens as $name => $value) {
+ if (is_array($value)) {
+ foreach ($value as $caption => $newvalue) {
+ echo '<input type="radio" name="'.$name.'" value="'.htmlspecialchars($newvalue).'" /> '.$caption;
+ }
+ echo '<br />';
+ } else {
+ echo '<input type="hidden" name="'.$name.'" value="'.htmlspecialchars($value).'" />';
+ }
+ }
+ if ($addtoken != false) {
+ echo $GLOBALS['xoopsSecurity']->getTokenHTML();
+ }
+ if ($return != '') {
+ $return = "javascript: location.href='".$return."'";
+ }
+ else {
+ $return = "javascript: history.go(-1)";
+ }
+ echo '
+ <input type="submit" name="confirm_submit" value="'.$submit.'" /> <input type="button" name="confirm_back" value="'._CANCEL.'" onclick="'.$return.';" />
+ </form>
+ </div>
+ ';
+}
+
+/**
+* Load the specified localized strings file
+*/
+function xoops_load_lang_file( $filename, $module = '', $default = 'english' ) {
+ $lang = $GLOBALS['xoopsConfig']['language'];
+ $path = XOOPS_ROOT_PATH . ( empty($module) ? '/' : "/modules/$module/" ) . 'language';
+ if ( !( $ret = include_once( "$path/$lang/$filename.php" ) ) ) {
+ $ret = include_once( "$path/$default/$filename.php" );
+ }
+ return $ret;
+}
+
+
+
+/**
+* Deprecated, use {@link XoopsSecurity} class instead
+**/
+function xoops_refcheck($docheck=1)
+{
+ return $GLOBALS['xoopsSecurity']->checkReferer($docheck);
+}
+
+function xoops_getUserTimestamp($time, $timeoffset="")
+{
+ global $xoopsConfig, $xoopsUser;
+ if ($timeoffset == '') {
+ if ($xoopsUser) {
+ $timeoffset = $xoopsUser->getVar("timezone_offset");
+ } else {
+ $timeoffset = $xoopsConfig['default_TZ'];
+ }
+ }
+ $usertimestamp = intval($time) + (intval($timeoffset) - $xoopsConfig['server_TZ'])*3600;
+ return $usertimestamp;
+}
+
+
+
+/*
+* Function to display formatted times in user timezone
+*/
+function formatTimestamp($time, $format="l", $timeoffset="")
+{
+ if(is_callable(array("XoopsLocal", "formatTimestamp"))) {
+ return XoopsLocal::formatTimestamp($time, $format, $timeoffset);
+ // Or
+ // return xoops_local("formatTimestamp", $time, $format, $timeoffset);
+ }
+
+ global $xoopsConfig, $xoopsUser;
+ $usertimestamp = xoops_getUserTimestamp($time, $timeoffset);
+ switch (strtolower($format)) {
+ case 's':
+ $datestring = _SHORTDATESTRING;
+ break;
+ case 'm':
+ $datestring = _MEDIUMDATESTRING;
+ break;
+ case 'mysql':
+ $datestring = "Y-m-d H:i:s";
+ break;
+ case 'rss':
+ $datestring = "r";
+ break;
+ case 'l':
+ $datestring = _DATESTRING;
+ break;
+ default:
+ if ($format != '') {
+ $datestring = $format;
+ } else {
+ $datestring = _DATESTRING;
+ }
+ break;
+ }
+ return ucfirst(date($datestring, $usertimestamp));
+}
+
+/*
+* Function to calculate server timestamp from user entered time (timestamp)
+*/
+function userTimeToServerTime($timestamp, $userTZ=null)
+{
+ global $xoopsConfig;
+ if (!isset($userTZ)) {
+ $userTZ = $xoopsConfig['default_TZ'];
+ }
+ $timestamp = $timestamp - (($userTZ - $xoopsConfig['server_TZ']) * 3600);
+ return $timestamp;
+}
+
+function xoops_makepass($length = 5) {
+ $makepass = '';
+ $syllables = array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n","o", "p", "q", "r", "s", "t", "u", "v", "x", "y", "z",
+ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N","O", "P", "Q", "R", "S", "T", "U", "V", "X", "Y", "Z",
+ "1", "2", "3", "4", "5", "6", "7", "8", "9", "0");
+ srand((double)microtime()*1000000);
+ $syllable_count = count($syllables);
+ for ($count = 1; $count <= $length; $count++) {
+ if (rand()%10 == 1) {
+ $makepass .= sprintf("%0.0f",(rand()%50)+1);
+ } else {
+ $makepass .= $syllables[rand()%$syllable_count];
+ }
+ }
+ return $makepass;
+}
+
+/*
+* Functions to display dhtml loading image box
+*/
+function OpenWaitBox()
+{
+ echo "<div id='waitDiv' style='position:absolute;left:40%;top:50%;visibility:hidden;text-align: center;'>
+ <table cellpadding='6' border='2' class='bg2'>
+ <tr>
+ <td align='center'><b><big>" ._FETCHING."</big></b><br /><img src='".XOOPS_URL."/images/await.gif' alt='' /><br />" ._PLEASEWAIT."</td>
+ </tr>
+ </table>
+ </div>
+ <script type='text/javascript'>
+ <!--//
+ var DHTML = (document.getElementById || document.all || document.layers);
+ function ap_getObj(name) {
+ if (document.getElementById) {
+ return document.getElementById(name).style;
+ } else if (document.all) {
+ return document.all[name].style;
+ } else if (document.layers) {
+ return document.layers[name];
+ }
+ }
+ function ap_showWaitMessage(div,flag) {
+ if (!DHTML) {
+ return;
+ }
+ var x = ap_getObj(div);
+ x.visibility = (flag) ? 'visible' : 'hidden';
+ if (!document.getElementById) {
+ if (document.layers) {
+ x.left=280/2;
+ }
+ }
+ return true;
+ }
+ ap_showWaitMessage('waitDiv', 1);
+ //-->
+ </script>";
+}
+
+function CloseWaitBox()
+{
+ echo "<script type='text/javascript'>
+ <!--//
+ ap_showWaitMessage('waitDiv', 0);
+ //-->
+ </script>
+ ";
+}
+
+function checkEmail($email,$antispam = false)
+{
+ if (!$email || !preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$/i",$email)){
+ return false;
+ }
+ if ($antispam) {
+ $email = str_replace("@", " at ", $email);
+ $email = str_replace(".", " dot ", $email);
+ }
+ return $email;
+}
+
+function formatURL($url)
+{
+ $url = trim($url);
+ if ($url != '') {
+ if ((!preg_match("/^http[s]*:\/\//i", $url)) && (!preg_match("/^ftp*:\/\//i", $url)) && (!preg_match("/^ed2k*:\/\//i", $url)) ) {
+ $url = 'http://'.$url;
+ }
+ }
+ return $url;
+}
+
+/*
+* Function to display banners in all pages
+*/
+function showbanner()
+{
+ echo xoops_getbanner();
+}
+
+/*
+* Function to get banner html tags for use in templates
+*/
+function xoops_getbanner()
+{
+ global $xoopsConfig;
+ $db =& Database::getInstance();
+ $bresult = $db->query("SELECT COUNT(*) FROM ".$db->prefix("banner"));
+ list ($numrows) = $db->fetchRow($bresult);
+ if ( $numrows > 1 ) {
+ $numrows = $numrows-1;
+ mt_srand((double)microtime()*1000000);
+ $bannum = mt_rand(0, $numrows);
+ } else {
+ $bannum = 0;
+ }
+ if ( $numrows > 0 ) {
+ $bresult = $db->query("SELECT * FROM ".$db->prefix("banner"), 1, $bannum);
+ list ($bid, $cid, $imptotal, $impmade, $clicks, $imageurl, $clickurl, $date, $htmlbanner, $htmlcode) = $db->fetchRow($bresult);
+ if ($xoopsConfig['my_ip'] == xoops_getenv('REMOTE_ADDR')) {
+ // EMPTY
+ } else {
+ $db->queryF(sprintf("UPDATE %s SET impmade = impmade+1 WHERE bid = %u", $db->prefix("banner"), $bid));
+ }
+ /* Check if this impression is the last one and print the banner */
+ if ( $imptotal == $impmade ) {
+ $newid = $db->genId($db->prefix("bannerfinish")."_bid_seq");
+ $sql = sprintf("INSERT INTO %s (bid, cid, impressions, clicks, datestart, dateend) VALUES (%u, %u, %u, %u, %u, %u)", $db->prefix("bannerfinish"), $newid, $cid, $impmade, $clicks, $date, time());
+ $db->queryF($sql);
+ $db->queryF(sprintf("DELETE FROM %s WHERE bid = %u", $db->prefix("banner"), $bid));
+ }
+ if ($htmlbanner){
+ $bannerobject = $htmlcode;
+ }else{
+ $bannerobject = '<div><a href="'.XOOPS_URL.'/banners.php?op=click&bid='.$bid.'" target="_blank">';
+ if (stristr($imageurl, '.swf')) {
+ $bannerobject = $bannerobject
+ .'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="468" height="60">'
+ .'<param name=movie value="'.$imageurl.'">'
+ .'<param name=quality value=high>'
+ .'<embed src="'.$imageurl.'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"; type="application/x-shockwave-flash" width="468" height="60">'
+ .'</embed>'
+ .'</object>';
+ } else {
+ $bannerobject = $bannerobject.'<img src="'.$imageurl.'" alt="" />';
+ }
+
+ $bannerobject = $bannerobject.'</a></div>';
+ }
+ return $bannerobject;
+ }
+}
+
+/*
+* Function to redirect a user to certain pages
+*/
+function redirect_header($url, $time = 3, $message = '', $addredirect = true)
+{
+ global $xoopsConfig, $xoopsLogger, $xTheme, $xoopsOption, $xoopsModule, $xoopsUser, $xoopsTpl;
+ if ( preg_match( "/[\\0-\\31]|about:|script:/i", $url) ) {
+ if (!preg_match('/^\b(java)?script:([\s]*)history\.go\(-[0-9]*\)([\s]*[;]*[\s]*)$/si', $url) ) {
+ $url = XOOPS_URL;
+ }
+ }
+ //$xTheme->tplEngine->assign('xoops_showrblock', 1);
+
+ $xTheme->tplEngine->assign('time', intval($time));
+ if ($addredirect && strstr($url, 'user.php')) {
+ if (!strstr($url, '?')) {
+ $url .= '?xoops_redirect='.urlencode($_SERVER['REQUEST_URI']);
+ } else {
+ $url .= '&xoops_redirect='.urlencode($_SERVER['REQUEST_URI']);
+ }
+ }
+ if (defined('SID') && (! isset($_COOKIE[session_name()]) || ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '' && !isset($_COOKIE[$xoopsConfig['session_name']])))) {
+ if (!strstr($url, '?')) {
+ $url .= '?' . SID;
+ } else {
+ $url .= '&'.SID;
+ }
+ }
+ $url = preg_replace("/&/i", '&', htmlspecialchars($url, ENT_QUOTES));
+ $xTheme->tplEngine->assign('url', $url);
+ $message = trim($message) != '' ? $message : _TAKINGBACK;
+ $xTheme->tplEngine->assign('message', $message);
+ $xTheme->tplEngine->assign('lang_ifnotreload', sprintf(_IFNOTRELOAD, $url));
+ $xTheme->tplEngine->assign('xoops_module_header', '<meta http-equiv="Refresh" content="2; url='.$url.'" />');
+ $xoopsOption['template_main'] = 'system_redirect.html';
+ include XOOPS_ROOT_PATH."/footer.php";
+ exit();
+}
+
+function xoops_getenv($key)
+{
+ return isset($_SERVER[$key]) ? $_SERVER[$key] : (isset($_ENV[$key]) ? $_ENV[$key] : null);
+}
+
+/*
+* This function is deprecated. Do not use!
+*/
+function getTheme()
+{
+ return $GLOBALS['xoopsConfig']['theme_set'];
+}
+
+/*
+* Function to get css file for a certain theme
+* This function will be deprecated.
+*/
+function getcss($theme = '')
+{
+ return xoops_getcss($theme);
+}
+
+/**
+ * Function to get css file for a certain themeset
+ *
+ * @var string $theme name of theme
+ * @var string $type which type (main, admin or RSS) of CSS to return
+ *
+ * @return string
+ */
+function xoops_getcss($theme = '', $type = "main")
+{
+ if ($theme == '') {
+ $theme = $GLOBALS['xoopsConfig']['theme_set'];
+ }
+ $uagent = xoops_getenv('HTTP_USER_AGENT');
+ if ($type == "admin" || $type == "main") {
+ if (stristr($uagent, 'mac')) {
+ $str_css = 'styleMAC';
+ } elseif (preg_match("/MSIE ([0-9]\.[0-9]{1,2})/i", $uagent)) {
+ $str_css = 'style';
+ } else {
+ $str_css = 'styleNN';
+ }
+ }
+ if (is_dir(XOOPS_THEME_PATH.'/'.$theme)) {
+ switch ($type) {
+ case "main":
+ if (file_exists(XOOPS_THEME_PATH.'/'.$theme.'/css/'.$str_css.'.css')) {
+ return XOOPS_THEME_URL.'/'.$theme.'/css/'.$str_css.'.css';
+ }
+ elseif (file_exists(XOOPS_THEME_PATH.'/'.$theme.'/'.$str_css.'.css')) {
+ return XOOPS_THEME_URL.'/'.$theme.'/'.$str_css.'.css';
+ }
+ elseif (file_exists(XOOPS_THEME_PATH.'/css/'.$theme.'/style.css')) {
+ return XOOPS_THEME_URL.'/'.$theme.'/css/style.css';
+ }
+ elseif (file_exists(XOOPS_THEME_PATH.'/'.$theme.'/style.css')) {
+ return XOOPS_THEME_URL.'/'.$theme.'/style.css';
+ }
+ else {
+ return XOOPS_THEME_URL.'/default/css/style.css';
+ }
+ break;
+
+ case "RSS":
+ if (file_exists(XOOPS_THEME_PATH.'/'.$theme.'/css/rss.css')) {
+ return XOOPS_THEME_URL.'/'.$theme.'/css/rss.css';
+ }
+ elseif (file_exists(XOOPS_THEME_PATH.'/'.$theme.'/rss.css')) {
+ return XOOPS_THEME_URL.'/'.$theme.'/rss.css';
+ }
+ else {
+ return '';
+ }
+ break;
+
+ case "admin":
+ $str_css = $str_css."Admin";
+ if (file_exists(XOOPS_THEME_PATH.'/'.$theme.'/css/'.$str_css.'.css')) {
+ return XOOPS_THEME_URL.'/'.$theme.'/css/'.$str_css.'.css';
+ }
+ elseif (file_exists(XOOPS_THEME_PATH.'/'.$theme.'/'.$str_css.'.css')) {
+ return XOOPS_THEME_URL.'/'.$theme.'/'.$str_css.'.css';
+ }
+ elseif (file_exists(XOOPS_THEME_PATH.'/'.$theme.'/css/styleAdmin.css')) {
+ return XOOPS_THEME_URL.'/'.$theme.'/css/styleAdmin.css';
+ }
+ elseif (file_exists(XOOPS_THEME_PATH.'/'.$theme.'/styleAdmin.css')) {
+ return XOOPS_THEME_URL.'/'.$theme.'/styleAdmin.css';
+ }
+ else {
+ //return regular CSS
+ return xoops_getcss($theme);
+ }
+ break;
+
+ case "module":
+ $moduleCSS = array();
+ if (is_object($GLOBALS['xoopsModule'])) {
+ if (file_exists(XOOPS_THEME_PATH.'/'.$theme.'/css/'.$GLOBALS['xoopsModule']->getVar('dirname').'.css')) {
+ $moduleCSS[] = XOOPS_THEME_URL.'/'.$theme.'/css/'.$GLOBALS['xoopsModule']->getVar('dirname').'.css';
+ }
+ else {
+ $cssfiles = $GLOBALS['xoopsModule']->getInfo('css');
+ $cssfiles = is_array($cssfiles)?$cssfiles:array($cssfiles);
+ foreach($cssfiles as $cssfile){
+ if ($cssfile && file_exists(XOOPS_ROOT_PATH.'/modules/'.$GLOBALS['xoopsModule']->getVar('dirname').'/'.$cssfile)) {
+ $moduleCSS[] = XOOPS_URL.'/modules/'.$GLOBALS['xoopsModule']->getVar('dirname').'/'.$cssfile;
+ }
+ }
+ }
+ }
+ return $moduleCSS;
+ break;
+ }
+ return '';
+ }
+}
+
+function &getMailer()
+{
+ global $xoopsConfig;
+ include_once XOOPS_ROOT_PATH."/class/xoopsmailer.php";
+ if ( file_exists(XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/xoopsmailerlocal.php") ) {
+ include_once XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/xoopsmailerlocal.php";
+ if ( class_exists("XoopsMailerLocal") ) {
+ return new XoopsMailerLocal();
+ }
+ }
+ return new XoopsMailer();
+}
+
+function &xoops_gethandler($name, $optional = false )
+{
+ static $handlers;
+ $name = strtolower(trim($name));
+ if (!isset($handlers[$name])) {
+ if ( file_exists( $hnd_file = XOOPS_ROOT_PATH.'/kernel/'.$name.'.php' ) ) {
+ require_once $hnd_file;
+ }
+ $class = 'Xoops'.ucfirst($name).'Handler';
+ if (class_exists($class)) {
+ $handlers[$name] =& new $class($GLOBALS['xoopsDB']);
+ }
+ }
+ if (!isset($handlers[$name]) && !$optional ) {
+ trigger_error('Class <b>'.$class.'</b> does not exist<br />Handler Name: '.$name, E_USER_ERROR);
+ }
+ if ( isset( $handlers[$name] ) ) {
+ return $handlers[$name];
+ }
+ return false;
+}
+
+function &xoops_getmodulehandler($name = null, $module_dir = null, $optional = false)
+{
+ static $handlers;
+ // if $module_dir is not specified
+ if (!isset($module_dir)) {
+ //if a module is loaded
+ if (isset($GLOBALS['xoopsModule']) && is_object($GLOBALS['xoopsModule'])) {
+ $module_dir = $GLOBALS['xoopsModule']->getVar('dirname');
+ } else {
+ trigger_error('No Module is loaded', E_USER_ERROR);
+ }
+ } else {
+ $module_dir = trim($module_dir);
+ }
+ $name = (!isset($name)) ? $module_dir : trim($name);
+ if (!isset($handlers[$module_dir][$name])) {
+ if ( file_exists( $hnd_file = XOOPS_ROOT_PATH . "/modules/{$module_dir}/class/{$name}.php" ) ) {
+ include_once $hnd_file;
+ }
+ $class = ucfirst(strtolower($module_dir)).ucfirst($name).'Handler';
+ if (class_exists($class)) {
+ $handlers[$module_dir][$name] =& new $class( $GLOBALS['xoopsDB'] );
+ }
+ }
+ if (!isset($handlers[$module_dir][$name]) && !$optional) {
+ trigger_error('Handler does not exist<br />Module: '.$module_dir.'<br />Name: '.$name, E_USER_ERROR);
+ }
+ if ( isset( $handlers[$module_dir][$name] ) ) {
+ return $handlers[$module_dir][$name];
+ }
+ return false;
+}
+
+function xoops_getrank($rank_id =0, $posts = 0)
+{
+ $db =& Database::getInstance();
+ $myts =& MyTextSanitizer::getInstance();
+ $rank_id = intval($rank_id);
+ if ($rank_id != 0) {
+ $sql = "SELECT rank_title AS title, rank_image AS image FROM ".$db->prefix('ranks')." WHERE rank_id = ".$rank_id;
+ } else {
+ $sql = "SELECT rank_title AS title, rank_image AS image FROM ".$db->prefix('ranks')." WHERE rank_min <= ".$posts." AND rank_max >= ".$posts." AND rank_special = 0";
+ }
+ $rank = $db->fetchArray($db->query($sql));
+ $rank['title'] = $myts->makeTboxData4Show($rank['title']);
+ $rank['id'] = $rank_id;
+ return $rank;
+}
+
+
+/**
+* Returns the portion of string specified by the start and length parameters. If $trimmarker is supplied, it is appended to the return string. This function works fine with multi-byte characters if mb_* functions exist on the server.
+*
+* @param string $str
+* @param int $start
+* @param int $length
+* @param string $trimmarker
+*
+* @return string
+*/
+function xoops_substr($str, $start, $length, $trimmarker = '...')
+{
+ if(is_callable(array("XoopsLocal", "substr"))) {
+ return XoopsLocal::substr($str, $start, $length);
+ // Or
+ // return xoops_local("substr", $str, $start, $length);
+ }
+ if ( !XOOPS_USE_MULTIBYTES ) {
+ return ( strlen($str) - $start <= $length ) ? substr( $str, $start, $length ) : substr( $str, $start, $length - strlen($trimmarker) ) . $trimmarker;
+ }
+ if (function_exists('mb_internal_encoding') && @mb_internal_encoding(_CHARSET)) {
+ $str2 = mb_strcut( $str , $start , $length - strlen( $trimmarker ) );
+ return $str2 . ( mb_strlen($str)!=mb_strlen($str2) ? $trimmarker : '' );
+ }
+}
+
+// RMV-NOTIFY
+// ################ Notification Helper Functions ##################
+
+// We want to be able to delete by module, by user, or by item.
+// How do we specify this??
+
+function xoops_notification_deletebymodule ($module_id)
+{
+ $notification_handler =& xoops_gethandler('notification');
+ return $notification_handler->unsubscribeByModule ($module_id);
+}
+
+function xoops_notification_deletebyuser ($user_id)
+{
+ $notification_handler =& xoops_gethandler('notification');
+ return $notification_handler->unsubscribeByUser ($user_id);
+}
+
+function xoops_notification_deletebyitem ($module_id, $category, $item_id)
+{
+ $notification_handler =& xoops_gethandler('notification');
+ return $notification_handler->unsubscribeByItem ($module_id, $category, $item_id);
+}
+
+// ################### Comment helper functions ####################
+
+function xoops_comment_count($module_id, $item_id = null)
+{
+ $comment_handler =& xoops_gethandler('comment');
+ $criteria = new CriteriaCompo(new Criteria('com_modid', intval($module_id)));
+ if (isset($item_id)) {
+ $criteria->add(new Criteria('com_itemid', intval($item_id)));
+ }
+ return $comment_handler->getCount($criteria);
+}
+
+function xoops_comment_delete($module_id, $item_id)
+{
+ if (intval($module_id) > 0 && intval($item_id) > 0) {
+ $comment_handler =& xoops_gethandler('comment');
+ $comments =& $comment_handler->getByItemId($module_id, $item_id);
+ if (is_array($comments)) {
+ $count = count($comments);
+ $deleted_num = array();
+ for ($i = 0; $i < $count; $i++) {
+ if (false != $comment_handler->delete($comments[$i])) {
+ // store poster ID and deleted post number into array for later use
+ $poster_id = $comments[$i]->getVar('com_uid');
+ if ($poster_id != 0) {
+ $deleted_num[$poster_id] = !isset($deleted_num[$poster_id]) ? 1 : ($deleted_num[$poster_id] + 1);
+ }
+ }
+ }
+ $member_handler =& xoops_gethandler('member');
+ foreach ($deleted_num as $user_id => $post_num) {
+ // update user posts
+ $com_poster = $member_handler->getUser($user_id);
+ if (is_object($com_poster)) {
+ $member_handler->updateUserByField($com_poster, 'posts', $com_poster->getVar('posts') - $post_num);
+ }
+ }
+ return true;
+ }
+ }
+ return false;
+}
+
+// ################ Group Permission Helper Functions ##################
+
+function xoops_groupperm_deletebymoditem($module_id, $perm_name, $item_id = null)
+{
+ // do not allow system permissions to be deleted
+ if (intval($module_id) <= 1) {
+ return false;
+ }
+ $gperm_handler =& xoops_gethandler('groupperm');
+ return $gperm_handler->deleteByModule($module_id, $perm_name, $item_id);
+}
+
+function &xoops_utf8_encode(&$text)
+{
+ if(is_callable(array("XoopsLocal", "utf8_encode"))) {
+ return XoopsLocal::utf8_encode($text);
+ }
+ if (XOOPS_USE_MULTIBYTES == 1) {
+ if (function_exists('mb_convert_encoding')) {
+ return mb_convert_encoding($text, 'UTF-8', 'auto');
+ }
+ return $text;
+ }
+ return utf8_encode($text);
+}
+
+function &xoops_convert_encoding(&$text, $to='utf-8', $from='')
+{
+ if(is_callable(array("XoopsLocal", "convert_encoding"))) {
+ return XoopsLocal::convert_encoding($text, $to, $from);
+ }
+ if(strtolower($to)!="utf-8") return $text;
+ return xoops_utf8_encode($text);
+}
+
+function xoops_getLinkedUnameFromId($userid, $usereal = 1)
+{
+ $userid = intval($userid);
+ if ($userid > 0) {
+ $member_handler =& xoops_gethandler('member');
+ $user =& $member_handler->getUser($userid);
+ if (is_object($user)) {
+ $linkeduser = '<a
+href="'.XOOPS_URL.'/userinfo.php?uid='.$userid.'">';
+ if ( $usereal && xoops_trim($user->getVar('name'))!='') {
+ $linkeduser .= $user->getVar('name');
+ }
+ else {
+ $linkeduser .= $user->getVar('uname');
+ }
+ $linkeduser .= '</a>';
+ return $linkeduser;
+ }
+ }
+ return $GLOBALS['xoopsConfig']['anonymous'];
+}
+
+function xoops_trim($text)
+{
+ if(is_callable(array("XoopsLocal", "trim"))) {
+ return XoopsLocal::trim($text);
+ // Or
+ // return xoops_local("trim", $text);
+ }
+ return trim($text);
+}
+
+// calling XoopsLocal::{$func}()
+function &xoops_local($func)
+{
+ $par_string = "";
+ // get parameters
+ if (func_num_args() > 1) {
+ $params = array_slice(func_get_args(),1);
+ $count = count($params);
+ $par_string .= '$params[0]';
+ for($i=1;$i<$count;$i++) {
+ $par_string .= ',$params[' . $i . ']';
+ }
+ }
+ // local method defined
+ if(is_callable(array("XoopsLocal", $func))) {
+ $code = "return XoopsLocal::{$func}(";
+ if(!empty($par_string)) $code .= $par_string;
+ $code .= ');';
+ return eval($code);
+ }
+ // php function defined
+ if(function_exists($func)){
+ $code = "return {$func}(";
+ if(!empty($par_string)) $code .= $par_string;
+ $code .= ');';
+ return eval($code);
+ }
+ // nothing
+ return null;
+}
+
+// Used in kernel/module.php
+function xoops_array_diff_assoc($array1, $array2)
+{
+ if(!is_array($array1) || count($array1)==0) {
+ return array();
+ }
+ if(!is_array($array2) || count($array2)==0) {
+ return $array1;
+ }
+ if(function_exists("array_diff_assoc")){ // PHP 4.3.0+
+ return array_diff_assoc($array1, $array2);
+ }else{
+ $diff = array();
+ foreach($array1 as $key => $value){
+ if(!isset($array2[$key]) || ((string) $value !== (string) $array2[$key])){
+ $diff[$key] = $value;
+ }
+ }
+ return $diff ;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/functions.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/notification_constants.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/notification_constants.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/notification_constants.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,48 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+
+// RMV-NOTIFY
+
+define('XOOPS_NOTIFICATION_MODE_SENDALWAYS', 0);
+define('XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE', 1);
+define('XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT', 2);
+define('XOOPS_NOTIFICATION_MODE_WAITFORLOGIN', 3);
+
+define('XOOPS_NOTIFICATION_METHOD_DISABLE', 0);
+define('XOOPS_NOTIFICATION_METHOD_PM', 1);
+define('XOOPS_NOTIFICATION_METHOD_EMAIL', 2);
+
+define('XOOPS_NOTIFICATION_DISABLE', 0);
+define('XOOPS_NOTIFICATION_ENABLEBLOCK', 1);
+define('XOOPS_NOTIFICATION_ENABLEINLINE', 2);
+define('XOOPS_NOTIFICATION_ENABLEBOTH', 3);
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/notification_constants.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/notification_functions.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/notification_functions.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/notification_functions.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,396 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+
+// RMV-NOTIFY
+
+// FIXME: Do some caching, so we don't retrieve the same category / event
+// info many times.
+
+
+/**
+ * Determine if notification is enabled for the selected module.
+ *
+ * @param string $style Subscription style: 'block' or 'inline'
+ * @param int $module_id ID of the module (default current module)
+ * @return bool
+ */
+function notificationEnabled ($style, $module_id=null)
+{
+ if (isset($GLOBALS['xoopsModuleConfig']['notification_enabled'])) {
+ $status = $GLOBALS['xoopsModuleConfig']['notification_enabled'];
+ } else {
+ if (!isset($module_id)) {
+ return false;
+ }
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->get($module_id);
+ if (!empty($module) && $module->getVar('hasnotification') == 1) {
+ $config_handler =& xoops_gethandler('config');
+ $config = $config_handler->getConfigsByCat(0,$module_id);
+ $status = $config['notification_enabled'];
+ } else {
+ return false;
+ }
+ }
+ include_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
+ if (($style == 'block') && ($status == XOOPS_NOTIFICATION_ENABLEBLOCK || $status == XOOPS_NOTIFICATION_ENABLEBOTH)) {
+ return true;
+ }
+ if (($style == 'inline') && ($status == XOOPS_NOTIFICATION_ENABLEINLINE || $status == XOOPS_NOTIFICATION_ENABLEBOTH)) {
+ return true;
+ }
+ // if ($status != XOOPS_NOTIFICATION_DISABLE) {
+ // return true;
+ // }
+ return false;
+}
+
+/**
+ * Get an associative array of info for a particular notification
+ * category in the selected module. If no category is selected,
+ * return an array of info for all categories.
+ *
+ * @param string $name Category name (default all categories)
+ * @param int $module_id ID of the module (default current module)
+ * @return mixed
+ */
+function ¬ificationCategoryInfo ($category_name='', $module_id=null)
+{
+ if (!isset($module_id)) {
+ global $xoopsModule;
+ $module_id = !empty($xoopsModule) ? $xoopsModule->getVar('mid') : 0;
+ $module =& $xoopsModule;
+ } else {
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->get($module_id);
+ }
+ $not_config =& $module->getInfo('notification');
+ if (empty($category_name)) {
+ return $not_config['category'];
+ }
+ foreach ($not_config['category'] as $category) {
+ if ($category['name'] == $category_name) {
+ return $category;
+ }
+ }
+ return false;
+}
+
+/**
+ * Get associative array of info for the category to which comment events
+ * belong.
+ *
+ * @todo This could be more efficient... maybe specify in
+ * $modversion['comments'] the notification category.
+ * This would also serve as a way to enable notification
+ * of comments, and also remove the restriction that
+ * all notification categories must have unique item_name. (TODO)
+ *
+ * @param int $module_id ID of the module (default current module)
+ * @return mixed Associative array of category info
+ */
+function ¬ificationCommentCategoryInfo($module_id=null)
+{
+ $all_categories =& notificationCategoryInfo ('', $module_id);
+ if (empty($all_categories)) {
+ return false;
+ }
+ foreach ($all_categories as $category) {
+ $all_events =& notificationEvents ($category['name'], false, $module_id);
+ if (empty($all_events)) {
+ continue;
+ }
+ foreach ($all_events as $event) {
+ if ($event['name'] == 'comment') {
+ return $category;
+ }
+ }
+ }
+ return false;
+}
+
+// TODO: some way to include or exclude admin-only events...
+
+/**
+ * Get an array of info for all events (each event has associative array)
+ * in the selected category of the selected module.
+ *
+ * @param string $category_name Category name
+ * @param bool $enabled_only If true, return only enabled events
+ * @param int $module_id ID of the module (default current module)
+ * @return mixed
+ */
+function ¬ificationEvents ($category_name, $enabled_only, $module_id=null)
+{
+ if (!isset($module_id)) {
+ global $xoopsModule;
+ $module_id = !empty($xoopsModule) ? $xoopsModule->getVar('mid') : 0;
+ $module =& $xoopsModule;
+ } else {
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->get($module_id);
+ }
+ $not_config =& $module->getInfo('notification');
+ $config_handler =& xoops_gethandler('config');
+ $mod_config = $config_handler->getConfigsByCat(0,$module_id);
+
+ $category =& notificationCategoryInfo($category_name, $module_id);
+
+ global $xoopsConfig;
+ $event_array = array();
+
+ $override_comment = false;
+ $override_commentsubmit = false;
+ $override_bookmark = false;
+
+ foreach ($not_config['event'] as $event) {
+ if ($event['category'] == $category_name) {
+ $event['mail_template_dir'] = XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/mail_template/';
+ if (!$enabled_only || notificationEventEnabled ($category, $event, $module)) {
+ $event_array[] = $event;
+ }
+ if ($event['name'] == 'comment') {
+ $override_comment = true;
+ }
+ if ($event['name'] == 'comment_submit') {
+ $override_commentsubmit = true;
+ }
+ if ($event['name'] == 'bookmark') {
+ $override_bookmark = true;
+ }
+ }
+ }
+
+ include_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/notification.php';
+
+ // Insert comment info if applicable
+
+ if ($module->getVar('hascomments')) {
+ $com_config = $module->getInfo('comments');
+ if (!empty($category['item_name']) && $category['item_name'] == $com_config['itemName']) {
+ $mail_template_dir = XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/mail_template/';
+ include_once XOOPS_ROOT_PATH . '/include/comment_constants.php';
+ $config_handler =& xoops_gethandler('config');
+ $com_config = $config_handler->getConfigsByCat(0,$module_id);
+ if (!$enabled_only) {
+ $insert_comment = true;
+ $insert_submit = true;
+ } else {
+ $insert_comment = false;
+ $insert_submit = false;
+ switch($com_config['com_rule']) {
+ case XOOPS_COMMENT_APPROVENONE:
+ // comments disabled, no comment events
+ break;
+ case XOOPS_COMMENT_APPROVEALL:
+ // all comments are automatically approved, no 'submit'
+ if (!$override_comment) {
+ $insert_comment = true;
+ }
+ break;
+ case XOOPS_COMMENT_APPROVEUSER:
+ case XOOPS_COMMENT_APPROVEADMIN:
+ // comments first submitted, require later approval
+ if (!$override_comment) {
+ $insert_comment = true;
+ }
+ if (!$override_commentsubmit) {
+ $insert_submit = true;
+ }
+ break;
+ }
+ }
+ if ($insert_comment) {
+ $event = array ('name'=>'comment', 'category'=>$category['name'], 'title'=>_NOT_COMMENT_NOTIFY, 'caption'=>_NOT_COMMENT_NOTIFYCAP, 'description'=>_NOT_COMMENT_NOTIFYDSC, 'mail_template_dir'=>$mail_template_dir, 'mail_template'=>'comment_notify', 'mail_subject'=>_NOT_COMMENT_NOTIFYSBJ);
+ if (!$enabled_only || notificationEventEnabled($category, $event, $module)) {
+ $event_array[] = $event;
+ }
+ }
+ if ($insert_submit) {
+ $event = array ('name'=>'comment_submit', 'category'=>$category['name'], 'title'=>_NOT_COMMENTSUBMIT_NOTIFY, 'caption'=>_NOT_COMMENTSUBMIT_NOTIFYCAP, 'description'=>_NOT_COMMENTSUBMIT_NOTIFYDSC, 'mail_template_dir'=>$mail_template_dir, 'mail_template'=>'commentsubmit_notify', 'mail_subject'=>_NOT_COMMENTSUBMIT_NOTIFYSBJ, 'admin_only'=>1);
+ if (!$enabled_only || notificationEventEnabled($category, $event, $module)) {
+ $event_array[] = $event;
+ }
+ }
+
+
+ }
+ }
+
+ // Insert bookmark info if appropriate
+
+ if (!empty($category['allow_bookmark'])) {
+ if (!$override_bookmark) {
+ $event = array ('name'=>'bookmark', 'category'=>$category['name'], 'title'=>_NOT_BOOKMARK_NOTIFY, 'caption'=>_NOT_BOOKMARK_NOTIFYCAP, 'description'=>_NOT_BOOKMARK_NOTIFYDSC);
+ if (!$enabled_only || notificationEventEnabled($category, $event, $module)) {
+ $event_array[] = $event;
+ }
+ }
+ }
+
+
+ return $event_array;
+
+}
+
+/**
+ * Determine whether a particular notification event is enabled.
+ * Depends on module config options.
+ *
+ * @todo Check that this works correctly for comment and other
+ * events which depend on additional config options...
+ *
+ * @param array $category Category info array
+ * @param array $event Event info array
+ * @param object $module Module
+ * @return bool
+ **/
+function notificationEventEnabled (&$category, &$event, &$module)
+{
+ $config_handler =& xoops_gethandler('config');
+ $mod_config = $config_handler->getConfigsByCat(0,$module->getVar('mid'));
+
+ if (is_array($mod_config['notification_events']) && $mod_config['notification_events'] != array()) {
+ $option_name = notificationGenerateConfig ($category, $event, 'option_name');
+ if (in_array($option_name, $mod_config['notification_events'])) {
+ return true;
+ }
+ $notification_handler =& xoops_gethandler('notification');
+ }
+ return false;
+}
+
+
+/**
+ * Get associative array of info for the selected event in the selected
+ * category (for the selected module).
+ *
+ * @param string $category_name Notification category
+ * @param string $event_name Notification event
+ * @param int $module_id ID of the module (default current module)
+ * @return mixed
+ */
+function ¬ificationEventInfo ($category_name, $event_name, $module_id=null)
+{
+ $all_events =& notificationEvents ($category_name, false, $module_id);
+ foreach ($all_events as $event) {
+ if ($event['name'] == $event_name) {
+ return $event;
+ }
+ }
+ return false;
+}
+
+
+/**
+ * Get an array of associative info arrays for subscribable categories
+ * for the selected module.
+ *
+ * @param int $module_id ID of the module
+ * @return mixed
+ */
+
+function ¬ificationSubscribableCategoryInfo ($module_id=null)
+{
+ $all_categories =& notificationCategoryInfo ('', $module_id);
+
+ // FIXME: better or more standardized way to do this?
+ $parsed_url = parse_url($_SERVER['REQUEST_URI']);
+ $script_url = explode('/', $parsed_url['path']);
+ $script_name = $script_url[count($script_url)-1];
+
+ $sub_categories = array();
+
+ foreach ($all_categories as $category) {
+
+ // Check the script name
+
+ $subscribe_from = $category['subscribe_from'];
+ if (!is_array($subscribe_from)) {
+ if ($subscribe_from == '*') {
+ $subscribe_from = array($script_name);
+ // FIXME: this is just a hack: force a match
+ } else {
+ $subscribe_from = array($subscribe_from);
+ }
+ }
+ if (!in_array($script_name, $subscribe_from)) {
+ continue;
+ }
+
+ // If 'item_name' is missing, automatic match. Otherwise
+ // check if that argument exists...
+
+ if (empty($category['item_name'])) {
+ $category['item_name'] = '';
+ $category['item_id'] = 0;
+ $sub_categories[] = $category;
+ } else {
+ $item_name = $category['item_name'];
+ $id = ($item_name != '' && isset($_GET[$item_name])) ? intval($_GET[$item_name]) : 0;
+ if ($id > 0) {
+ $category['item_id'] = $id;
+ $sub_categories[] = $category;
+ }
+ }
+ }
+ return $sub_categories;
+
+}
+
+/**
+ * Generate module config info for a particular category, event pair.
+ * The selectable config options are given names depending on the
+ * category and event names, and the text depends on the category
+ * and event titles. These are pieced together in this function in
+ * case we wish to alter the syntax.
+ *
+ * @param array $category Array of category info
+ * @param array $event Array of event info
+ * @param string $type The particular name to generate
+ * return string
+ **/
+function notificationGenerateConfig (&$category, &$event, $type)
+{
+ switch ($type) {
+ case 'option_value':
+ case 'name':
+ return 'notify:' . $category['name'] . '-' . $event['name'];
+ break;
+ case 'option_name':
+ return $category['name'] . '-' . $event['name'];
+ break;
+ default:
+ return false;
+ break;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/notification_functions.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/notification_select.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/notification_select.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/notification_select.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,85 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+include_once XOOPS_ROOT_PATH.'/include/notification_constants.php';
+include_once XOOPS_ROOT_PATH.'/include/notification_functions.php';
+$xoops_notification = array();
+$xoops_notification['show'] = (!isset($xoopsOption['pagetype']) || $xoopsOption['pagetype'] != "admin") && isset($xoopsModule) && is_object($xoopsUser) && notificationEnabled('inline') ? 1 : 0;
+if ($xoops_notification['show']) {
+ include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/notification.php';
+ $categories =& notificationSubscribableCategoryInfo();
+ $event_count = 0;
+ if (!empty($categories)) {
+ $notification_handler =& xoops_gethandler('notification');
+ foreach ($categories as $category) {
+ $section['name'] = $category['name'];
+ $section['title'] = $category['title'];
+ $section['description'] = $category['description'];
+ $section['itemid'] = $category['item_id'];
+ $section['events'] = array();
+ $subscribed_events =& $notification_handler->getSubscribedEvents($category['name'], $category['item_id'], $xoopsModule->getVar('mid'), $xoopsUser->getVar('uid'));
+ foreach (notificationEvents($category['name'], true) as $event) {
+ if (!empty($event['admin_only']) && !$xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
+ continue;
+ }
+ if (!empty($event['invisible'])) {
+ continue;
+ }
+ $subscribed = in_array($event['name'], $subscribed_events) ? 1 : 0;
+ $section['events'][$event['name']] = array ('name'=>$event['name'], 'title'=>$event['title'], 'caption'=>$event['caption'], 'description'=>$event['description'], 'subscribed'=>$subscribed);
+ $event_count ++;
+ }
+ $xoops_notification['categories'][$category['name']] = $section;
+ }
+ $xoops_notification['target_page'] = "notification_update.php";
+ $url = parse_url($_SERVER['REQUEST_URI']);
+ $xoops_notification['redirect_script'] = $url['path'];
+ $xoopsTpl->assign(array('lang_activenotifications' => _NOT_ACTIVENOTIFICATIONS, 'lang_notificationoptions' => _NOT_NOTIFICATIONOPTIONS, 'lang_updateoptions' => _NOT_UPDATEOPTIONS, 'lang_updatenow' => _NOT_UPDATENOW, 'lang_category' => _NOT_CATEGORY, 'lang_event' => _NOT_EVENT, 'lang_events' => _NOT_EVENTS, 'lang_checkall' => _NOT_CHECKALL, 'lang_notificationmethodis' => _NOT_NOTIFICATIONMETHODIS, 'lang_change' => _NOT_CHANGE, 'editprofile_url' => XOOPS_URL . '/edituser.php?uid=' . $xoopsUser->getVar('uid')));
+ switch ($xoopsUser->getVar('notify_method')) {
+ case XOOPS_NOTIFICATION_METHOD_DISABLE:
+ $xoopsTpl->assign('user_method', _NOT_DISABLE);
+ break;
+ case XOOPS_NOTIFICATION_METHOD_PM:
+ $xoopsTpl->assign('user_method', _NOT_PM);
+ break;
+ case XOOPS_NOTIFICATION_METHOD_EMAIL:
+ $xoopsTpl->assign('user_method', _NOT_EMAIL);
+ break;
+ }
+ } else {
+ $xoops_notification['show'] = 0;
+ }
+ if ($event_count == 0) {
+ $xoops_notification['show'] = 0;
+ }
+ $xoops_notification['token'] = $GLOBALS['xoopsSecurity']->getTokenHTML();
+}
+$xoopsTpl->assign('xoops_notification', $xoops_notification);
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/notification_select.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/notification_update.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/notification_update.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/notification_update.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,128 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+// RMV-NOTIFY
+
+// This module expects the following arguments:
+//
+// not_submit
+// not_redirect (to return back after update)
+// not_mid (TODO)
+// not_uid (TODO)
+// not_list[1][params] = {category},{itemid},{event}
+// not_list[1][status] = 1 if selected; 0 or missing if not selected
+// etc...
+
+// TODO: can we put arguments in the not_redirect argument??? do we need
+// to specially encode them first???
+
+// TODO: allow 'GET' also so we can process 'unsubscribe' requests??
+
+if (!defined('XOOPS_ROOT_PATH') || !is_object($xoopsModule)) {
+ exit();
+}
+
+include_once XOOPS_ROOT_PATH.'/include/notification_constants.php';
+include_once XOOPS_ROOT_PATH.'/include/notification_functions.php';
+include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/notification.php';
+
+if (!isset($_POST['not_submit'])) {
+ exit();
+}
+
+if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header($_POST['not_redirect'], 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit();
+}
+
+// NOTE: in addition to the templates provided in the block and view
+// modes, we can have buttons, etc. which load the arguments to be
+// read by this script. That way a module can really customize its
+// look as to where/how the notification options are made available.
+
+$update_list = $_POST['not_list'];
+
+$module_id = $xoopsModule->getVar('mid');
+$user_id = is_object($xoopsUser) ? $xoopsUser->getVar('uid') : 0;
+
+// For each event, update the notification depending on the status.
+// If status=1, subscribe to the event; otherwise, unsubscribe.
+
+// FIXME: right now I just ignore database errors (e.g. if already
+// subscribed)... deal with this more gracefully?
+
+$notification_handler =& xoops_gethandler('notification');
+
+foreach ($update_list as $update_item) {
+
+ list($category, $item_id, $event) = split (',', $update_item['params']);
+ $status = !empty($update_item['status']) ? 1 : 0;
+
+ if (!$status) {
+ $notification_handler->unsubscribe($category, $item_id, $event, $module_id, $user_id);
+ } else {
+ $notification_handler->subscribe($category, $item_id, $event);
+ }
+
+}
+
+// TODO: something like grey box summary of actions (like multiple comment
+// deletion), with a button to return back... NOTE: we need some arguments
+// to help us get back to where we were...
+
+// TODO: finish integration with comments... i.e. need calls to
+// notifyUsers at appropriate places... (need to figure out where
+// comment submit occurs and where comment approval occurs)...
+
+include_once XOOPS_ROOT_PATH . '/include/notification_functions.php';
+
+$redirect_args = array();
+foreach ($update_list as $update_item) {
+ list($category,$item_id,$event) = split(',',$update_item['params']);
+ $category_info =& notificationCategoryInfo($category);
+ if (!empty($category_info['item_name'])) {
+ $redirect_args[$category_info['item_name']] = $item_id;
+ }
+}
+
+// TODO: write a central function to put together args with '?' and '&'
+// symbols...
+$argstring = '';
+$first_arg = 1;
+foreach (array_keys($redirect_args) as $arg) {
+ if ($first_arg) {
+ $argstring .= "?" . $arg . "=" . $redirect_args[$arg];
+ $first_arg = 0;
+ } else {
+ $argstring .= "&" . $arg . "=" . $redirect_args[$arg];
+ }
+}
+
+redirect_header ($_POST['not_redirect'].$argstring, 3, _NOT_UPDATEOK);
+exit();
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/notification_update.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/old_theme_functions.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/old_theme_functions.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/old_theme_functions.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,56 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+
+// These are needed when viewing old modules (that don't use Smarty template files) when a theme that use Smarty templates are selected.
+
+// function_exists check is needed for inclusion from the admin side
+
+if (!function_exists('opentable')) {
+ function OpenTable($width='100%')
+ {
+ echo '<table width="'.$width.'" cellspacing="0" class="outer"><tr><td class="even">';
+ }
+}
+
+if (!function_exists('closetable')) {
+ function CloseTable()
+ {
+ echo '</td></tr></table>';
+ }
+}
+
+if (!function_exists('themecenterposts')) {
+ function themecenterposts($title, $content)
+ {
+ echo '<table cellpadding="4" cellspacing="1" width="98%" class="outer"><tr><td class="head">'.$title.'</td></tr><tr><td><br />'.$content.'<br /></td></tr></table>';
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/old_theme_functions.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/registerform.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/registerform.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/registerform.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,93 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+include_once XOOPS_ROOT_PATH."/class/xoopslists.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+
+
+$email_tray = new XoopsFormElementTray(_US_EMAIL, "<br />");
+$email_text = new XoopsFormText("", "email", 25, 60, $myts->htmlSpecialChars($email));
+$email_option = new XoopsFormCheckBox("", "user_viewemail", $user_viewemail);
+$email_option->addOption(1, _US_ALLOWVIEWEMAIL);
+$email_tray->addElement($email_text);
+$email_tray->addElement($email_option);
+
+//$avatar_select = new XoopsFormSelect("", "user_avatar", $user_avatar);
+//$avatar_array =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/");
+//$avatar_select->addOptionArray($avatar_array);
+//$a_dirlist =& XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH."/images/avatar/");
+//$a_dir_labels = array();
+//$a_count = 0;
+//$a_dir_link = "<a href=\"javascript:openWithSelfMain('".XOOPS_URL."/misc.php?action=showpopups&type=avatars&start=".$a_count."','avatars',600,400);\">XOOPS</a>";
+//$a_count = $a_count + count($avatar_array);
+//$a_dir_labels[] = new XoopsFormLabel("", $a_dir_link);
+//foreach ($a_dirlist as $a_dir) {
+// if ( $a_dir == "users" ) {
+// continue;
+// }
+// $avatars_array =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/".$a_dir."/", $a_dir."/");
+// $avatar_select->addOptionArray($avatars_array);
+// $a_dir_link = "<a href=\"javascript:openWithSelfMain('".XOOPS_URL."/misc.php?action=showpopups&type=avatars&subdir=".$a_dir."&start=".$a_count."','avatars',600,400);\">".$a_dir."</a>";
+// $a_dir_labels[] = new XoopsFormLabel("", $a_dir_link);
+// $a_count = $a_count + count($avatars_array);
+//}
+//$avatar_select->setExtra("onchange='showImgSelected(\"avatar\", \"user_avatar\", \"images/avatar\", \"\", \"".XOOPS_URL."\")'");
+//$avatar_label = new XoopsFormLabel("", "<img src='images/avatar/blank.gif' name='avatar' id='avatar' alt='' />");
+//$avatar_tray = new XoopsFormElementTray(_US_AVATAR, " ");
+//$avatar_tray->addElement($avatar_select);
+//$avatar_tray->addElement($avatar_label);
+//foreach ($a_dir_labels as $a_dir_label) {
+// $avatar_tray->addElement($a_dir_label);
+//}
+
+$reg_form = new XoopsThemeForm(_US_USERREG, "userinfo", "register.php", "post", true);
+$uname_size = $xoopsConfigUser['maxuname'] < 25 ? $xoopsConfigUser['maxuname'] : 25;
+$reg_form->addElement(new XoopsFormText(_US_NICKNAME, "uname", $uname_size, $uname_size, $myts->htmlSpecialChars($uname)), true);
+$reg_form->addElement($email_tray);
+$reg_form->addElement(new XoopsFormText(_US_WEBSITE, "url", 25, 255, $myts->htmlSpecialChars($url)));
+$tzselected = ($timezone_offset != "") ? $timezone_offset : $xoopsConfig['default_TZ'];
+$reg_form->addElement(new XoopsFormSelectTimezone(_US_TIMEZONE, "timezone_offset", $tzselected));
+//$reg_form->addElement($avatar_tray);
+$reg_form->addElement(new XoopsFormPassword(_US_PASSWORD, "pass", 10, 32, $myts->htmlSpecialChars($pass)), true);
+$reg_form->addElement(new XoopsFormPassword(_US_VERIFYPASS, "vpass", 10, 32, $myts->htmlSpecialChars($vpass)), true);
+$reg_form->addElement(new XoopsFormRadioYN(_US_MAILOK, 'user_mailok', $user_mailok));
+if ($xoopsConfigUser['reg_dispdsclmr'] != 0 && $xoopsConfigUser['reg_disclaimer'] != '') {
+ $disc_tray = new XoopsFormElementTray(_US_DISCLAIMER, '<br />');
+ $disc_text = new XoopsFormTextarea('', 'disclaimer', $xoopsConfigUser['reg_disclaimer'], 8);
+ $disc_text->setExtra('readonly="readonly"');
+ $disc_tray->addElement($disc_text);
+ $agree_chk = new XoopsFormCheckBox('', 'agree_disc', $agree_disc);
+ $agree_chk->addOption(1, _US_IAGREE);
+ $disc_tray->addElement($agree_chk);
+ $reg_form->addElement($disc_tray);
+}
+$reg_form->addElement(new XoopsFormHidden("op", "newuser"));
+$reg_form->addElement(new XoopsFormButton("", "submit", _US_SUBMIT, "submit"));
+$reg_form->setRequired($email_text);
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/registerform.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/searchform.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/searchform.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/searchform.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,68 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+
+// create form
+$search_form = new XoopsThemeForm(_SR_SEARCH, "search", "search.php", 'get');
+
+// create form elements
+$search_form->addElement(new XoopsFormText(_SR_KEYWORDS, "query", 30, 255, htmlspecialchars(stripslashes(implode(" ", $queries)), ENT_QUOTES)), true);
+$type_select = new XoopsFormSelect(_SR_TYPE, "andor", $andor);
+$type_select->addOptionArray(array("AND"=>_SR_ALL, "OR"=>_SR_ANY, "exact"=>_SR_EXACT));
+$search_form->addElement($type_select);
+if (!empty($mids)) {
+ $mods_checkbox = new XoopsFormCheckBox(_SR_SEARCHIN, "mids[]", $mids);
+} else {
+ $mods_checkbox = new XoopsFormCheckBox(_SR_SEARCHIN, "mids[]", $mid);
+}
+if (empty($modules)) {
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('hassearch', 1));
+ $criteria->add(new Criteria('isactive', 1));
+ if (!empty($available_modules)) {
+ $criteria->add(new Criteria('mid', "(".implode(',', $available_modules).")", 'IN'));
+ }
+ $module_handler =& xoops_gethandler('module');
+ $mods_checkbox->addOptionArray($module_handler->getList($criteria));
+}
+else {
+ foreach ($modules as $mid => $module) {
+ $module_array[$mid] = $module->getVar('name');
+ }
+ $mods_checkbox->addOptionArray($module_array);
+}
+$search_form->addElement($mods_checkbox);
+if ($xoopsConfigSearch['keyword_min'] > 0) {
+ $search_form->addElement(new XoopsFormLabel(_SR_SEARCHRULE, sprintf(_SR_KEYIGNORE, $xoopsConfigSearch['keyword_min'])));
+}
+$search_form->addElement(new XoopsFormHidden("action", "results"));
+$search_form->addElement(new XoopsFormHiddenToken('id'));
+$search_form->addElement(new XoopsFormButton("", "submit", _SR_SEARCH, "submit"));
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/searchform.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/version.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/version.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/version.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,4 @@
+<?php
+// $Id$
+define("XOOPS_VERSION","XOOPS 2.2.3 Final");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/version.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/xoops.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/xoops.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/xoops.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,448 @@
+function xoopsGetElementById(id){
+ if (document.getElementById) {
+ return (document.getElementById(id));
+ } else if (document.all) {
+ return (document.all[id]);
+ } else {
+ if ((navigator.appname.indexOf("Netscape") != -1) && parseInt(navigator.appversion == 4)) {
+ return (document.layers[id]);
+ }
+ }
+}
+
+function xoopsSetElementProp(name, prop, val) {
+ var elt=xoopsGetElementById(name);
+ if (elt) elt[prop]=val;
+}
+
+function xoopsSetElementStyle(name, prop, val) {
+ var elt=xoopsGetElementById(name);
+ if (elt && elt.style) elt.style[prop]=val;
+}
+
+function xoopsGetFormElement(fname, ctlname) {
+ var frm=document.forms[fname];
+ return frm?frm.elements[ctlname]:null;
+}
+
+function justReturn() {
+ return;
+}
+
+function openWithSelfMain(url,name,width,height,returnwindow) {
+ var options = "width=" + width + ",height=" + height + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no";
+
+ var new_window = window.open(url, name, options);
+ window.self.name = "main";
+ new_window.focus();
+ if (returnwindow != null) {
+ return new_window;
+ }
+}
+
+function setElementColor(id, color){
+ xoopsGetElementById(id).style.color = "#" + color;
+}
+
+function setElementFont(id, font){
+ xoopsGetElementById(id).style.fontFamily = font;
+}
+
+function setElementSize(id, size){
+ xoopsGetElementById(id).style.fontSize = size;
+}
+
+function changeDisplay(id){
+ var elestyle = xoopsGetElementById(id).style;
+ if (elestyle.display == "") {
+ elestyle.display = "none";
+ } else {
+ elestyle.display = "block";
+ }
+}
+
+function setVisible(id){
+ xoopsGetElementById(id).style.visibility = "visible";
+}
+
+function setHidden(id){
+ xoopsGetElementById(id).style.visibility = "hidden";
+}
+
+function makeBold(id){
+ var eleStyle = xoopsGetElementById(id).style;
+ if (eleStyle.fontWeight != "bold" && eleStyle.fontWeight != "700") {
+ eleStyle.fontWeight = "bold";
+ } else {
+ eleStyle.fontWeight = "normal";
+ }
+}
+
+function makeItalic(id){
+ var eleStyle = xoopsGetElementById(id).style;
+ if (eleStyle.fontStyle != "italic") {
+ eleStyle.fontStyle = "italic";
+ } else {
+ eleStyle.fontStyle = "normal";
+ }
+}
+
+function makeUnderline(id){
+ var eleStyle = xoopsGetElementById(id).style;
+ if (eleStyle.textDecoration != "underline") {
+ eleStyle.textDecoration = "underline";
+ } else {
+ eleStyle.textDecoration = "none";
+ }
+}
+
+function makeLineThrough(id){
+ var eleStyle = xoopsGetElementById(id).style;
+ if (eleStyle.textDecoration != "line-through") {
+ eleStyle.textDecoration = "line-through";
+ } else {
+ eleStyle.textDecoration = "none";
+ }
+}
+
+function appendSelectOption(selectMenuId, optionName, optionValue){
+ var selectMenu = xoopsGetElementById(selectMenuId);
+ var newoption = new Option(optionName, optionValue);
+ newoption.selected = true;
+ selectMenu.options[selectMenu.options.length] = newoption;
+}
+
+function disableElement(target){
+ var targetDom = xoopsGetElementById(target);
+ if (targetDom.disabled != true) {
+ targetDom.disabled = true;
+ } else {
+ targetDom.disabled = false;
+ }
+}
+function xoopsCheckAll(formname, switchid) {
+ var ele = document.forms[formname].elements;
+ var switch_cbox = xoopsGetElementById(switchid);
+ for (var i = 0; i < ele.length; i++) {
+ var e = ele[i];
+ if ( (e.name != switch_cbox.name) && (e.type == 'checkbox') ) {
+ e.checked = switch_cbox.checked;
+ }
+ }
+}
+
+function xoopsCheckGroup(formname, switchid, groupid) {
+ var ele = document.forms[formname].elements;
+ var switch_cbox = xoopsGetElementById(switchid);
+ for (var i = 0; i < ele.length; i++) {
+ var e = ele[i];
+ if ( (e.type == 'checkbox') && (e.id == groupid) ) {
+ e.checked = switch_cbox.checked;
+ e.click(); e.click(); // Click to activate subgroups
+ // Twice so we don't reverse effect
+ }
+ }
+}
+
+function xoopsCheckAllElements(elementIds, switchId) {
+ var switch_cbox = xoopsGetElementById(switchId);
+ for (var i = 0; i < elementIds.length; i++) {
+ var e = xoopsGetElementById(elementIds[i]);
+ if ((e.name != switch_cbox.name) && (e.type == 'checkbox')) {
+ e.checked = switch_cbox.checked;
+ }
+ }
+}
+
+function xoopsSavePosition(id)
+{
+ var textareaDom = xoopsGetElementById(id);
+ if (textareaDom.createTextRange) {
+ textareaDom.caretPos = document.selection.createRange().duplicate();
+ }
+}
+
+function xoopsInsertText(domobj, text)
+{
+ if(domobj.selectionEnd){
+ var str1=domobj.value.substring(0, domobj.selectionStart);
+ var str2=domobj.value.substring(domobj.selectionEnd, domobj.value.length);
+ domobj.value = str1 + text + str2;
+ domobj.selectionEnd = domobj.selectionStart;
+ domobj.blur();
+ }else
+ if (domobj.createTextRange && domobj.caretPos){
+ var caretPos = domobj.caretPos;
+ caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
+ } else if (domobj.getSelection && domobj.caretPos){
+ var caretPos = domobj.caretPos;
+ caretPos.text = caretPos.text.charat(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
+ } else {
+ domobj.value = domobj.value + text;
+ }
+}
+
+function xoopsCodeSmilie(id, smilieCode) {
+ var revisedMessage;
+ var textareaDom = xoopsGetElementById(id);
+ xoopsInsertText(textareaDom, smilieCode);
+ textareaDom.focus();
+ return;
+}
+
+function showImgSelected(imgId, selectId, imgDir, extra, xoopsUrl) {
+ if (xoopsUrl == null) {
+ xoopsUrl = "./";
+ }
+ imgDom = xoopsGetElementById(imgId);
+ selectDom = xoopsGetElementById(selectId);
+ if (selectDom.options[selectDom.selectedIndex].value != "") {
+ imgDom.src = xoopsUrl + "/"+ imgDir + "/" + selectDom.options[selectDom.selectedIndex].value + extra;
+ } else {
+ imgDom.src = xoopsUrl + "/images/blank.gif";
+ }
+}
+
+function xoopsCodeUrl(id, enterUrlPhrase, enterWebsitePhrase){
+ if (enterUrlPhrase == null) {
+ enterUrlPhrase = "Enter the URL of the link you want to add:";
+ }
+ if (enterWebsitePhrase == null) {
+ enterWebsitePhrase = "Enter the web site title:";
+ }
+ var text = prompt(enterUrlPhrase, "");
+ var domobj = xoopsGetElementById(id);
+ if ( text != null && text != "" ) {
+ var selection = getSelect(id);
+ if (selection.length>0){
+ var text2 = prompt(enterWebsitePhrase, selection);
+ }else {
+ var text2 = prompt(enterWebsitePhrase, "");
+ }
+ if ( text2 != null ) {
+ if ( text2 == "" ) {
+ var result = "[url=" + text + "]" + text + "[/url]";
+ } else {
+ var pos = text2.indexOf(unescape('%00'));
+ if(0 < pos){
+ text2 = text2.substr(0,pos);
+ }
+ var result = "[url=" + text + "]" + text2 + "[/url]";
+ }
+ xoopsInsertText(domobj, result);
+ }
+ }
+ domobj.focus();
+}
+
+function xoopsCodeImg(id, enterImgUrlPhrase, enterImgPosPhrase, imgPosRorLPhrase, errorImgPosPhrase){
+ if (enterImgUrlPhrase == null) {
+ enterImgUrlPhrase = "Enter the URL of the image you want to add:";
+ }
+ var selection = getSelect(id);
+ if (selection.length>0){
+ var text = prompt(enterImgUrlPhrase, selection);
+ }else {
+ var text = prompt(enterImgUrlPhrase, "");
+ }
+ var domobj = xoopsGetElementById(id);
+ if ( text != null && text != "" ) {
+ if (enterImgPosPhrase == null) {
+ enterImgPosPhrase = "Now, enter the position of the image.";
+ }
+ if (imgPosRorLPhrase == null) {
+ imgPosRorLPhrase = "'R' or 'r' for right, 'L' or 'l' for left, or leave it blank.";
+ }
+ if (errorImgPosPhrase == null) {
+ errorImgPosPhrase = "ERROR! Enter the position of the image:";
+ }
+ var text2 = prompt(enterImgPosPhrase + "\n" + imgPosRorLPhrase, "");
+ while ( ( text2 != "" ) && ( text2 != "r" ) && ( text2 != "R" ) && ( text2 != "l" ) && ( text2 != "L" ) && ( text2 != null ) ) {
+ text2 = prompt(errorImgPosPhrase + "\n" + imgPosRorLPhrase,"");
+ }
+ if ( text2 == "l" || text2 == "L" ) {
+ text2 = " align=left";
+ } else if ( text2 == "r" || text2 == "R" ) {
+ text2 = " align=right";
+ } else {
+ text2 = "";
+ }
+ var result = "[img" + text2 + "]" + text + "[/img]";
+ xoopsInsertText(domobj, result);
+ }
+ domobj.focus();
+}
+
+function xoopsCodeEmail(id, enterEmailPhrase){
+ if (enterEmailPhrase == null) {
+ enterEmailPhrase = "Enter the email address you want to add:";
+ }
+ var selection = getSelect(id);
+ if (selection.length>0){
+ var text = prompt(enterEmailPhrase, selection);
+ }else {
+ var text = prompt(enterEmailPhrase, "");
+ }
+ var domobj = xoopsGetElementById(id);
+ if ( text != null && text != "" ) {
+ var result = "[email]" + text + "[/email]";
+ xoopsInsertText(domobj, result);
+ }
+ domobj.focus();
+}
+
+function xoopsCodeQuote(id, enterQuotePhrase){
+ if (enterQuotePhrase == null) {
+ enterQuotePhrase = "Enter the text that you want to be quoted:";
+ }
+ var selection = getSelect(id);
+ if (selection.length>0){
+ var text = prompt(enterQuotePhrase, selection);
+ }else {
+ var text = prompt(enterQuotePhrase, "");
+ }
+ var domobj = xoopsGetElementById(id);
+ if ( text != null && text != "" ) {
+ var pos = text.indexOf(unescape('%00'));
+ if(0 < pos){
+ text = text.substr(0,pos);
+ }
+ var result = "[quote]" + text + "[/quote]";
+ xoopsInsertText(domobj, result);
+ }
+ domobj.focus();
+}
+
+function xoopsCodeCode(id, enterCodePhrase){
+ if (enterCodePhrase == null) {
+ enterCodePhrase = "Enter the codes that you want to add.";
+ }
+ var selection = getSelect(id);
+ if (selection.length>0){
+ var text = prompt(enterCodePhrase, selection);
+ }else {
+ var text = prompt(enterCodePhrase, "");
+ }
+ var domobj = xoopsGetElementById(id);
+ if ( text != null && text != "" ) {
+ var result = "[code]" + text + "[/code]";
+ xoopsInsertText(domobj, result);
+ }
+ domobj.focus();
+}
+
+function xoopsCodeText(id, hiddentext, enterTextboxPhrase){
+ var textareaDom = xoopsGetElementById(id);
+ var textDom = xoopsGetElementById(id + "Addtext");
+ var fontDom = xoopsGetElementById(id + "Font");
+ var colorDom = xoopsGetElementById(id + "Color");
+ var sizeDom = xoopsGetElementById(id + "Size");
+ var xoopsHiddenTextDomStyle = xoopsGetElementById(hiddentext).style;
+ var selection = getSelect(id);
+ if (selection.length>0){
+ var textDomValue = selection;
+ }else {
+ var textDomValue = textDom.value;
+ }
+ var fontDomValue = fontDom.options[fontDom.options.selectedIndex].value;
+ var colorDomValue = colorDom.options[colorDom.options.selectedIndex].value;
+ var sizeDomValue = sizeDom.options[sizeDom.options.selectedIndex].value;
+ if ( textDomValue == "" ) {
+ if (enterTextboxPhrase == null) {
+ enterTextboxPhrase = "Please input text into the textbox.";
+ }
+ alert(enterTextboxPhrase);
+ textDom.focus();
+ } else {
+ if ( fontDomValue != "FONT") {
+ textDomValue = "[font=" + fontDomValue + "]" + textDomValue + "[/font]";
+ fontDom.options[0].selected = true;
+ }
+ if ( colorDomValue != "COLOR") {
+ textDomValue = "[color=" + colorDomValue + "]" + textDomValue + "[/color]";
+ colorDom.options[0].selected = true;
+ }
+ if ( sizeDomValue != "SIZE") {
+ textDomValue = "[size=" + sizeDomValue + "]" + textDomValue + "[/size]";
+ sizeDom.options[0].selected = true;
+ }
+ if (xoopsHiddenTextDomStyle.fontWeight == "bold" || xoopsHiddenTextDomStyle.fontWeight == "700") {
+ textDomValue = "[b]" + textDomValue + "[/b]";
+ xoopsHiddenTextDomStyle.fontWeight = "normal";
+ }
+ if (xoopsHiddenTextDomStyle.fontStyle == "italic") {
+ textDomValue = "[i]" + textDomValue + "[/i]";
+ xoopsHiddenTextDomStyle.fontStyle = "normal";
+ }
+ if (xoopsHiddenTextDomStyle.textDecoration == "underline") {
+ textDomValue = "[u]" + textDomValue + "[/u]";
+ xoopsHiddenTextDomStyle.textDecoration = "none";
+ }
+ if (xoopsHiddenTextDomStyle.textDecoration == "line-through") {
+ textDomValue = "[d]" + textDomValue + "[/d]";
+ xoopsHiddenTextDomStyle.textDecoration = "none";
+ }
+ xoopsInsertText(textareaDom, textDomValue);
+ textDom.value = "";
+ xoopsHiddenTextDomStyle.color = "#000000";
+ xoopsHiddenTextDomStyle.fontFamily = "";
+ xoopsHiddenTextDomStyle.fontSize = "12px";
+ xoopsHiddenTextDomStyle.visibility = "hidden";
+ textareaDom.focus();
+ }
+}
+
+function xoopsValidate(subjectId, textareaId, submitId, plzCompletePhrase, msgTooLongPhrase, allowedCharPhrase, currCharPhrase) {
+ var maxchars = 65535;
+ var subjectDom = xoopsGetElementById(subjectId);
+ var textareaDom = xoopsGetElementById(textareaId);
+ var submitDom = xoopsGetElementById(submitId);
+ if (textareaDom.value == "" || subjectDom.value == "") {
+ if (plzCompletePhrase == null) {
+ plzCompletePhrase = "Please complete the subject and message fields.";
+ }
+ alert(plzCompletePhrase);
+ return false;
+ }
+ if (maxchars != 0) {
+ if (textareaDom.value.length > maxchars) {
+ if (msgTooLongPhrase == null) {
+ msgTooLongPhrase = "Your message is too long.";
+ }
+ if (allowedCharPhrase == null) {
+ allowedCharPhrase = "Allowed max chars length: ";
+ }
+ if (currCharPhrase == null) {
+ currCharPhrase = "Current chars length: ";
+ }
+ alert(msgTooLongPhrase + "\n\n" + allowedCharPhrase + maxchars + "\n" + currCharPhrase + textareaDom.value.length + "");
+ textareaDom.focus();
+ return false;
+ } else {
+ submitDom.disabled = true;
+ return true;
+ }
+ } else {
+ submitDom.disabled = true;
+ return true;
+ }
+}
+
+function getSelect(id){
+ if (window.getSelection){
+ ele = document.getElementById(id);
+ var selection = ele.value.substring(
+ ele.selectionStart, ele.selectionEnd
+ );
+ }
+ else if (document.getSelection){
+ var selection = document.getSelection();
+ }
+ else if (document.selection){
+ var selection = document.selection.createRange().text;
+ }
+ else{
+ var selection = null;
+ }
+ return selection;
+}
Added: XoopsCore/branches/2.2.x/2.2-main/html/include/xoopscodes.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/include/xoopscodes.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/include/xoopscodes.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,107 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+
+/*
+* displayes xoopsCode buttons and target textarea to which xoopscodes are inserted
+* $textarea_id is a unique id of the target textarea
+*/
+function xoopsCodeTarea($textarea_id, $cols=60, $rows=15, $suffix=null)
+{
+ $hiddentext = isset($suffix) ? 'xoopsHiddenText'.trim($suffix) : 'xoopsHiddenText';
+ //Hack for url, email ...., the anchor is for having a link on [_More...]
+ echo "<a name='moresmiley'></a><img src='".XOOPS_URL."/images/url.gif' alt='url' onmouseover='style.cursor=\"hand\"' onclick='xoopsCodeUrl(\"$textarea_id\", \"".htmlspecialchars(_ENTERURL, ENT_QUOTES)."\", \"".htmlspecialchars(_ENTERWEBTITLE, ENT_QUOTES)."\");'/> <img src='".XOOPS_URL."/images/email.gif' alt='email' onmouseover='style.cursor=\"hand\"' onclick='xoopsCodeEmail(\"$textarea_id\", \"".htmlspecialchars(_ENTEREMAIL, ENT_QUOTES)."\");' /> <img src='".XOOPS_URL."/images/imgsrc.gif' alt='imgsrc' onmouseover='style.cursor=\"hand\"' onclick='xoopsCodeImg(\"$textarea_id\", \"".htmlspecialchars(_ENTERIMGURL, ENT_QUOTES)."\", \"".htmlspecialchars(_ENTERIMGPOS, ENT_QUOTES)."\", \"".htmlspecialchars(_IMGPOSRORL, ENT_QUOTES)."\", \"".htmlspecialchars(_ERRORIMGPOS, ENT_QUOTES)."\");' /> <img src='".XOOPS_URL."/images/image.gif' alt='image' onmouseover='style.cursor=\"hand\"' onclick='openWithSelfMain(\"".XOOPS_URL."/imagemanager.php?target=".$textarea_id."\",\!
"imgmanager\",400,430);' /> <img src='".XOOPS_URL."/images/code.gif' alt='code' onmouseover='style.cursor=\"hand\"' onclick='xoopsCodeCode(\"$textarea_id\", \"".htmlspecialchars(_ENTERCODE, ENT_QUOTES)."\");' /> <img src='".XOOPS_URL."/images/quote.gif' alt='quote' onmouseover='style.cursor=\"hand\"' onclick='xoopsCodeQuote(\"$textarea_id\");'/><br />\n";
+
+ $sizearray = array("xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large");
+ echo "<select id='".$textarea_id."Size' onchange='setVisible(\"xoopsHiddenText\");setElementSize(\"".$hiddentext."\",this.options[this.selectedIndex].value);'>\n";
+ echo "<option value='SIZE'>"._SIZE."</option>\n";
+ foreach ( $sizearray as $size ) {
+ echo "<option value='$size'>$size</option>\n";
+ }
+ echo "</select>\n";
+
+ $fontarray = array("Arial", "Courier", "Georgia", "Helvetica", "Impact", "Verdana");
+ echo "<select id='".$textarea_id."Font' onchange='setVisible(\"xoopsHiddenText\");setElementFont(\"".$hiddentext."\",this.options[this.selectedIndex].value);'>\n";
+ echo "<option value='FONT'>"._FONT."</option>\n";
+ foreach ( $fontarray as $font ) {
+ echo "<option value='$font'>$font</option>\n";
+ }
+ echo "</select>\n";
+
+ $colorarray = array("00", "33", "66", "99", "CC", "FF");
+ echo "<select id='".$textarea_id."Color' onchange='setVisible(\"xoopsHiddenText\");setElementColor(\"".$hiddentext."\",this.options[this.selectedIndex].value);'>\n";
+ echo "<option value='COLOR'>"._COLOR."</option>\n";
+ foreach ( $colorarray as $color1 ) {
+ foreach ( $colorarray as $color2 ) {
+ foreach ( $colorarray as $color3 ) {
+ echo "<option value='".$color1.$color2.$color3."' style='background-color:#".$color1.$color2.$color3.";color:#".$color1.$color2.$color3.";'>#".$color1.$color2.$color3."</option>\n";
+ }
+ }
+ }
+ echo "</select><span id='".$hiddentext."'>"._EXAMPLE."</span>\n";
+
+ echo "<br />\n";
+ //Hack smilies move for bold, italic ...
+ $areacontent = isset( $GLOBALS[$textarea_id] ) ? $GLOBALS[$textarea_id] : '';
+ echo "<img src='".XOOPS_URL."/images/bold.gif' alt='bold' onmouseover='style.cursor=\"hand\"' onclick='setVisible(\"".$hiddentext."\");makeBold(\"".$hiddentext."\");' /> <img src='".XOOPS_URL."/images/italic.gif' alt='italic' onmouseover='style.cursor=\"hand\"' onclick='setVisible(\"".$hiddentext."\");makeItalic(\"".$hiddentext."\");' /> <img src='".XOOPS_URL."/images/underline.gif' alt='underline' onmouseover='style.cursor=\"hand\"' onclick='setVisible(\"".$hiddentext."\");makeUnderline(\"".$hiddentext."\");'/> <img src='".XOOPS_URL."/images/linethrough.gif' alt='linethrough' onmouseover='style.cursor=\"hand\"' onclick='setVisible(\"".$hiddentext."\");makeLineThrough(\"".$hiddentext."\");' /> <input type='text' id='".$textarea_id."Addtext' size='20' /> <input type='button' onclick='xoopsCodeText(\"$textarea_id\", \"".$hiddentext."\", \"".htmlspecialchars(_ENTERTEXTBOX, ENT_QUOTES)."\")' value='"._ADD."' /><br /><br /><textarea id='".$textarea_i!
d."' name='".$textarea_id."' cols='$cols' rows='$rows'>".$areacontent."</textarea><br />\n";
+ //Fin du hack
+}
+
+/*
+* Displays smilie image buttons used to insert smilie codes to a target textarea in a form
+* $textarea_id is a unique of the target textarea
+*/
+function xoopsSmilies($textarea_id)
+{
+ $myts =& MyTextSanitizer::getInstance();
+ $smiles =& $myts->getSmileys();
+ if (empty($smileys)) {
+ $db =& Database::getInstance();
+ if ($result = $db->query('SELECT * FROM '.$db->prefix('smiles').' WHERE display=1')) {
+ while ($smiles = $db->fetchArray($result)) {
+ //hack smilies move for the smilies !!
+ echo "<img src='".XOOPS_UPLOAD_URL."/".htmlspecialchars($smiles['smile_url'])."' border='0' onmouseover='style.cursor=\"hand\"' alt='' onclick='xoopsCodeSmilie(\"".$textarea_id."\", \" ".$smiles['code']." \");' />";
+ //fin du hack
+ }
+ }
+ } else {
+ $count = count($smiles);
+ for ($i = 0; $i < $count; $i++) {
+ if ($smiles[$i]['display'] == 1) {
+ //hack bis
+ echo "<img src='".XOOPS_UPLOAD_URL."/".$myts->oopsHtmlSpecialChars($smiles['smile_url'])."' border='0' alt='' onclick='xoopsCodeSmilie(\"".$textarea_id."\", \" ".$smiles[$i]['code']." \");' onmouseover='style.cursor=\"hand\"' />";
+ //fin du hack
+ }
+ }
+ }
+ //hack for more
+ echo " [<a href='#moresmiley' onmouseover='style.cursor=\"hand\"' onclick='openWithSelfMain(\"".XOOPS_URL."/misc.php?action=showpopups&type=smilies&target=".$textarea_id."\",\"smilies\",300,475);'>"._MORE."</a>]";
+} //fin du hack
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/include/xoopscodes.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/index.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/index.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/index.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,46 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+/**
+ * Catch new users and redirect them to the start page, if any
+ * @copyright © 2000 xoops.org
+ **/
+
+/**
+ * redirects to installation, if xoops is not installed yet
+ **/
+require "mainfile.php";
+
+//check if start page is defined
+if ( isset($xoopsConfig['startpage']) && $xoopsConfig['startpage'] != "" && $xoopsConfig['startpage'] != "--" ) {
+ header('Location: '.XOOPS_URL.'/modules/'.$xoopsConfig['startpage'].'/');
+ exit();
+} else {
+ $xoopsOption['show_cblock'] =1;
+ require "header.php";
+ require "footer.php";
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/index.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/class/cachemanager.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/install/class/cachemanager.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/install/class/cachemanager.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,64 @@
+<?php
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+/**
+* cache_manager for XOOPS installer
+*
+* @author Haruki Setoyama <haruki at planewave.org>
+* @version $Id$
+* @access public
+**/
+class cache_manager {
+
+ var $s_files = array();
+ var $f_files = array();
+
+ function write($file, $source){
+ if (false != $fp = fopen(XOOPS_CACHE_PATH.'/'.$file, 'w')) {
+ fwrite($fp, $source);
+ fclose($fp);
+ $this->s_files[] = $file;
+ }else{
+ $this->f_files[] = $file;
+ }
+ }
+
+ function report(){
+ $content = "<table align='center'><tr><td align='left'>\n";
+ foreach($this->s_files as $val){
+ $content .= _OKIMG.sprintf(_INSTALL_L123, "<b>$val</b>")."<br />\n";
+ }
+ foreach($this->f_files as $val){
+ $content .= _NGIMG.sprintf(_INSTALL_L124, "<b>$val</b>")."<br />\n";
+ }
+ $content .= "</td></tr></table>\n";
+ return $content;
+ }
+
+}
+
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/class/cachemanager.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/class/dbmanager.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/install/class/dbmanager.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/install/class/dbmanager.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,244 @@
+<?php
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+include_once XOOPS_ROOT_PATH.'/class/logger.php';
+include_once XOOPS_ROOT_PATH.'/class/database/databasefactory.php';
+include_once XOOPS_ROOT_PATH.'/class/database/'.XOOPS_DB_TYPE.'database.php';
+include_once XOOPS_ROOT_PATH.'/class/database/sqlutility.php';
+
+/**
+* database manager for XOOPS installer
+*
+* @author Haruki Setoyama <haruki at planewave.org>
+* @version $Id$
+* @access public
+**/
+class db_manager {
+
+ var $s_tables = array();
+ var $f_tables = array();
+ var $db;
+
+ function db_manager(){
+ $this->db = XoopsDatabaseFactory::getDatabase();
+ $this->db->setPrefix(XOOPS_DB_PREFIX);
+ $this->db->setLogger(XoopsLogger::instance());
+ }
+
+ function isConnectable(){
+ return ($this->db->connect(false) != false) ? true : false;
+ }
+
+ function dbExists(){
+ return ($this->db->connect() != false) ? true : false;
+ }
+
+ function createDB()
+ {
+ $this->db->connect(false);
+
+ $result = $this->db->query("CREATE DATABASE ".XOOPS_DB_NAME);
+
+ return ($result != false) ? true : false;
+ }
+
+ function queryFromFile($sql_file_path){
+ $tables = array();
+
+ if (!file_exists($sql_file_path)) {
+ return false;
+ }
+ $sql_query = trim(fread(fopen($sql_file_path, 'r'), filesize($sql_file_path)));
+ SqlUtility::splitMySqlFile($pieces, $sql_query);
+ $this->db->connect();
+ foreach ($pieces as $piece) {
+ $piece = trim($piece);
+ // [0] contains the prefixed query
+ // [4] contains unprefixed table name
+ $prefixed_query = SqlUtility::prefixQuery($piece, $this->db->prefix());
+ if ($prefixed_query != false ) {
+ $table = $this->db->prefix($prefixed_query[4]);
+ if($prefixed_query[1] == 'CREATE TABLE'){
+ if ($this->db->query($prefixed_query[0]) != false) {
+ if(! isset($this->s_tables['create'][$table])){
+ $this->s_tables['create'][$table] = 1;
+ }
+ }else{
+ if(! isset($this->f_tables['create'][$table])){
+ $this->f_tables['create'][$table] = 1;
+ }
+ }
+ }
+ elseif($prefixed_query[1] == 'INSERT INTO'){
+ if ($this->db->query($prefixed_query[0]) != false) {
+ if(! isset($this->s_tables['insert'][$table])){
+ $this->s_tables['insert'][$table] = 1;
+ }else{
+ $this->s_tables['insert'][$table]++;
+ }
+ }else{
+ if(! isset($this->f_tables['insert'][$table])){
+ $this->f_tables['insert'][$table] = 1;
+ }else{
+ $this->f_tables['insert'][$table]++;
+ }
+ }
+ }elseif($prefixed_query[1] == 'ALTER TABLE'){
+ if ($this->db->query($prefixed_query[0]) != false) {
+ if(! isset($this->s_tables['alter'][$table])){
+ $this->s_tables['alter'][$table] = 1;
+ }
+ }else{
+ if(! isset($this->s_tables['alter'][$table])){
+ $this->f_tables['alter'][$table] = 1;
+ }
+ }
+ }elseif($prefixed_query[1] == 'DROP TABLE'){
+ if ($this->db->query('DROP TABLE '.$table) != false) {
+ if(! isset($this->s_tables['drop'][$table])){
+ $this->s_tables['drop'][$table] = 1;
+ }
+ }else{
+ if(! isset($this->s_tables['drop'][$table])){
+ $this->f_tables['drop'][$table] = 1;
+ }
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+ function report(){
+ $content = "<table align='center'><tr><td align='left'>\n";
+ if (isset($this->s_tables['create'])) {
+ foreach($this->s_tables['create'] as $key => $val){
+ $content .= _OKIMG.sprintf(_INSTALL_L45, "<b>$key</b>")."<br />\n";
+ }
+ }
+ if (isset($this->s_tables['insert'])) {
+ foreach($this->s_tables['insert'] as $key => $val){
+ $content .= _OKIMG.sprintf(_INSTALL_L119, $val, "<b>$key</b>")."<br />\n";
+ }
+ }
+ if (isset($this->s_tables['alter'])) {
+ foreach($this->s_tables['alter'] as $key => $val){
+ $content .= _OKIMG.sprintf(_INSTALL_L133, "<b>$key</b>")."<br />\n";
+ }
+ }
+ if (isset($this->s_tables['drop'])) {
+ foreach($this->s_tables['drop'] as $key => $val){
+ $content .= _OKIMG.sprintf(_INSTALL_L163, "<b>$key</b>")."<br />\n";
+ }
+ }
+ $content .= "<br />\n";
+ if (isset($this->f_tables['create'])) {
+ foreach($this->f_tables['create'] as $key => $val){
+ $content .= _NGIMG.sprintf(_INSTALL_L118, "<b>$key</b>")."<br />\n";
+ }
+ }
+ if (isset($this->f_tables['insert'])) {
+ foreach($this->f_tables['insert'] as $key => $val){
+ $content .= _NGIMG.sprintf(_INSTALL_L120, $val, "<b>$key</b>")."<br />\n";
+ }
+ }
+ if (isset($this->f_tables['alter'])) {
+ foreach($this->f_tables['alter'] as $key => $val){
+ $content .= _NGIMG.sprintf(_INSTALL_L134, "<b>$key</b>")."<br />\n";
+ }
+ }
+ if (isset($this->f_tables['drop'])) {
+ foreach($this->f_tables['drop'] as $key => $val){
+ $content .= _NGIMG.sprintf(_INSTALL_L164, "<b>$key</b>")."<br />\n";
+ }
+ }
+ $content .= "</td></tr></table>\n";
+ return $content;
+ }
+
+ function query($sql){
+ $this->db->connect();
+ return $this->db->query($sql);
+ }
+
+ function prefix($table){
+ $this->db->connect();
+ return $this->db->prefix($table);
+ }
+
+ function fetchArray($ret){
+ $this->db->connect();
+ return $this->db->fetchArray($ret);
+ }
+
+ function insert($table, $query){
+ $this->db->connect();
+ $table = $this->db->prefix($table);
+ $query = 'INSERT INTO '.$table.' '.$query;
+ if(!$this->db->queryF($query)){
+ if(!isset($this->f_tables['insert'][$table])){
+ $this->f_tables['insert'][$table] = 1;
+ }else{
+ $this->f_tables['insert'][$table]++;
+ }
+ return false;
+ }else{
+ if(!isset($this->s_tables['insert'][$table])){
+ $this->s_tables['insert'][$table] = 1;
+ }else{
+ $this->s_tables['insert'][$table]++;
+ }
+ return $this->db->getInsertId();
+ }
+ }
+
+ function isError(){
+ return (isset($this->f_tables)) ? true : false;
+ }
+
+ function deleteTables($tables){
+ $deleted = array();
+ $this->db->connect();
+ foreach ($tables as $key => $val) {
+ if(! $this->db->query("DROP TABLE ".$this->db->prefix($key))){
+ $deleted[] = $ct;
+ }
+ }
+ return $deleted;
+ }
+
+ function tableExists($table){
+ $table = trim($table);
+ $ret = false;
+ if ($table != '') {
+ $this->db->connect();
+ $sql = 'SELECT * FROM '.$this->db->prefix($table);
+ $ret = (false != $this->db->query($sql)) ? true : false;
+ }
+ return $ret;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/class/dbmanager.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/class/mainfilemanager.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/install/class/mainfilemanager.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/install/class/mainfilemanager.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,120 @@
+<?php
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+/**
+* mainfile manager for XOOPS installer
+*
+* @author Haruki Setoyama <haruki at planewave.org>
+* @version $Id$
+* @access public
+**/
+class mainfile_manager {
+
+ var $path = '../mainfile.php';
+ var $distfile = '../mainfile.dist.php';
+ var $rewrite = array();
+
+ var $report = '';
+ var $error = false;
+
+ function mainfile_manager(){
+ //
+ }
+
+ function setRewrite($def, $val){
+ $this->rewrite[$def] = $val;
+ }
+
+ function copyDistFile(){
+ if ( ! copy($this->distfile, $this->path) ) {
+ $this->report .= _NGIMG.sprintf(_INSTALL_L126, "<b>".$this->path."</b>")."<br />\n";
+ $this->error = true;
+ return false;
+ }
+ $this->report .= _OKIMG.sprintf(_INSTALL_L125, "<b>".$this->path."</b>", "<b>".$this->distfile."</b>")."<br />\n";
+ return true;
+ }
+
+ function doRewrite() {
+ clearstatcache();
+ if ( ! $file = fopen($this->path,"r") ) {
+ $this->error = true;
+ return false;
+ }
+ $content = fread($file, filesize($this->path) );
+ fclose($file);
+
+ foreach($this->rewrite as $key => $val){
+ $val = str_replace('$', '\\$', $val);
+ if(is_int($val) &&
+ preg_match("/(define\()([\"'])(".$key.")\\2,\s*([0-9]+)\s*\)/",$content)){
+
+ $content = preg_replace("/(define\()([\"'])(".$key.")\\2,\s*([0-9]+)\s*\)/"
+ , "define('".$key."', ".$val.")"
+ , $content);
+ $this->report .= _OKIMG.sprintf(_INSTALL_L121, "<b>$key</b>", $val)."<br />\n";
+ }
+ elseif(preg_match("/(define\()([\"'])(".$key.")\\2,\s*([\"'])(.*?)\\4\s*\)/",$content)){
+ $content = preg_replace("/(define\()([\"'])(".$key.")\\2,\s*([\"'])(.*?)\\4\s*\)/"
+ , "define('".$key."', '".$val."')"
+ , $content);
+ $this->report .= _OKIMG.sprintf(_INSTALL_L121, "<b>$key</b>", $val)."<br />\n";
+
+ }else{
+ $this->error = true;
+ $this->report .= _NGIMG.sprintf(_INSTALL_L122, "<b>$key</b>", $val)."<br />\n";
+ }
+ }
+
+ if ( !$file = fopen($this->path,"w") ) {
+ $this->error = true;
+ return false;
+ }
+
+ if ( fwrite($file,$content) == -1 ) {
+ fclose($file);
+ $this->error = true;
+ return false;
+ }
+
+ fclose($file);
+
+ return true;
+ }
+
+ function report(){
+ $content = "<table align='center'><tr><td align='left'>\n";
+ $content .= $this->report;
+ $content .= "</td></tr></table>\n";
+ return $content;
+ }
+
+ function error(){
+ return $this->error;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/class/mainfilemanager.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/class/settingmanager.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/install/class/settingmanager.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/install/class/settingmanager.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,297 @@
+<?php
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+include_once './class/textsanitizer.php';
+
+/**
+* setting manager for XOOPS installer
+*
+* @author Haruki Setoyama <haruki at planewave.org>
+* @version $Id$
+* @access public
+**/
+class setting_manager {
+
+ var $database;
+ var $dbhost;
+ var $dbuname;
+ var $dbpass;
+ var $dbname;
+ var $prefix;
+ var $db_pconnect;
+ var $root_path;
+ var $xoops_url;
+
+ var $sanitizer;
+
+ function setting_manager($post=false){
+
+ $this->sanitizer =& TextSanitizer::getInstance();
+ if($post){
+ $this->readPost();
+ }else{
+ $this->database = 'mysql';
+ $this->dbhost = 'localhost';
+ $this->db_pconnect = 0;
+
+ $this->root_path = str_replace("\\","/",getcwd()); // "
+ $this->root_path = str_replace("/install", "", $this->root_path);
+
+ $filepath = (! empty($_SERVER['REQUEST_URI']))
+ ? dirname($_SERVER['REQUEST_URI'])
+ : dirname($_SERVER['SCRIPT_NAME']);
+
+ $filepath = str_replace("\\", "/", $filepath); // "
+ $filepath = str_replace("/install", "", $filepath);
+ if ( substr($filepath, 0, 1) == "/" ) {
+ $filepath = substr($filepath,1);
+ }
+ if ( substr($filepath, -1) == "/" ) {
+ $filepath = substr($filepath, 0, -1);
+ }
+ $protocol = isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://';
+ $this->xoops_url = (!empty($filepath)) ? $protocol.$_SERVER['HTTP_HOST']."/".$filepath : $protocol.$_SERVER['HTTP_HOST'];
+ //$this->xoops_url = (!empty($filepath)) ? "/".$filepath : $protocol.$_SERVER['HTTP_HOST'];
+ $this->prefix = $this->generatePrefix();
+ }
+ }
+
+ function readPost(){
+ if(isset($_POST['database']))
+ $this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
+ if(isset($_POST['dbhost']))
+ $this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
+ if(isset($_POST['dbuname']))
+ $this->dbuname = $this->sanitizer->stripSlashesGPC($_POST['dbuname']);
+ if(isset($_POST['dbpass']))
+ $this->dbpass = $this->sanitizer->stripSlashesGPC($_POST['dbpass']);
+ if(isset($_POST['dbname']))
+ $this->dbname = $this->sanitizer->stripSlashesGPC($_POST['dbname']);
+ if(isset($_POST['prefix']))
+ $this->prefix = $this->sanitizer->stripSlashesGPC($_POST['prefix']);
+ if(isset($_POST['db_pconnect']))
+ $this->db_pconnect = intval($_POST['db_pconnect']) > 0 ? 1 : 0;
+ if(isset($_POST['root_path']))
+ $this->root_path = $this->sanitizer->stripSlashesGPC($_POST['root_path']);
+ if(isset($_POST['xoops_url']))
+ $this->xoops_url = $this->sanitizer->stripSlashesGPC($_POST['xoops_url']);
+ }
+
+ function readConstant(){
+ if(defined('XOOPS_DB_TYPE'))
+ $this->database = XOOPS_DB_TYPE;
+ if(defined('XOOPS_DB_HOST'))
+ $this->dbhost = XOOPS_DB_HOST;
+ if(defined('XOOPS_DB_USER'))
+ $this->dbuname = XOOPS_DB_USER;
+ if(defined('XOOPS_DB_PASS'))
+ $this->dbpass = XOOPS_DB_PASS;
+ if(defined('XOOPS_DB_NAME'))
+ $this->dbname = XOOPS_DB_NAME;
+ if(defined('XOOPS_DB_PREFIX'))
+ $this->prefix = XOOPS_DB_PREFIX;
+ if(defined('XOOPS_DB_PCONNECT'))
+ $this->db_pconnect = intval(XOOPS_DB_PCONNECT) > 0 ? 1 : 0;
+ if(defined('XOOPS_ROOT_PATH'))
+ $this->root_path = XOOPS_ROOT_PATH;
+ if(defined('XOOPS_URL'))
+ $this->xoops_url = XOOPS_URL;
+ }
+
+ function checkData(){
+ $ret = '';
+ $error = array();
+
+ if ( empty($this->dbhost) ) {
+ $error[] = sprintf(_INSTALL_L57, _INSTALL_L27);
+ }
+ if ( empty($this->dbname) ) {
+ $error[] = sprintf(_INSTALL_L57, _INSTALL_L29);
+ }
+ if ( empty($this->prefix) ) {
+ $error[] = sprintf(_INSTALL_L57, _INSTALL_L30);
+ }
+ if ( empty($this->root_path) ) {
+ $error[] = sprintf(_INSTALL_L57, _INSTALL_L55);
+ }
+ if ( empty($this->xoops_url) ) {
+ $error[] = sprintf(_INSTALL_L57, _INSTALL_L56);
+ }
+
+ if (!empty($error)) {
+ foreach ( $error as $err ) {
+ $ret .= "<p><span style='color:#ff0000;'><b>".$err."</b></span></p>\n";
+ }
+ }
+
+ return $ret;
+ }
+
+ function editform(){
+ $ret =
+ "<table width='100%' class='outer' cellspacing='5'>
+ <tr>
+ <th colspan='2'></th>
+ </tr>
+ <tr valign='top' align='left'>
+ <td class='head'>
+ <b>"._INSTALL_L51."</b><br />
+ <span style='font-size:85%;'>"._INSTALL_L66."</span>
+ </td>
+ <td class='even'>
+ <select size='1' name='database' id='database'>";
+ $dblist = $this->getDBList();
+ foreach($dblist as $val){
+ $ret .= "<option value='$val'";
+ if($val == $this->database) $ret .= " selected='selected'";
+ $ret .= "'>$val</option>";
+ }
+ $ret .= "</select>
+ </td>
+ </tr>
+ ";
+ $ret .= $this->editform_sub(_INSTALL_L27, _INSTALL_L67, 'dbhost', $this->sanitizer->htmlSpecialChars($this->dbhost));
+ $ret .= $this->editform_sub(_INSTALL_L28, _INSTALL_L65, 'dbuname', $this->sanitizer->htmlSpecialChars($this->dbuname));
+ $ret .= $this->editform_sub(_INSTALL_L52, _INSTALL_L68, 'dbpass', $this->sanitizer->htmlSpecialChars($this->dbpass));
+ $ret .= $this->editform_sub(_INSTALL_L29, _INSTALL_L64, 'dbname', $this->sanitizer->htmlSpecialChars($this->dbname));
+ $ret .= $this->editform_sub(_INSTALL_L30, _INSTALL_L63, 'prefix', $this->sanitizer->htmlSpecialChars($this->prefix));
+
+ $ret .= "<tr valign='top' align='left'>
+ <td class='head'>
+ <b>"._INSTALL_L54."</b><br />
+ <span style='font-size:85%;'>"._INSTALL_L69."</span>
+ </td>
+ <td class='even'>
+ <input type='radio' name='db_pconnect' value='1'".($this->db_pconnect == 1 ? " checked='checked'" : "" )." />"._INSTALL_L23."
+ <input type='radio' name='db_pconnect' value='0'".($this->db_pconnect != 1 ? " checked='checked'" : "" )." />"._INSTALL_L24."
+ </td>
+ </tr>
+ ";
+
+ $ret .= $this->editform_sub(_INSTALL_L55, _INSTALL_L59, 'root_path', $this->sanitizer->htmlSpecialChars($this->root_path));
+ $ret .= $this->editform_sub(_INSTALL_L56, _INSTALL_L58, 'xoops_url', $this->sanitizer->htmlSpecialChars($this->xoops_url));
+
+ $ret .= "</table>";
+ return $ret;
+ }
+
+ function editform_sub($title, $desc, $name, $value){
+ return "<tr valign='top' align='left'>
+ <td class='head'>
+ <b>".$title."</b><br />
+ <span style='font-size:85%;'>".$desc."</span>
+ </td>
+ <td class='even'>
+ <input type='text' name='".$name."' id='".$name."' size='30' maxlength='100' value='".htmlspecialchars($value)."' />
+ </td>
+ </tr>
+ ";
+ }
+
+ function confirmForm(){
+ $yesno = empty($this->db_pconnect) ? _INSTALL_L24 : _INSTALL_L23;
+ $ret =
+ "<table border='0' cellpadding='0' cellspacing='0' valign='top' width='90%'><tr><td class='bg2'>
+ <table width='100%' border='0' cellpadding='4' cellspacing='1'>
+ <tr>
+ <td class='bg3'><b>"._INSTALL_L51."</b></td>
+ <td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->database)."</td>
+ </tr>
+ <tr>
+ <td class='bg3'><b>"._INSTALL_L27."</b></td>
+ <td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->dbhost)."</td>
+ </tr>
+ <tr>
+ <td class='bg3'><b>"._INSTALL_L28."</b></td>
+ <td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->dbuname)."</td>
+ </tr>
+ <tr>
+ <td class='bg3'><b>"._INSTALL_L52."</b></td>
+ <td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->dbpass)."</td>
+ </tr>
+ <tr>
+ <td class='bg3'><b>"._INSTALL_L29."</b></td>
+ <td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->dbname)."</td>
+ </tr>
+ <tr>
+ <td class='bg3'><b>"._INSTALL_L30."</b></td>
+ <td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->prefix)."</td>
+ </tr>
+ <tr>
+ <td class='bg3'><b>"._INSTALL_L54."</b></td>
+ <td class='bg1'>".$yesno."</td>
+ </tr>
+ <tr>
+ <td class='bg3'><b>"._INSTALL_L55."</b></td>
+ <td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->root_path)."</td>
+ </tr>
+ <tr>
+ <td class='bg3'><b>"._INSTALL_L56."</b></td>
+ <td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->xoops_url)."</td>
+ </tr>
+ </table></td></tr>
+ </table>
+ <input type='hidden' name='database' value='".$this->sanitizer->htmlSpecialChars($this->database)."' />
+ <input type='hidden' name='dbhost' value='".$this->sanitizer->htmlSpecialChars($this->dbhost)."' />
+ <input type='hidden' name='dbuname' value='".$this->sanitizer->htmlSpecialChars($this->dbuname)."' />
+ <input type='hidden' name='dbpass' value='".$this->sanitizer->htmlSpecialChars($this->dbpass)."' />
+ <input type='hidden' name='dbname' value='".$this->sanitizer->htmlSpecialChars($this->dbname)."' />
+ <input type='hidden' name='prefix' value='".$this->sanitizer->htmlSpecialChars($this->prefix)."' />
+ <input type='hidden' name='db_pconnect' value='".intval($this->db_pconnect)."' />
+ <input type='hidden' name='root_path' value='".$this->sanitizer->htmlSpecialChars($this->root_path)."' />
+ <input type='hidden' name='xoops_url' value='".$this->sanitizer->htmlSpecialChars($this->xoops_url)."' />
+ ";
+ return $ret;
+ }
+
+
+ function getDBList()
+ {
+ return array('mysql');
+ //$dirname = '../class/database/';
+ //$dirlist = array();
+ //if (is_dir($dirname) && $handle = opendir($dirname)) {
+ // while (false !== ($file = readdir($handle))) {
+ // if ( !preg_match("/^[.]{1,2}$/",$file) ) {
+ // if (strtolower($file) != 'cvs' && is_dir($dirname.$file) ) {
+ // $dirlist[$file] = strtolower($file);
+ // }
+ // }
+ // }
+ // closedir($handle);
+ // asort($dirlist);
+ // reset($dirlist);
+ //}
+ //return $dirlist;
+ }
+
+ function generatePrefix() {
+ include_once $this->root_path."/include/functions.php";
+ return xoops_makepass(5);
+ }
+}
+
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/class/settingmanager.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/class/textsanitizer.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/install/class/textsanitizer.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/install/class/textsanitizer.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,253 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (http://www.myweb.ne.jp/, http://jp.xoops.org/) //
+// Goghs Cheng (http://www.eqiao.com, http://www.devbeez.com/) //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+// This is subset and modified version of module.textsanitizer.php
+set_magic_quotes_runtime(0);
+
+class TextSanitizer
+{
+
+ /*
+ * Constructor of this class
+ * Gets allowed html tags from admin config settings
+ * <br> should not be allowed since nl2br will be used
+ * when storing data
+ */
+ function TextSanitizer()
+ {
+
+ }
+
+ function &getInstance()
+ {
+ static $instance;
+ if (!isset($instance)) {
+ $instance = new TextSanitizer();
+ }
+ return $instance;
+ }
+
+ function makeClickable( $text )
+ {
+ $patterns = array("/([^]_a-z0-9-=\"'\/])([a-z]+?):\/\/([^, \r\n\"\(\)'<>]+)/i", "/([^]_a-z0-9-=\"'\/])www\.([a-z0-9\-]+)\.([^, \r\n\"\(\)'<>]+)/i", "/([^]_a-z0-9-=\"'\/])([a-z0-9\-_.]+?)@([^, \r\n\"\(\)'<>]+)/i");
+ $replacements = array("\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>", "\\1<a href=\"http://www.\\2.\\3\" target=\"_blank\">www.\\2.\\3</a>", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>");
+ return preg_replace($patterns, $replacements, $text);
+ }
+
+ function nl2Br( $text )
+ {
+ return preg_replace("/(\015\012)|(\015)|(\012)/","<br />",$text);
+ }
+
+ function addSlashes( $text, $force = false )
+ {
+ if ( $force || !get_magic_quotes_gpc() ) {
+ return addslashes( $text );
+ }
+ return $text;
+ }
+
+ /*
+ * if magic_quotes_gpc is on, stirip back slashes
+ */
+ function stripSlashesGPC($text)
+ {
+ return ( get_magic_quotes_gpc() ? stripslashes($text) : $text );
+ }
+
+ /*
+ * for displaying data in html textbox forms
+ */
+ function htmlSpecialChars( $text )
+ {
+ return preg_replace("/&/i", '&', htmlspecialchars($text, ENT_QUOTES));
+ }
+
+ function undoHtmlSpecialChars( $text )
+ {
+ return preg_replace(array("/>/i", "/</i", "/"/i", "/'/i"), array(">", "<", "\"", "'"), $text);
+ }
+
+ /*
+ * Filters textarea form data in DB for display
+ */
+ function displayText( $text, $html = false )
+ {
+ if ( !$html ) {
+ // html not allowed
+ $text = $this->htmlSpecialChars($text);
+ }
+ $text = $this->makeClickable($text);
+ $text = $this->nl2Br($text);
+ return $text;
+ }
+
+ /*
+ * Filters textarea form data submitted for preview
+ */
+ function previewText($text, $html=false)
+ {
+ return $this->displayText( $this->stripSlashesGPC($text), $html);
+ }
+
+##################### Deprecated Methods ######################
+
+ function sanitizeForDisplay($text, $allowhtml = 0, $smiley = 1, $bbcode = 1)
+ {
+ if ( $allowhtml == 0 ) {
+ $text = $this->htmlSpecialChars($text);
+ } else {
+ //$config =& $GLOBALS['xoopsConfig'];
+ //$allowed = $config['allowed_html'];
+ //$text = strip_tags($text, $allowed);
+ $text = $this->makeClickable($text);
+ }
+ if ( $smiley == 1 ) {
+ $text = $this->smiley($text);
+ }
+ if ( $bbcode == 1 ) {
+ $text = $this->xoopsCodeDecode($text);
+ }
+ $text = $this->nl2Br($text);
+ return $text;
+ }
+
+ function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1)
+ {
+ $text = $this->oopsStripSlashesGPC($text);
+ if ( $allowhtml == 0 ) {
+ $text = $this->htmlSpecialChars($text);
+ } else {
+ //$config =& $GLOBALS['xoopsConfig'];
+ //$allowed = $config['allowed_html'];
+ //$text = strip_tags($text, $allowed);
+ $text = $this->makeClickable($text);
+ }
+ if ( $smiley == 1 ) {
+ $text = $this->smiley($text);
+ }
+ if ( $bbcode == 1 ) {
+ $text = $this->xoopsCodeDecode($text);
+ }
+ $text = $this->nl2Br($text);
+ return $text;
+ }
+
+ function makeTboxData4Save($text)
+ {
+ //$text = $this->undoHtmlSpecialChars($text);
+ return $this->addSlashes($text);
+ }
+
+ function makeTboxData4Show($text, $smiley=0)
+ {
+ $text = $this->htmlSpecialChars($text);
+ return $text;
+ }
+
+ function makeTboxData4Edit($text)
+ {
+ return $this->htmlSpecialChars($text);
+ }
+
+ function makeTboxData4Preview($text, $smiley=0)
+ {
+ $text = $this->stripSlashesGPC($text);
+ $text = $this->htmlSpecialChars($text);
+ return $text;
+ }
+
+ function makeTboxData4PreviewInForm($text)
+ {
+ $text = $this->stripSlashesGPC($text);
+ return $this->htmlSpecialChars($text);
+ }
+
+ function makeTareaData4Save($text)
+ {
+ return $this->addSlashes($text);
+ }
+
+ function &makeTareaData4Show(&$text, $html=1, $smiley=1, $xcode=1)
+ {
+ return $this->displayTarea($text, $html, $smiley, $xcode);
+ }
+
+ function makeTareaData4Edit($text)
+ {
+ return htmlSpecialChars($text, ENT_QUOTES);
+ }
+
+ function &makeTareaData4Preview(&$text, $html=1, $smiley=1, $xcode=1)
+ {
+ return $this->previewTarea($text, $html, $smiley, $xcode);
+ }
+
+ function makeTareaData4PreviewInForm($text)
+ {
+ //if magic_quotes_gpc is on, do stipslashes
+ $text = $this->stripSlashesGPC($text);
+ return htmlSpecialChars($text, ENT_QUOTES);
+ }
+
+ function makeTareaData4InsideQuotes($text)
+ {
+ return $this->htmlSpecialChars($text);
+ }
+
+ function oopsStripSlashesGPC($text)
+ {
+ return $this->stripSlashesGPC($text);
+ }
+
+ function oopsStripSlashesRT($text)
+ {
+ if (get_magic_quotes_runtime()) {
+ $text = stripslashes($text);
+ }
+ return $text;
+ }
+
+ function oopsAddSlashes($text)
+ {
+ return $this->addSlashes($text);
+ }
+
+ function oopsHtmlSpecialChars($text)
+ {
+ return $this->htmlSpecialChars($text);
+ }
+
+ function oopsNl2Br($text)
+ {
+ return $this->nl2br($text);
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/class/textsanitizer.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/img/bg_content_left.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/img/bg_content_left.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/img/bg_content_right.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/img/bg_content_right.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/img/bg_darkblue.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/img/bg_darkblue.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/img/bg_table.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/img/bg_table.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/img/dummy.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/img/dummy.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/img/hbar_installer_right.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/img/hbar_installer_right.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/img/hbar_left.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/img/hbar_left.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/img/hbar_middle.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/img/hbar_middle.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/img/hbar_right.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/img/hbar_right.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/img/logo.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/img/logo.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/img/no.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/img/no.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/img/xoops2.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/img/xoops2.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/img/yes.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/img/yes.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/index.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/install/index.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/install/index.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,765 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+error_reporting (E_ALL);
+
+include_once './passwd.php';
+if(INSTALL_USER != '' || INSTALL_PASSWD != ''){
+ if (!isset($_SERVER['PHP_AUTH_USER'])) {
+ header('WWW-Authenticate: Basic realm="XOOPS Installer"');
+ header('HTTP/1.0 401 Unauthorized');
+ echo 'You can not access this XOOPS installer.';
+ exit;
+ } else {
+ if(INSTALL_USER != '' && $_SERVER['PHP_AUTH_USER'] != INSTALL_USER){
+ header('HTTP/1.0 401 Unauthorized');
+ echo 'You can not access this XOOPS installer.';
+ exit;
+ }
+ if(INSTALL_PASSWD != $_SERVER['PHP_AUTH_PW']){
+ header('HTTP/1.0 401 Unauthorized');
+ echo 'You can not access this XOOPS installer.';
+ exit;
+ }
+ }
+}
+
+include_once './class/textsanitizer.php';
+$myts =& TextSanitizer::getInstance();
+
+if ( isset($_POST) ) {
+ foreach ($_POST as $k=>$v) {
+ if (!is_array($v)) {
+ $$k = $myts->stripSlashesGPC($v);
+ }
+ }
+}
+$xoopsConfig['language'] = 'english';
+if ( !empty($_POST['lang']) ) {
+ $xoopsConfig['language'] = $_POST['lang'];
+} else {
+ if (isset($_COOKIE['install_lang'])) {
+ $xoopsConfig['language'] = $_COOKIE['install_lang'];
+ } else {
+ //$_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'ja,en-us;q=0.7,zh-TW;q=0.6';
+ if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
+ $accept_langs = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
+ $language_array = array('en' => 'english', 'ja' => 'japanese', 'fr' => 'french', 'de' => 'german', 'nl' => 'dutch', 'es' => 'spanish', 'tw' => 'tchinese', 'cn' => 'schinese', 'ro' => 'romanian');
+ foreach ($accept_langs as $al) {
+ $al = strtolower($al);
+ $al_len = strlen($al);
+ if ($al_len > 2) {
+ if (preg_match("/([a-z]{2});q=[0-9.]+$/", $al, $al_match)) {
+ $al = $al_match[1];
+ } else {
+ continue;
+ }
+ }
+ if (isset($language_array[$al])) {
+ $xoopsConfig['language'] = $language_array[$al];
+ break;
+ }
+ }
+ }
+ }
+}
+
+if ( file_exists("./language/".$xoopsConfig['language']."/install.php") ) {
+ include_once "./language/".$xoopsConfig['language']."/install.php";
+} elseif ( file_exists("./language/english/install.php") ) {
+ include_once "./language/english/install.php";
+ $xoopsConfig['language'] = 'english';
+} else {
+ echo 'no language file.';
+ exit();
+}
+setcookie("install_lang", $xoopsConfig['language']);
+
+//include './include/viewerrors.php';
+//include './include/functions.php';
+
+define('_OKIMG',"<img src='img/yes.gif' width='6' height='12' border='0' alt='' /> ");
+define('_NGIMG',"<img src='img/no.gif' width='6' height='12' border='0' alt='' /> ");
+
+$b_back = '';
+$b_reload = '';
+$b_next = '';
+
+// options for mainfile.php
+$xoopsOption['nocommon'] = true;
+define('XOOPS_INSTALL', 1);
+
+if(!empty($_POST['op']))
+ $op = $_POST['op'];
+elseif(!empty($_GET['op']))
+ $op = $_GET['op'];
+else
+ $op = '';
+
+///// main
+
+switch ($op) {
+
+default:
+case "langselect":
+ $title = _INSTALL_L0;
+ if (!defined('_INSTALL_L128')) {
+ define('_INSTALL_L128', 'Choose language to be used for the installation process');
+ }
+ $content = "<p>"._INSTALL_L128."</p>"
+ ."<select name='lang'>";
+
+ $langarr = getDirList("./language/");
+ foreach ($langarr as $lang) {
+ $content .= "<option value='".$lang."'";
+ if (strtolower($lang) == $xoopsConfig['language']) {
+ $content .= ' selected="selected"';
+ }
+ $content .= ">".$lang."</option>";
+ }
+ $content .= "</select>";
+
+ $b_next = array('start', _INSTALL_L80 );
+ include 'install_tpl.php';
+ break;
+
+case "start":
+ $title = _INSTALL_L0;
+ $content = "<table width='80%' align='center'><tr><td align='left'>\n";
+ include './language/'.$xoopsConfig['language'].'/welcome.php';
+ $content .= "</td></tr></table>\n";
+ $b_next = array('modcheck', _INSTALL_L81 );
+ include 'install_tpl.php';
+ break;
+
+case "modcheck":
+ $writeok = array("uploads/", "cache/", "templates_c/", "mainfile.php");
+ $title = _INSTALL_L82;
+ $content = "<table align='center'><tr><td align='left'>\n";
+ $error = false;
+ foreach ($writeok as $wok) {
+ if (!is_dir("../".$wok)) {
+ if ( file_exists("../".$wok) ) {
+ @chmod("../".$wok, 0666);
+ if (! is_writeable("../".$wok)) {
+ $content .= _NGIMG.sprintf(_INSTALL_L83, $wok)."<br />";
+ $error = true;
+ }else{
+ $content .= _OKIMG.sprintf(_INSTALL_L84, $wok)."<br />";
+ }
+ }
+ } else {
+ @chmod("../".$wok, 0777);
+ if (! is_writeable("../".$wok)) {
+ $content .= _NGIMG.sprintf(_INSTALL_L85, $wok)."<br />";
+ $error = true;
+ }else{
+ $content .= _OKIMG.sprintf(_INSTALL_L86, $wok)."<br />";
+ }
+ }
+ }
+ $content .= "</td></tr></table>\n";
+
+ if(! $error) {
+ $content .= "<p>"._INSTALL_L87."</p>";
+ $b_next = array('dbform', _INSTALL_L89 );
+ }else{
+ $content .= "<p>"._INSTALL_L46."</p>";
+ $b_reload = true;
+ }
+
+ include 'install_tpl.php';
+ break;
+
+case "dbform":
+ include_once '../mainfile.php';
+ include_once 'class/settingmanager.php';
+ $sm = new setting_manager();
+ $sm->readConstant();
+ $content = $sm->editform();
+ $title = _INSTALL_L90;
+ $b_next = array('dbconfirm',_INSTALL_L91);
+ include 'install_tpl.php';
+ break;
+
+case "dbconfirm":
+ include_once 'class/settingmanager.php';
+ $sm = new setting_manager(true);
+
+ $content = $sm->checkData();
+ if (!empty($content)) {
+ $content .= $sm->editform();
+ $b_next = array('dbconfirm',_INSTALL_L91);
+ include 'install_tpl.php';
+ break;
+ }
+
+ $title = _INSTALL_L53;
+ $content = $sm->confirmForm();
+ $b_next = array('dbsave',_INSTALL_L92 );
+ $b_back = array('', _INSTALL_L93 );
+ include 'install_tpl.php';
+ break;
+
+case "dbsave":
+ include_once "./class/mainfilemanager.php";
+ $title = _INSTALL_L88;
+ $mm = new mainfile_manager("../mainfile.php");
+
+ $ret = $mm->copyDistFile();
+ if(! $ret){
+ $content = _INSTALL_L60;
+ include 'install_tpl.php';
+ exit();
+ }
+
+ $mm->setRewrite('XOOPS_ROOT_PATH', trim($myts->stripSlashesGPC($_POST['root_path'])));
+ $mm->setRewrite('XOOPS_URL', trim($myts->stripSlashesGPC($_POST['xoops_url'])));
+ $mm->setRewrite('XOOPS_DB_TYPE', trim($myts->stripSlashesGPC($_POST['database'])));
+ $mm->setRewrite('XOOPS_DB_PREFIX', trim($myts->stripSlashesGPC($_POST['prefix'])));
+ $mm->setRewrite('XOOPS_DB_HOST', trim($myts->stripSlashesGPC($_POST['dbhost'])));
+ $mm->setRewrite('XOOPS_DB_USER', trim($myts->stripSlashesGPC($_POST['dbuname'])));
+ $mm->setRewrite('XOOPS_DB_PASS', trim($myts->stripSlashesGPC($_POST['dbpass'])));
+ $mm->setRewrite('XOOPS_DB_NAME', trim($myts->stripSlashesGPC($_POST['dbname'])));
+ $mm->setRewrite('XOOPS_DB_PCONNECT', intval($_POST['db_pconnect']));
+ $mm->setRewrite('XOOPS_GROUP_ADMIN', 1);
+ $mm->setRewrite('XOOPS_GROUP_USERS', 2);
+ $mm->setRewrite('XOOPS_GROUP_ANONYMOUS', 3);
+
+ // Check if XOOPS_CHECK_PATH should be initially set or not
+ $xoopsPathTrans = isset($_SERVER['PATH_TRANSLATED']) ? $_SERVER['PATH_TRANSLATED'] : $_SERVER['SCRIPT_FILENAME'];
+ if ( DIRECTORY_SEPARATOR != '/' ) {
+ // IIS6 doubles the \ chars
+ $xoopsPathTrans = str_replace( strpos( $xoopsPathTrans, '\\\\', 2 ) ? '\\\\' : DIRECTORY_SEPARATOR, '/', $xoopsPathTrans);
+ }
+ $mm->setRewrite('XOOPS_CHECK_PATH', strcasecmp( substr($xoopsPathTrans, 0, strlen($_POST['root_path'])), $_POST['root_path']) ? 0 : 1 );
+
+ $ret = $mm->doRewrite();
+ if(! $ret){
+ $content = _INSTALL_L60;
+ include 'install_tpl.php';
+ exit();
+ }
+
+ $content = $mm->report();
+ $content .= "<p>"._INSTALL_L62."</p>\n";
+ $b_next = array('mainfile', _INSTALL_L94 );
+ include 'install_tpl.php';
+ break;
+
+case "mainfile":
+ // checking XOOPS_ROOT_PATH and XOOPS_URL
+ include_once "../mainfile.php";
+ $title = _INSTALL_L94;
+ $content = "<table align='center'><tr><td align='left'>\n";
+
+ $detected = str_replace("\\", "/", getcwd()); // "
+ $detected = str_replace("/install", "", $detected);
+ if ( substr($detected, -1) == "/" ) {
+ $detected = substr($detected, 0, -1);
+ }
+
+ if (empty($detected)){
+ $content .= _NGIMG._INSTALL_L95.'<br />';
+ }
+ elseif ( XOOPS_ROOT_PATH != $detected ) {
+ $content .= _NGIMG.sprintf(_INSTALL_L96,$detected). '<br />';
+ }else {
+ $content .= _OKIMG._INSTALL_L97.'<br />';
+ }
+
+ if(!is_dir(XOOPS_ROOT_PATH)){
+ $content .= _NGIMG._INSTALL_L99.'<br />';
+ }
+
+
+ if(preg_match('/^http[s]?:\/\/(.*)[^\/]+$/i',XOOPS_URL)){
+ $content .= _OKIMG._INSTALL_L100.'<br />';
+ }else{
+ $content .= _NGIMG._INSTALL_L101.'<br />';
+ }
+
+
+ $content .= "<br /></td></tr></table>\n";
+
+ $content .= "<table align='center'><tr><td align='left'>\n";
+ $content .= _INSTALL_L11."<b>".XOOPS_ROOT_PATH."</b><br />";
+ $content .= _INSTALL_L12."<b>".XOOPS_URL."</b><br />";
+ $content .= "</td></tr></table>\n";
+ $content .= "<p align='center'>"._INSTALL_L13."</p>\n";
+
+ $b_next = array('initial', _INSTALL_L102 );
+ $b_back = array('start', _INSTALL_L103 );
+ $b_reload = true;
+
+ include 'install_tpl.php';
+ //mainfile_settings();
+ break;
+
+case "initial":
+ // confirm database setting
+ include_once "../mainfile.php";
+ $content = "<table align=\"center\">\n";
+ $content .= "<tr><td align='center'>";
+ $content .= "<table align=\"center\">\n";
+ $content .= "<tr><td>"._INSTALL_L27." </td><td><b>".XOOPS_DB_HOST."</b></td></tr>\n";
+ $content .= "<tr><td>"._INSTALL_L28." </td><td><b>".XOOPS_DB_USER."</b></td></tr>\n";
+ $content .= "<tr><td>"._INSTALL_L29." </td><td><b>".XOOPS_DB_NAME."</b></td></tr>\n";
+ $content .= "<tr><td>"._INSTALL_L30." </td><td><b>".XOOPS_DB_PREFIX."</b></td></tr>\n";
+ $content .= "</table><br />\n";
+ $content .= "</td></tr><tr><td align=\"center\">";
+ $content .= _INSTALL_L13."<br /><br />\n";
+ $content .= "</td></tr></table>\n";
+ $b_next = array('checkDB', _INSTALL_L104);
+ $b_back = array('start', _INSTALL_L103);
+ $b_reload = true;
+ $title = _INSTALL_L102;
+ include 'install_tpl.php';
+ break;
+
+case "checkDB":
+ include_once "../mainfile.php";
+ include_once './class/dbmanager.php';
+ $dbm = new db_manager;
+ $title = _INSTALL_L104;
+ $content = "<table align='center'><tr><td align='left'>\n";
+
+ if (! $dbm->isConnectable()) {
+ $content .= _NGIMG._INSTALL_L106."<br />";
+ $content .= "<div style='text-align:center'><br />"._INSTALL_L107;
+ $content .= "</div></td></tr></table>\n";
+ $b_back = array('start', _INSTALL_L103);
+ $b_reload = true;
+ }else{
+ $content .= _OKIMG._INSTALL_L108."<br />";
+ if (! $dbm->dbExists()) {
+ $content .= _NGIMG.sprintf(_INSTALL_L109, XOOPS_DB_NAME)."<br />";
+ $content .= "</td></tr></table>\n";
+
+ $content .= "<p>"._INSTALL_L21."<br />"
+ ."<b>".XOOPS_DB_NAME."</b></p>"
+ ."<p>"._INSTALL_L22."</p>";
+
+ $b_next = array('createDB', _INSTALL_L105);
+ $b_back = array('start', _INSTALL_L103);
+ $b_reload = true;
+ }else{
+ $content .= _OKIMG.sprintf(_INSTALL_L110, XOOPS_DB_NAME)."<br />";
+ $content .= "</td></tr></table>\n";
+ $content .= "<p>"._INSTALL_L111."</p>";
+ $b_next = array('createTables', _INSTALL_L40);
+ }
+ }
+
+ include 'install_tpl.php';
+ break;
+
+case "createDB":
+ include_once "../mainfile.php";
+ include_once './class/dbmanager.php';
+ $dbm = new db_manager;
+
+ if(! $dbm->createDB()){
+ $content = "<p>"._INSTALL_L31."</p>";
+ $b_next = array('checkDB', _INSTALL_L104);
+ $b_back = array('start', _INSTALL_L103);
+ }else{
+ $content = "<p>".sprintf(_INSTALL_L43, XOOPS_DB_NAME)."</p>";
+ $b_next = array('checkDB', _INSTALL_L104);
+ }
+ include 'install_tpl.php';
+ break;
+
+case "createTables":
+ include_once "../mainfile.php";
+
+ include_once './class/dbmanager.php';
+ $dbm = new db_manager;
+
+ //$content = "<table align='center'><tr><td align='left'>\n";
+ $tables = array();
+ $result = $dbm->queryFromFile('./sql/'.XOOPS_DB_TYPE.'.structure.sql');
+ $content = $dbm->report();
+
+ if(! $result ){
+ //$deleted = $dbm->deleteTables($tables);
+ $content .= "<p>"._INSTALL_L114."</p>\n";
+ $b_back = array('start', _INSTALL_L103);
+ }else{
+ $content .= "<p>"._INSTALL_L115."</p>\n";
+ $b_next = array('siteInit', _INSTALL_L112);
+ }
+
+ include 'install_tpl.php';
+ break;
+
+case "siteInit":
+ include_once "../mainfile.php";
+
+ $content = "<table align='center' width='70%'>\n";
+ $content .= "<tr><td colspan='2' align='center'>"._INSTALL_L36."</td></tr>\n";
+ $content .= "<tr><td align='right'><b>"._INSTALL_L37."</b></td><td><input type=\"text\" name=\"adminname\" /></td></tr>\n";
+ $content .= "<tr><td align='right'><b>"._INSTALL_L167."</b></td><td><input type='text' name='loginname' value='' maxlength='25' /></td></tr>\n";
+ $content .= "<tr><td align='right'><b>"._INSTALL_L38."</b></td><td><input type='text' name='adminmail' value='' maxlength='60' /></td></tr>\n";
+ $content .= "<tr><td align='right'><b>"._INSTALL_L39."</b></td><td><input type='password' name='adminpass' /></td></tr>\n";
+ $content .= "<tr><td align='right'><b>"._INSTALL_L74."</b></td><td><input type='password' name='adminpass2' /></td></tr>\n";
+ $content .= "</table>\n";
+ $b_next = array('insertData', _INSTALL_L116);
+
+ include 'install_tpl.php';
+ break;
+
+case "insertData":
+ $adminname = $myts->stripSlashesGPC($_POST['adminname']);
+ $loginname = $myts->stripSlashesGPC($_POST['loginname']);
+ $adminpass = $myts->stripSlashesGPC($_POST['adminpass']);
+ $adminmail = $myts->stripSlashesGPC($_POST['adminmail']);
+
+ if (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$/i",$adminmail)) {
+ $content = "<p>"._INSTALL_L73."</p>\n";
+ $b_back = array('', _INSTALL_L112 );
+ include 'install_tpl.php';
+ exit();
+ }
+ if ( !isset($adminname) || !isset($adminpass) || !isset($adminmail) || $adminmail == "" || $adminname =="" || $adminpass =="" || !isset($loginname) || $loginname == "") {
+ $content = "<p>"._INSTALL_L41."</p>\n";
+ $b_back = array('', _INSTALL_L112 );
+ include 'install_tpl.php';
+ exit();
+ }
+ if ( $adminpass != $adminpass2) {
+ $content = "<p>"._INSTALL_L48."</p>\n";
+ $b_back = array('', _INSTALL_L112 );
+ include 'install_tpl.php';
+ exit();
+ }
+ error_reporting(0);
+ include_once "../mainfile.php";
+ //include_once './include/createtables2.php';
+ include_once './makedata.php';
+ include_once './class/dbmanager.php';
+ $dbm = new db_manager;
+ include_once './class/cachemanager.php';
+ $cm = new cache_manager;
+
+ $xoopsConfig['language'] = check_language($xoopsConfig['language']);
+ if ( file_exists("./language/".$xoopsConfig['language']."/install2.php") ) {
+ include_once "./language/".$xoopsConfig['language']."/install2.php";
+ } elseif ( file_exists("./language/english/install2.php") ) {
+ include_once "./language/english/install2.php";
+ $xoopsConfig['language'] = 'english';
+ } else {
+ echo 'no language file (install2.php).';
+ exit();
+ }
+
+ if ( file_exists(XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/global.php") ) {
+ include_once XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/global.php";
+ } else {
+ include_once XOOPS_ROOT_PATH."/language/english/global.php";
+ }
+
+ if ( file_exists("../modules/system/language/".$xoopsConfig['language']."/admin/modulesadmin.php") ) {
+ include_once "../modules/system/language/".$xoopsConfig['language']."/admin/modulesadmin.php";
+ } else {
+ include_once "../modules/system/language/english/admin/modulesadmin.php";
+ }
+ $content = "";
+
+ // #################### Include API ##################
+ include_once XOOPS_ROOT_PATH.'/include/functions.php';
+ require_once XOOPS_ROOT_PATH.'/kernel/object.php';
+ require_once XOOPS_ROOT_PATH.'/class/criteria.php';
+ include_once XOOPS_ROOT_PATH."/class/module.textsanitizer.php";
+ require_once XOOPS_ROOT_PATH.'/class/criteria.php';
+
+ $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
+ define("SMARTY_DIR", XOOPS_ROOT_PATH."/class/smarty/");
+ define("XOOPS_CACHE_PATH", XOOPS_ROOT_PATH."/cache/");
+
+ $xoopsConfig['adminmail'] = $adminmail;
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->create();
+ $module->setVar('dirname', 'system');
+ $html = '<h4 style="text-align:left;margin-bottom: 0px;border-bottom: dashed 1px #000000;">Installing '.$module->getInfo('name').'</h4>';
+
+ if ($module->getInfo('image') != false && trim($module->getInfo('image')) != '') {
+ $html .='<img src="'.XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.trim($module->getInfo('image')).'" alt="" />';
+ }
+ $html .='<br /><b>Version:</b> '.$module->getInfo('version');
+ if ($module->getInfo('author') != false && trim($module->getInfo('author')) != '') {
+ $html .='<br /><b>Author:</b> '.trim($module->getInfo('author'));
+ }
+ //make sure that the profilefields.tmp cache file is NOT there
+ $profile_handler =& xoops_gethandler('profile');
+ $profile_handler->updateCache();
+
+ //$tables = array();
+ $result = $dbm->queryFromFile('./sql/'.XOOPS_DB_TYPE.'.data.sql');
+
+ $result = $dbm->queryFromFile('./language/'.$xoopsConfig['language'].'/'.XOOPS_DB_TYPE.'.lang.data.sql');
+
+ $group = make_groups($dbm);
+ $result = make_data($dbm, $cm, $adminname, $adminpass, $adminmail, $xoopsConfig['language'], $group);
+
+ //Install system module
+ $html .= $module->install(array(XOOPS_GROUP_ADMIN), array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS));
+
+
+ $member_handler =& xoops_gethandler('member');
+ $user =& $member_handler->createUser();
+ $user->setVar('uid', 1);
+ $user->setVar('uname', addslashes($adminname));
+ $user->setVar('loginname', addslashes($loginname));
+ $user->setVar('email', addslashes($adminmail));
+ $user->setVar('pass', md5($adminpass));
+ $user->setVar('user_avatar', 'blank.gif');
+ $user->setVar('rank', 7);
+ $user->setVar('level', 5);
+ $user->setVar('user_regdate', time());
+ if (!$member_handler->insertUser($user)) {
+ echo $user->getHtmlErrors();
+ }
+
+ $block_handler =& xoops_gethandler('block');
+ $blocks_to_install =& $block_handler->getObjects(new Criteria('show_func', "(".implode(',', array("'b_system_user_show'", "'b_system_login_show'", "'b_system_main_show'")).")", "IN"));
+ //Install login, main menu and user menu blocks
+ include_once XOOPS_ROOT_PATH."/modules/system/admin/blocksadmin/blocksadmin.php";
+ if (count($blocks_to_install) > 0) {
+ foreach ($blocks_to_install as $block) {
+ if (save_block(0, 0, 1, 0, $block->getVar('name'), $block->getVar('bid'), 0, array("0-0"), array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS), array())) {
+ //success
+ $html .= "<br />".sprintf(_INSTALL_L165, $block->getVar('name'));
+ }
+ else {
+ //failure
+ $html .= "<br />".sprintf(_INSTALL_L166, $block->getVar('name'));
+ }
+ }
+ }
+ else {
+ $html .= "Blocks not inserted";
+ }
+
+ $content .= $dbm->report();
+ $content .= $cm->report();
+ include_once "./class/mainfilemanager.php";
+ $mm = new mainfile_manager("../mainfile.php");
+ foreach($group as $key => $val){
+ $mm->setRewrite($key, intval($val));
+ }
+ $result = $mm->doRewrite();
+ $content .= $mm->report();
+
+ $content .= $html;
+
+ $b_next = array('modules', _INSTALL_L129);
+ $title = _INSTALL_L116;
+ setcookie('xoops_session', '', time() - 3600);
+ include 'install_tpl.php';
+
+ break;
+
+case 'modules':
+ error_reporting(0);
+ include_once "../mainfile.php";
+ // #################### Include API ##################
+ include_once './class/dbmanager.php';
+ include_once XOOPS_ROOT_PATH.'/include/functions.php';
+ require_once XOOPS_ROOT_PATH.'/kernel/object.php';
+ require_once XOOPS_ROOT_PATH.'/class/criteria.php';
+ include_once XOOPS_ROOT_PATH."/class/module.textsanitizer.php";
+ require_once XOOPS_ROOT_PATH.'/class/criteria.php';
+
+ $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
+ define("SMARTY_DIR", XOOPS_ROOT_PATH."/class/smarty/");
+ define("XOOPS_CACHE_PATH", XOOPS_ROOT_PATH."/cache/");
+
+ $config_handler =& xoops_gethandler('config');
+ $xoopsConfig =& $config_handler->getConfigsByCat(XOOPS_CONF);
+
+ if ( file_exists(XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/global.php") ) {
+ include_once XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/global.php";
+ } else {
+ include_once XOOPS_ROOT_PATH."/language/english/global.php";
+ }
+
+ if ( file_exists("../modules/system/language/".$xoopsConfig['language']."/admin/modulesadmin.php") ) {
+ include_once "../modules/system/language/".$xoopsConfig['language']."/admin/modulesadmin.php";
+ } else {
+ include_once "../modules/system/language/english/admin/modulesadmin.php";
+ }
+
+ $module_handler =& xoops_gethandler('module');
+ $title = _INSTALL_L49;
+ $content = "<table width='80%' align='center'>\n";
+ $modules_dir = XOOPS_ROOT_PATH."/modules/";
+ $count = 0;
+ $modlist = getDirList($modules_dir);
+ $pre_specified = array("pm", "profile");
+ foreach ($modlist as $file) {
+ if ( $file != "system" ) {
+ $module =& $module_handler->create();
+ $module->loadInfo($file);
+ if ($count % 2 == 0) {
+ $class = 'even';
+ } else {
+ $class = 'odd';
+ }
+ $content .= '<tr class="'.$class.'">
+ <td><input type="checkbox" name="modules[]" value="'.$module->getInfo('dirname').'"' ;
+ if(in_array($file, $pre_specified)){
+ $content .= ' "checked" ';
+ }
+ $content .= '/></td>
+ <td align="center" valign="bottom"><img src="'.XOOPS_URL.'/modules/'.$module->getInfo('dirname').'/'.$module->getInfo('image').'" alt="'.htmlspecialchars($module->getInfo('name')).'" border="0" /></td>
+ <td>'.$module->getInfo('name').'</td>
+ <td align="center">'.round($module->getInfo('version'), 2).'</td>';
+ $content .= "</td><td>";
+ $content .= $module->getInfo("description");
+ $content .= '</td></tr>
+ ';
+ unset($module);
+ $count++;
+ }
+
+ }
+ $content .= "</table>\n";
+ $b_next = array('moduleinstall', _INSTALL_L49);
+ include 'install_tpl.php';
+ break;
+
+case "moduleinstall":
+ if (isset($_REQUEST['modules'])) {
+ error_reporting(0);
+ $content = "";
+ include_once "../mainfile.php";
+ // #################### Include API ##################
+ include_once './class/dbmanager.php';
+ include_once XOOPS_ROOT_PATH.'/include/functions.php';
+ require_once XOOPS_ROOT_PATH.'/kernel/object.php';
+ require_once XOOPS_ROOT_PATH.'/class/criteria.php';
+ include_once XOOPS_ROOT_PATH."/class/module.textsanitizer.php";
+ require_once XOOPS_ROOT_PATH.'/class/criteria.php';
+
+ $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
+ define("SMARTY_DIR", XOOPS_ROOT_PATH."/class/smarty/");
+ define("XOOPS_CACHE_PATH", XOOPS_ROOT_PATH."/cache/");
+ define("XOOPS_UPLOAD_URL", XOOPS_URL."/uploads/");
+ define("XOOPS_THEME_PATH", XOOPS_ROOT_PATH."/themes");
+ define("XOOPS_COMPILE_PATH", XOOPS_ROOT_PATH."/templates_c");
+
+ if ( file_exists(XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/global.php") ) {
+ include_once XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/global.php";
+ } else {
+ include_once XOOPS_ROOT_PATH."/language/english/global.php";
+ }
+
+ if ( file_exists(XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/local.php") ) {
+ include_once XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/local.php";
+ } else {
+ include_once XOOPS_ROOT_PATH."/language/english/local.php";
+ }
+
+ if ( file_exists("../modules/system/language/".$xoopsConfig['language']."/admin/modulesadmin.php") ) {
+ include_once "../modules/system/language/".$xoopsConfig['language']."/admin/modulesadmin.php";
+ } else {
+ include_once "../modules/system/language/english/admin/modulesadmin.php";
+ }
+
+ $module_handler =& xoops_gethandler('module');
+ foreach ($_REQUEST['modules'] as $dirname) {
+ $module =& $module_handler->create();
+ $module->setVar('dirname', $dirname);
+ $content .= $module->install(array(XOOPS_GROUP_ADMIN), array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS));
+ unset($module);
+ }
+ $title = _INSTALL_L49;
+
+ $b_next = array('finish', _INSTALL_L117);
+ include 'install_tpl.php';
+ break;
+ }
+
+ case 'finish':
+
+ $title = _INSTALL_L32;
+ $content = "<table width='60%' align='center'><tr><td align='left'>\n";
+ include './language/'.$xoopsConfig['language'].'/finish.php';
+ $content .= "</td></tr></table>\n";
+ include 'install_tpl.php';
+ break;
+}
+
+/*
+ * gets list of name of directories inside a directory
+ */
+function getDirList($dirname)
+{
+ $dirlist = array();
+ if (is_dir($dirname) && $handle = opendir($dirname)) {
+ while (false !== ($file = readdir($handle))) {
+ if ( !preg_match("/^[.]{1,2}$/",$file) ) {
+ if (strtolower($file) != 'cvs' && is_dir($dirname.$file) ) {
+ $dirlist[$file]=$file;
+ }
+ }
+ }
+ closedir($handle);
+ asort($dirlist);
+ reset($dirlist);
+ }
+ return $dirlist;
+}
+
+/*
+ * gets list of name of files within a directory
+ */
+function getImageFileList($dirname)
+{
+ $filelist = array();
+ if (is_dir($dirname) && $handle = opendir($dirname)) {
+ while (false !== ($file = readdir($handle))) {
+ if (!preg_match("/^[.]{1,2}$/",$file) && preg_match("/[.gif|.jpg|.png]$/i",$file) ) {
+ $filelist[$file]=$file;
+ }
+ }
+ closedir($handle);
+ asort($filelist);
+ reset($filelist);
+ }
+ return $filelist;
+}
+
+function check_language($language){
+ if ( file_exists('../modules/system/language/'.$language.'/modinfo.php') ) {
+ return $language;
+ } else {
+ return 'english';
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/index.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/install_tpl.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/install/install_tpl.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/install/install_tpl.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,102 @@
+<?php
+ if (!headers_sent()) {
+ header('Content-Type:text/html; charset='._INSTALL_CHARSET);
+ }
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+ <title>XOOPS Custom Installation</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=<?php echo _INSTALL_CHARSET ?>" />
+ <style type="text/css" media="all"><!-- @import url(../xoops.css); --></style>
+ <link rel="stylesheet" type="text/css" media="all" href="style.css" />
+</head>
+<body style="margin: 0; padding: 0;">
+<form action='index.php' method='post'>
+<table width="778" align="center" cellpadding="0" cellspacing="0" background="img/bg_table.gif">
+ <tr>
+ <td width="150"><img src="img/hbar_left.gif" width="100%" height="23" alt="" /></td>
+ <td width="478" background="img/hbar_middle.gif"> </td>
+ <td width="150"><img src="img/hbar_right.gif" width="100%" height="23" alt="" /></td>
+ </tr>
+ <tr>
+ <td width="150"><a href="index.php"><img src="img/logo.gif" width="150" height="80" alt="" /></a></td>
+ <td width="478" background="img/bg_darkblue.gif"> </td>
+ <td width="150"><img src="img/xoops2.gif" width="100%" height="80"></td>
+ </tr>
+ <tr>
+ <td width="150"><img src="img/hbar_left.gif" width="100%" height="23" alt="" /></td>
+ <td width="478" background="img/hbar_middle.gif"> </td>
+ <td width="150"><img src="img/hbar_right.gif" width="100%" height="23" alt="" /></td>
+ </tr>
+</table>
+
+<table width="778" align="center" cellspacing="0" cellpadding="0" background="img/bg_table.gif"
+ <tr>
+ <td width='5%'> </td>
+ <td colspan="3"><?php if(!empty($title)) echo '<h4 style="margin-top: 10px; margin-bottom: 5px; padding: 10px;">'.$title.'</h4>'; echo '<div style="padding: 10px;">'.$content.'</div>'; ?></td>
+ <td width='5%'> </td>
+ </tr>
+ <tr>
+ <td width='5%'> </td>
+ <td width='35%' align='left'><?php echo b_back($b_back); ?></td>
+ <td width='20%' align='center'><?php echo b_reload($b_reload); ?></td>
+ <td width='35%' align='right'><?php echo b_next($b_next); ?></td>
+ <td width='5%'> </td>
+ </tr>
+ <tr>
+ <td colspan="5"> </td>
+ </tr>
+</table>
+
+<table width="778" cellspacing="0" cellpadding="0" align="center" background="img/bg_table.gif">
+ <tr>
+ <td width="150"><img src="img/hbar_left.gif" width="100%" height="23" alt="" /></td>
+ <td width="478" background="img/hbar_middle.gif"> </td>
+ <td width="150"><img src="img/hbar_installer_right.gif" width="100%" height="23" alt="" /></td>
+ </tr>
+</table>
+</form>
+</body>
+</html>
+<?php
+function b_back($option = null)
+{
+ if(!isset($option) || !is_array($option)) return '';
+ $content = '';
+ if(isset($option[0]) && $option[0] != ''){
+ $content .= "<input type='button' value='"
+ ._INSTALL_L42."' onclick=\"location='index.php?op="
+ .htmlspecialchars($option[0])."'\" /> ";
+ }else{
+ $content .= "<input type='button' value='"
+ ._INSTALL_L42."' onclick=\"javascript:history.back();\" /> ";
+ }
+ if(isset($option[1]) && $option[1] != ''){
+ $content .= "<span style='font-size:85%;'><< "
+ .htmlspecialchars($option[1])."</span> ";
+ }
+ return $content;
+}
+
+function b_reload($option=''){
+ if(empty($option)) return '';
+ if (!defined('_INSTALL_L200')) {
+ define('_INSTALL_L200', 'Reload');
+ }
+ return "<input type='button' value='"._INSTALL_L200."' onclick=\"location.reload();\" /> ";
+}
+
+function b_next($option=null){
+ if(!isset($option) || !is_array($option)) return '';
+ $content = '';
+ if(isset($option[1]) && $option[1] != ''){
+ $content .= "<span style='font-size:85%;'>"
+ .htmlspecialchars($option[1])." >></span>";
+ }
+ $content .= "<input type='hidden' name='op' value='"
+ .htmlspecialchars($option[0])."' />\n";
+ $content .= "<input type='submit' name='submit' value='"._INSTALL_L47."' />\n";
+ return $content;
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/install_tpl.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/finish.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/finish.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/finish.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,11 @@
+<?php
+// $Id$
+$content .=
+"<u><b>Your site</b></u>
+<p>Click <a href='../user.php'>HERE</a> to see the home page of your site.</p>
+<u><b>Way to use</b></u>
+<p>[not yet]</p>
+<u><b>Support</b></u>
+<p>Visit <a href='http://www.xoops.org/' target='_blank'>XOOPS.org</a></p>
+";
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/finish.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/install.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/install.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/install.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,190 @@
+<?php
+// $Id$
+define("_INSTALL_L0","Welcome to the Install Wizard for XOOPS 2.2");
+define("_INSTALL_L70","Please change the file permission for mainfile.php so that it is writeable by the server (i.e. chmod 777 mainfile.php on a UNIX/LINUX server, or check the properties of the file and make sure the read-only flag is not set on a Windows server ). Reload this page once you have changed the permission setting.");
+//define("_INSTALL_L71","Click on the button below to begin the installation.");
+define("_INSTALL_L1","Open mainfile.php with your text editor and find the following codes on line 31:");
+define("_INSTALL_L2","Now, change this line to:");
+define("_INSTALL_L3","Next, on line 35, change %s to %s");
+define("_INSTALL_L4","OK, I have set the above setings, let me try again!");
+define("_INSTALL_L5","WARNING!");
+define("_INSTALL_L6","There is a mismatch between your XOOPS_ROOT_PATH configuration on line 31 of mainfile.php and the root path info we have detected.");
+define("_INSTALL_L7","Your setting: ");
+define("_INSTALL_L8","We detected: ");
+define("_INSTALL_L9","( On MS platforms, you may receive this error message even when your configuration is correct. If that is the case, please press the button below to continue)");
+define("_INSTALL_L10","Plesae press the button below to continue if this is really ok.");
+define("_INSTALL_L11","The server path to your XOOPS root directory: ");
+define("_INSTALL_L12","URL to your XOOPS root directory: ");
+define("_INSTALL_L13","If the above setting is correct, press the button below to continue.");
+define("_INSTALL_L14","Next");
+define("_INSTALL_L15","Please open mainfile.php and enter required DB settings data");
+define("_INSTALL_L16","%s is the hostname of your database server.");
+define("_INSTALL_L17","%s is the username of your database account.");
+define("_INSTALL_L18","%s is the password required to access your database.");
+define("_INSTALL_L19","%s is the name of your database in which XOOPS tables will be created.");
+define("_INSTALL_L20","%s is the prefix for tables that will be made during the installation.");
+define("_INSTALL_L21","The following database was not found on the server:");
+define("_INSTALL_L22","Attempt to create it?");
+define("_INSTALL_L23","Yes");
+define("_INSTALL_L24","No");
+define("_INSTALL_L25","We have detected the following database information from your configuration in mainfile.php. Please fix it now if this is not correct.");
+define("_INSTALL_L26","Database Configuration");
+define("_INSTALL_L51","Database");
+define("_INSTALL_L66","Choose the database to be used");
+define("_INSTALL_L27","Database Hostname");
+define("_INSTALL_L67","Hostname of the database server. If you are unsure, 'localhost' works in most cases.");
+define("_INSTALL_L28","Database Username");
+define("_INSTALL_L65","Your database user account on the host");
+define("_INSTALL_L29","Database Name");
+define("_INSTALL_L64","The name of database on the host. The installer will attempt to create the database if not exist");
+define("_INSTALL_L52","Database Password");
+define("_INSTALL_L68","Password for your database user account");
+define("_INSTALL_L30","Table Prefix");
+define("_INSTALL_L63","This prefix will be added to all new tables created to avoid name conflict in the database. If you are unsure, just use the default 'xoops'.");
+define("_INSTALL_L54","Use persistent connection?");
+define("_INSTALL_L69","Default is 'NO'. Choose 'NO' if you are unsure.");
+define("_INSTALL_L55","XOOPS Physical Path");
+define("_INSTALL_L59","Physical path to your main XOOPS directory WITHOUT trailing slash");
+define("_INSTALL_L56","XOOPS Virtual Path (URL)");
+define("_INSTALL_L58","Virtual path to your main XOOPS directory WITHOUT trailing slash");
+
+define("_INSTALL_L31","Could not create database. Contact the server administrator for details.");
+define("_INSTALL_L32","Installation Complete");
+define("_INSTALL_L33","Click <a href='../index.php'>HERE</a> to see the home page of your site.");
+define("_INSTALL_L35","If you had any errors, please contact the dev team at <a href='http://www.xoops.org/' target='_blank'>XOOPS.org</a>");
+define("_INSTALL_L36","Please choose your site admin's name and password.");
+define("_INSTALL_L37","Admin Displayname");
+define("_INSTALL_L167", "Admin Login name");
+define("_INSTALL_L38","Admin Email");
+define("_INSTALL_L39","Admin Password");
+define("_INSTALL_L74","Confirm Password");
+define("_INSTALL_L40","Create Tables");
+define("_INSTALL_L41","Please go back and type in all the required info.");
+define("_INSTALL_L42","Back");
+define("_INSTALL_L57","Please enter %s");
+
+// %s is database name
+define("_INSTALL_L43","Database %s created!");
+
+// %s is table name
+define("_INSTALL_L44","Unable to make %s");
+define("_INSTALL_L45","Table %s created.");
+
+define("_INSTALL_L46","In order for the modules included in the package to work correctly, the following files must be writeable by the server. Please change the permission setting for these files. (i.e. 'chmod 666 file_name' and 'chmod 777 dir_name' on a UNIX/LINUX server, or check the properties of the file and make sure the read-only flag is not set on a Windows server)");
+define("_INSTALL_L47","Next");
+
+define("_INSTALL_L53","Please confirm the following submitted data:");
+
+define("_INSTALL_L60","Could not write into mainfile.php. Please check the file permission and try again.");
+define("_INSTALL_L61","Could not write to mainfile.php. Contact the server administrator for details.");
+define("_INSTALL_L62","Configuration data has been saved successfully to mainfile.php.");
+define("_INSTALL_L72","The following directories must be created with the write permission by the server. (i.e. 'chmod 777 directory_name' on a UNIX/LINUX server)");
+define("_INSTALL_L73","Invalid Email");
+
+// add by haruki
+define("_INSTALL_L80","introduction");
+define("_INSTALL_L81","check file permissions");
+define("_INSTALL_L82","Checking file and directory permissions..");
+define("_INSTALL_L83","File %s is NOT writable.");
+define("_INSTALL_L84","File %s is writable.");
+define("_INSTALL_L85","Directory %s is NOT writable.");
+define("_INSTALL_L86","Directory %s is writable.");
+define("_INSTALL_L87","No errors detected.");
+define("_INSTALL_L89","general settings");
+define("_INSTALL_L90","General configuration");
+define("_INSTALL_L91","confirm");
+define("_INSTALL_L92","save settings");
+define("_INSTALL_L93","modify settings");
+define("_INSTALL_L88","Saving configuration data..");
+define("_INSTALL_L94","check path & URL");
+define("_INSTALL_L127","Checking file path & URL settings..");
+define("_INSTALL_L95","Could not detect the physical path to your XOOPS directory.");
+define("_INSTALL_L96","There is a conflict between the detected physical path (%s) and the one you input.");
+define("_INSTALL_L97","<b>Physical path</b> is correct.");
+
+define("_INSTALL_L99","<b>Physical path</b> must be a directory.");
+define("_INSTALL_L100","<b>Virtual path</b> is a valid URL.");
+define("_INSTALL_L101","<b>Virtual path</b> is not a valid URL.");
+define("_INSTALL_L102","confirm database settings");
+define("_INSTALL_L103","restart from the beginning");
+define("_INSTALL_L104","check database");
+define("_INSTALL_L105","atempt to create database");
+define("_INSTALL_L106","Could not connect to the database server.");
+define("_INSTALL_L107","Please check the database server and its configuration.");
+define("_INSTALL_L108","Connection to database server is OK.");
+define("_INSTALL_L109","Database %s does not exists.");
+define("_INSTALL_L110","Database %s exists and connectable.");
+define("_INSTALL_L111","Database connection is OK.<br />Press the button below to create database tables.");
+define("_INSTALL_L112","admin user setting");
+define("_INSTALL_L113","Table %s deleted.");
+define("_INSTALL_L114","Failed creating database tables.");
+define("_INSTALL_L115","Database tables created.");
+define("_INSTALL_L116","insert data");
+define("_INSTALL_L117","finish");
+
+define("_INSTALL_L118","Failed creating table %s.");
+define("_INSTALL_L119","%d entries inserted to table %s.");
+define("_INSTALL_L120","Failed inserting %d entries to table %s.");
+
+define("_INSTALL_L121","Constant %s written to %s.");
+define("_INSTALL_L122","Failed writing constant %s to %s.");
+
+define("_INSTALL_L123","File %s stored in cache/ directory.");
+define("_INSTALL_L124","Failed storing file %s to cache/ directory.");
+
+define("_INSTALL_L125","File %s overwritten by %s.");
+define("_INSTALL_L126","Could not write to file %s.");
+
+define("_INSTALL_L130","The installer has detected tables for XOOPS 1.3.x in your database.<br />The installer will now attempt to upgrade your database to XOOPS2.");
+define("_INSTALL_L131","Tables for XOOPS2 already exist in your database.");
+define("_INSTALL_L132","update tables");
+define("_INSTALL_L133","Table %s updated.");
+define("_INSTALL_L134","Failed updating table %s.");
+define("_INSTALL_L135","Failed updating database tables.");
+define("_INSTALL_L136","Database tables updated.");
+define("_INSTALL_L137","update modules");
+define("_INSTALL_L138","update comments");
+define("_INSTALL_L139","update avatars");
+define("_INSTALL_L140","update smilies");
+define("_INSTALL_L141","The installer will now update each module to work with XOOPS2.<br />Make sure that you have uploaded all files in XOOPS2 package to your server.<br />This may take a while to complete.");
+define("_INSTALL_L142","Updating modules..");
+define("_INSTALL_L143","The installer will now update configuration data of XOOPS 1.3.x to be used with XOOPS2.");
+define("_INSTALL_L144","update config");
+define("_INSTALL_L145","Comment (ID: %s) inserted to the database.");
+define("_INSTALL_L146","Could not insert comment (ID: %s) to the database.");
+define("_INSTALL_L147","Updating comments..");
+define("_INSTALL_L148","Update complete.");
+define("_INSTALL_L149","The installer will now update comment posts in XOOPS 1.3.x to be used in XOOPS2.<br />This may take a while to complete.");
+define("_INSTALL_L150","The installer will now update the smiley and user rank images to be used with XOOPS2.<br />This may take a while to complete.");
+define("_INSTALL_L151","The installer will now update the user avatar images to be used in XOOPS2.<br />This may take a while to complete.");
+define("_INSTALL_L155","Updating smiley/rank images..");
+define("_INSTALL_L156","Updating user avatar images..");
+define("_INSTALL_L157","Select the default user group for each group type");
+define("_INSTALL_L158","Groups in 1.3.x");
+define("_INSTALL_L159","Webmasters");
+define("_INSTALL_L160","Register Users");
+define("_INSTALL_L161","Anonymous Users");
+define("_INSTALL_L162","You must select a default group for each group type.");
+define("_INSTALL_L163","Table %s dropped.");
+define("_INSTALL_L164","Failed deleting table %s.");
+
+// %s is filename
+define("_INSTALL_L152","Could not open %s.");
+define("_INSTALL_L153","Could not update %s.");
+define("_INSTALL_L154","%s updated.");
+
+define('_INSTALL_L128', 'Choose language to be used for the installation process');
+define('_INSTALL_L200', 'Reload');
+
+
+define('_INSTALL_CHARSET','ISO-8859-1');
+
+//added in XOOPS 2.1.0
+define("_INSTALL_L48", "Admin Passwords Differ");
+
+define("_INSTALL_L49", "Module Installation");
+define("_INSTALL_L129", "Modules");
+
+define("_INSTALL_L165", "%s Created Successfully");
+define("_INSTALL_L166", "%s Could not be created");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/install.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/install2.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/install2.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/install2.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,38 @@
+<?php
+// $Id$
+define("_INSTALL_WEBMASTER","Webmasters");
+define("_INSTALL_WEBMASTERD","Webmasters of this site");
+define("_INSTALL_REGUSERS","Registered Users");
+define("_INSTALL_REGUSERSD","Registered Users Group");
+define("_INSTALL_ANONUSERS","Anonymous Users");
+define("_INSTALL_ANONUSERSD","Anonymous Users Group");
+
+define("_INSTALL_DISCLMR", "While the administrators and moderators of this site will attempt to remove
+or edit any generally objectionable material as quickly as possible, it is
+impossible to review every message. Therefore you acknowledge that all posts
+made to this site express the views and opinions of the author and not the
+administrators, moderators or webmaster (except for posts by these people)
+and hence will not be held liable.
+
+You agree not to post any abusive, obscene, vulgar, slanderous, hateful,
+threatening, sexually-orientated or any other material that may violate any
+applicable laws. Doing so may lead to you being immediately and permanently
+banned (and your service provider being informed). The IP address of all
+posts is recorded to aid in enforcing these conditions. Creating multiple
+accounts for a single user is not allowed. You agree that the webmaster,
+administrator and moderators of this site have the right to remove, edit,
+move or close any topic at any time should they see fit. As a user you agree
+to any information you have entered above being stored in a database. While
+this information will not be disclosed to any third party without your
+consent the webmaster, administrator and moderators cannot be held
+responsible for any hacking attempt that may lead to the data being
+compromised.
+
+This site system uses cookies to store information on your local computer.
+These cookies do not contain any of the information you have entered above,
+they serve only to improve your viewing pleasure. The email address is used
+only for confirming your registration details and password (and for sending
+new passwords should you forget your current one).
+
+By clicking Register below you agree to be bound by these conditions.");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/install2.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/mysql.lang.data.sql
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/mysql.lang.data.sql 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/mysql.lang.data.sql 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,33 @@
+#
+# Dumping data for table `ranks`
+#
+
+INSERT INTO ranks VALUES (1, 'Just popping in', 0, 20, 0, 'rank3e632f95e81ca.gif');
+INSERT INTO ranks VALUES (2, 'Not too shy to talk', 21, 40, 0, 'rank3dbf8e94a6f72.gif');
+INSERT INTO ranks VALUES (3, 'Quite a regular', 41, 70, 0, 'rank3dbf8e9e7d88d.gif');
+INSERT INTO ranks VALUES (4, 'Just can\'t stay away', 71, 150, 0, 'rank3dbf8ea81e642.gif');
+INSERT INTO ranks VALUES (5, 'Home away from home', 151, 10000, 0, 'rank3dbf8eb1a72e7.gif');
+INSERT INTO ranks VALUES (6, 'Moderator', 0, 0, 1, 'rank3dbf8edf15093.gif');
+INSERT INTO ranks VALUES (7, 'Webmaster', 0, 0, 1, 'rank3dbf8ee8681cd.gif');
+
+#
+# Dumping data for table `smiles`
+#
+
+INSERT INTO smiles VALUES (1, ':-D', 'smil3dbd4d4e4c4f2.gif', 'Very Happy', 1);
+INSERT INTO smiles VALUES (2, ':-)', 'smil3dbd4d6422f04.gif', 'Smile', 1);
+INSERT INTO smiles VALUES (3, ':-(', 'smil3dbd4d75edb5e.gif', 'Sad', 1);
+INSERT INTO smiles VALUES (4, ':-o', 'smil3dbd4d8676346.gif', 'Surprised', 1);
+INSERT INTO smiles VALUES (5, ':-?', 'smil3dbd4d99c6eaa.gif', 'Confused', 1);
+INSERT INTO smiles VALUES (6, '8-)', 'smil3dbd4daabd491.gif', 'Cool', 1);
+INSERT INTO smiles VALUES (7, ':lol:', 'smil3dbd4dbc14f3f.gif', 'Laughing', 1);
+INSERT INTO smiles VALUES (8, ':-x', 'smil3dbd4dcd7b9f4.gif', 'Mad', 1);
+INSERT INTO smiles VALUES (9, ':-P', 'smil3dbd4ddd6835f.gif', 'Razz', 1);
+INSERT INTO smiles VALUES (10, ':oops:', 'smil3dbd4df1944ee.gif', 'Embaressed', 0);
+INSERT INTO smiles VALUES (11, ':cry:', 'smil3dbd4e02c5440.gif', 'Crying (very sad)', 0);
+INSERT INTO smiles VALUES (12, ':evil:', 'smil3dbd4e1748cc9.gif', 'Evil or Very Mad', 0);
+INSERT INTO smiles VALUES (13, ':roll:', 'smil3dbd4e29bbcc7.gif', 'Rolling Eyes', 0);
+INSERT INTO smiles VALUES (14, ';-)', 'smil3dbd4e398ff7b.gif', 'Wink', 0);
+INSERT INTO smiles VALUES (15, ':pint:', 'smil3dbd4e4c2e742.gif', 'Another pint of beer', 0);
+INSERT INTO smiles VALUES (16, ':hammer:', 'smil3dbd4e5e7563a.gif', 'ToolTimes at work', 0);
+INSERT INTO smiles VALUES (17, ':idea:', 'smil3dbd4e7853679.gif', 'I have an idea', 0);
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/mysql.lang.data.sql
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/welcome.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/welcome.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/welcome.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,36 @@
+<?php
+// $Id$
+$content .=
+"<u><b>What is it?</b></u>
+<p>
+<b>XOOPS</b> is a dynamic OO (Object Oriented) based open source portal script written in PHP.
+XOOPS supports a number of databases,
+making XOOPS an ideal tool for developing small to large dynamic community websites,
+intra company portals, corporate portals, weblogs and much more.
+</p>
+<p>
+XOOPS is released under the terms of the <a href='http://www.gnu.org/copyleft/gpl.html' target='_blank'>GNU General Public License (GPL)</a> and is free to use and modify.
+It is free to redistribute as long as you abide by the distribution terms of the GPL.
+</p>
+<u><b>Requirements</b></u>
+<p>
+<ul>
+<li>WWW Server (<a href='http://www.apache.org/' target='_blank'>Apache</a>, IIS, Roxen, etc)</li>
+<li><a href='http://www.php.net/' target='_blank'>PHP</a> 4.1.0 or higher (4.3.11 or higher recommended)</li>
+<li><a href='http://www.mysql.com/' target='_blank'>MySQL</a> Database 3.23.XX</li>
+</ul>
+</p>
+<u><b>Before you install</b></u>
+<ul>
+<li>Setup WWW server, PHP and database server properly.</li>
+<li>Prepare a database for your XOOPS site.</li>
+<li>Prepare user account and grant the user the access to the database.</li>
+<li>Make the directories of uploads/, cache/ and templates_c/ and the files of mainfile.php writabale.</li>
+<li>Turn cookie and JavaScript of your browser on.</li>
+</ul>
+<u><b>Installation</b></u>
+<p>
+Follow this install wizard.
+</p>
+"
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/language/english/welcome.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/makedata.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/install/makedata.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/install/makedata.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,131 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include_once './class/dbmanager.php';
+
+// RMV
+// TODO: Shouldn't we insert specific field names?? That way we can use
+// the defaults specified in the database...!!!! (and don't have problem
+// of missing fields in install file, when add new fields to database)
+
+function make_groups(&$dbm){
+ $gruops['XOOPS_GROUP_ADMIN'] = $dbm->insert('groups', " VALUES (0, '".addslashes(_INSTALL_WEBMASTER)."', '".addslashes(_INSTALL_WEBMASTERD)."', 'Admin')");
+ $gruops['XOOPS_GROUP_USERS'] = $dbm->insert('groups', " VALUES (0, '".addslashes(_INSTALL_REGUSERS)."', '".addslashes(_INSTALL_REGUSERSD)."', 'User')");
+ $gruops['XOOPS_GROUP_ANONYMOUS'] = $dbm->insert('groups', " VALUES (0, '".addslashes(_INSTALL_ANONUSERS)."', '".addslashes(_INSTALL_ANONUSERSD)."', 'Anonymous')");
+
+ if(!$gruops['XOOPS_GROUP_ADMIN'] || !$gruops['XOOPS_GROUP_USERS'] || !$gruops['XOOPS_GROUP_ANONYMOUS']){
+ return false;
+ }
+
+ return $gruops;
+}
+
+function make_data(&$dbm, &$cm, $adminname, $adminpass, $adminmail, $language, $gruops){
+
+ $myts =& textSanitizer::getInstance();
+ //$xoopsDB =& Database::getInstance();
+ //$dbm = new db_manager;
+
+ $tables = array();
+
+ // data for table 'groups_users_link'
+
+ $dbm->insert('groups_users_link', " VALUES (0, ".$gruops['XOOPS_GROUP_ADMIN'].", 1)");
+ $dbm->insert('groups_users_link', " VALUES (0, ".$gruops['XOOPS_GROUP_USERS'].", 1)");
+
+ // data for table 'group_permission'
+
+ $dbm->insert("group_permission", " VALUES (0,".$gruops['XOOPS_GROUP_ADMIN'].",1,1,'module_admin')");
+ $dbm->insert("group_permission", " VALUES (0,".$gruops['XOOPS_GROUP_ADMIN'].",1,1, 'module_read')");
+ $dbm->insert("group_permission", " VALUES (0,".$gruops['XOOPS_GROUP_USERS'].",1,1,'module_read')");
+ $dbm->insert("group_permission", " VALUES (0,".$gruops['XOOPS_GROUP_ANONYMOUS'].",1,1,'module_read')");
+
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",1,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",2,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",3,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",4,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",5,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",6,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",7,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",8,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",9,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",10,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",11,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",12,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",13,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",14,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",15,1,'system_admin')");
+
+ // data for table 'banner'
+
+ $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date) VALUES (1, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/xoops_banner.gif', 'http://www.xoops.org/', 1008813250)");
+ $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date) VALUES (2, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/xoops_banner_2.gif', 'http://www.xoops.org/', 1008813250)");
+ $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date) VALUES (3, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/banner.swf', 'http://www.xoops.org/', 1008813250)");
+
+ // default theme
+
+ $time = time();
+ $dbm->insert('tplset', " VALUES (1, 'default', 'XOOPS Default Template Set', '', ".$time.")");
+
+ // system modules
+
+ if ( file_exists('../modules/system/language/'.$language.'/modinfo.php') ) {
+ include '../modules/system/language/'.$language.'/modinfo.php';
+ } else {
+ include '../modules/system/language/english/modinfo.php';
+ $language = 'english';
+ }
+
+ $modversion = array();
+ include_once '../modules/system/xoops_version.php';
+ $time = time();
+
+ // data for table 'users'
+
+ /*
+ $temp = md5($adminpass);
+ $regdate = time();
+ //$dbadminname= addslashes($adminname);
+ // RMV-NOTIFY (updated for extra columns in user table)
+ $member_handler =& xoops_gethandler('member');
+ $user =& $member_handler->createUser();
+ $user->setVar('uid', 1);
+ $user->setVar('uname', addslashes($adminname));
+ $user->setVar('name', addslashes($adminname)); //set real name to username for now
+ $user->setVar('email', addslashes($adminmail));
+ $user->setVar('user_avatar', 'blank.gif');
+ $user->setVar('pass', $temp);
+ $user->setVar('rank', 7);
+ $user->setVar('level', 5);
+ if (!$member_handler->insertUser($user)) {
+ echo $user->getHtmlErrors();
+ }
+ */
+
+ return $gruops;
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/makedata.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/passwd.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/install/passwd.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/install/passwd.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,6 @@
+<?php
+// If you use HTTP authentication for XOOPS installer,
+// put user name and passward in the define statement below.
+define('INSTALL_USER', '');
+define('INSTALL_PASSWD', '');
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/passwd.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/sql/mysql.data.sql
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/install/sql/mysql.data.sql 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/install/sql/mysql.data.sql 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,67 @@
+# phpMyAdmin MySQL-Dump
+# version 2.3.2
+# http://www.phpmyadmin.net/ (download page)
+#
+# Host: localhost
+# Generation Time: Jan 09, 2003 at 12:37 AM
+# Server version: 3.23.54
+# PHP Version: 4.2.2
+# Database : `xoops2`
+
+
+#
+# Dumping data for table `bannerclient`
+#
+
+INSERT INTO bannerclient VALUES (0, 'XOOPS', 'XOOPS Dev Team', 'webmaster at xoops.org', '', '', '');
+
+#
+# Dumping data for table `bannerfinish`
+#
+
+#
+# Dumping data for table `configoption`
+#
+
+
+
+#
+# Dumping data for table `image`
+#
+
+
+#
+# Dumping data for table `imagebody`
+#
+
+
+#
+# Dumping data for table `imagecategory`
+#
+
+
+#
+# Dumping data for table `imgset`
+#
+
+INSERT INTO imgset VALUES (1, 'default', 0);
+
+#
+# Dumping data for table `imgset_tplset_link`
+#
+
+INSERT INTO imgset_tplset_link VALUES (1, 'default');
+
+#
+# Dumping data for table `online`
+#
+
+
+#
+# Dumping data for table `priv_msgs`
+#
+
+
+#
+# Dumping data for table `session`
+#
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/sql/mysql.data.sql
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/sql/mysql.structure.sql
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/install/sql/mysql.structure.sql 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/install/sql/mysql.structure.sql 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,558 @@
+# phpMyAdmin MySQL-Dump
+# version 2.3.2
+# http://www.phpmyadmin.net/ (download page)
+#
+# Host: localhost
+# Generation Time: Jan 09, 2003 at 12:35 AM
+# Server version: 3.23.54
+# PHP Version: 4.2.2
+# Database : `xoops2`
+# --------------------------------------------------------
+
+#
+# Table structure for table `avatar`
+#
+
+CREATE TABLE avatar (
+ avatar_id mediumint(8) unsigned NOT NULL auto_increment,
+ avatar_file varchar(30) NOT NULL default '',
+ avatar_name varchar(100) NOT NULL default '',
+ avatar_mimetype varchar(30) NOT NULL default '',
+ avatar_created int(10) NOT NULL default '0',
+ avatar_display tinyint(1) unsigned NOT NULL default '0',
+ avatar_weight smallint(5) unsigned NOT NULL default '0',
+ avatar_type char(1) NOT NULL default '',
+ PRIMARY KEY (avatar_id),
+ KEY avatar_type (avatar_type,avatar_display)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `avatar_user_link`
+#
+
+CREATE TABLE avatar_user_link (
+ avatar_id mediumint(8) unsigned NOT NULL default '0',
+ user_id mediumint(8) unsigned NOT NULL default '0',
+ KEY avatar_user_id (avatar_id,user_id)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `banner`
+#
+
+CREATE TABLE banner (
+ bid smallint(5) unsigned NOT NULL auto_increment,
+ cid tinyint(3) unsigned NOT NULL default '0',
+ imptotal mediumint(8) unsigned NOT NULL default '0',
+ impmade mediumint(8) unsigned NOT NULL default '0',
+ clicks mediumint(8) unsigned NOT NULL default '0',
+ imageurl varchar(255) NOT NULL default '',
+ clickurl varchar(255) NOT NULL default '',
+ date int(10) NOT NULL default '0',
+ htmlbanner tinyint(1) NOT NULL default '0',
+ htmlcode text NOT NULL,
+ PRIMARY KEY (bid),
+ KEY idxbannercid (cid),
+ KEY idxbannerbidcid (bid,cid)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `bannerclient`
+#
+
+CREATE TABLE bannerclient (
+ cid smallint(5) unsigned NOT NULL auto_increment,
+ name varchar(60) NOT NULL default '',
+ contact varchar(60) NOT NULL default '',
+ email varchar(60) NOT NULL default '',
+ login varchar(10) NOT NULL default '',
+ passwd varchar(10) NOT NULL default '',
+ extrainfo text NOT NULL,
+ PRIMARY KEY (cid),
+ KEY login (login)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `bannerfinish`
+#
+
+CREATE TABLE bannerfinish (
+ bid smallint(5) unsigned NOT NULL auto_increment,
+ cid smallint(5) unsigned NOT NULL default '0',
+ impressions mediumint(8) unsigned NOT NULL default '0',
+ clicks mediumint(8) unsigned NOT NULL default '0',
+ datestart int(10) unsigned NOT NULL default '0',
+ dateend int(10) unsigned NOT NULL default '0',
+ PRIMARY KEY (bid),
+ KEY cid (cid)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `block_module_link`
+#
+
+CREATE TABLE block_module_link (
+ block_id mediumint(8) unsigned NOT NULL default '0',
+ module_id smallint(5) NOT NULL default '0',
+ pageid smallint(5) NOT NULL default '0',
+ PRIMARY KEY (block_id, module_id, pageid)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `comments`
+#
+
+CREATE TABLE xoopscomments (
+ com_id mediumint(8) unsigned NOT NULL auto_increment,
+ com_pid mediumint(8) unsigned NOT NULL default '0',
+ com_rootid mediumint(8) unsigned NOT NULL default '0',
+ com_modid smallint(5) unsigned NOT NULL default '0',
+ com_itemid mediumint(8) unsigned NOT NULL default '0',
+ com_icon varchar(25) NOT NULL default '',
+ com_created int(10) unsigned NOT NULL default '0',
+ com_modified int(10) unsigned NOT NULL default '0',
+ com_uid mediumint(8) unsigned NOT NULL default '0',
+ com_ip varchar(15) NOT NULL default '',
+ com_title varchar(255) NOT NULL default '',
+ com_text text NOT NULL,
+ com_sig tinyint(1) unsigned NOT NULL default '0',
+ com_status tinyint(1) unsigned NOT NULL default '0',
+ com_exparams varchar(255) NOT NULL default '',
+ dohtml tinyint(1) unsigned NOT NULL default '0',
+ dosmiley tinyint(1) unsigned NOT NULL default '0',
+ doxcode tinyint(1) unsigned NOT NULL default '0',
+ doimage tinyint(1) unsigned NOT NULL default '0',
+ dobr tinyint(1) unsigned NOT NULL default '0',
+ PRIMARY KEY (com_id),
+ KEY com_pid (com_pid),
+ KEY com_itemid (com_itemid),
+ KEY com_uid (com_uid),
+ KEY com_title (com_title(40))
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+# RMV-NOTIFY
+# Table structure for table `notifications`
+#
+
+CREATE TABLE xoopsnotifications (
+ not_id mediumint(8) unsigned NOT NULL auto_increment,
+ not_modid smallint(5) unsigned NOT NULL default '0',
+ not_itemid mediumint(8) unsigned NOT NULL default '0',
+ not_category varchar(30) NOT NULL default '',
+ not_event varchar(30) NOT NULL default '',
+ not_uid mediumint(8) unsigned NOT NULL default '0',
+ not_mode tinyint(1) NOT NULL default 0,
+ PRIMARY KEY (not_id),
+ KEY not_modid (not_modid),
+ KEY not_itemid (not_itemid),
+ KEY not_class (not_category),
+ KEY not_uid (not_uid),
+ KEY not_event (not_event)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `config`
+#
+
+CREATE TABLE config (
+ conf_id mediumint(8) unsigned NOT NULL auto_increment,
+ conf_modid smallint(5) unsigned NOT NULL default '0',
+ conf_catid smallint(5) unsigned NOT NULL default '0',
+ conf_name varchar(25) NOT NULL default '',
+ conf_title varchar(30) NOT NULL default '',
+ conf_value text NOT NULL,
+ conf_desc varchar(50) NOT NULL default '',
+ conf_formtype varchar(15) NOT NULL default '',
+ conf_valuetype varchar(10) NOT NULL default '',
+ conf_order smallint(5) unsigned NOT NULL default '0',
+ PRIMARY KEY (conf_id),
+ KEY conf_mod_cat_id (conf_modid,conf_catid)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `configcategory`
+#
+
+CREATE TABLE configcategory (
+ confcat_id smallint(5) unsigned NOT NULL,
+ confcat_modid smallint(5) unsigned NOT NULL,
+ confcat_name varchar(25) NOT NULL default '',
+ confcat_order smallint(5) unsigned NOT NULL default '0',
+ confcat_nameid varchar(255) NOT NULL default '',
+ confcat_description text NOT NULL,
+ PRIMARY KEY (`confcat_id`, `confcat_modid`),
+ KEY module (`confcat_modid`)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `configoption`
+#
+
+CREATE TABLE configoption (
+ confop_id mediumint(8) unsigned NOT NULL auto_increment,
+ confop_name varchar(255) NOT NULL default '',
+ confop_value varchar(255) NOT NULL default '',
+ conf_id smallint(5) unsigned NOT NULL default '0',
+ PRIMARY KEY (confop_id),
+ KEY conf_id (conf_id)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `groups`
+#
+
+CREATE TABLE groups (
+ groupid smallint(5) unsigned NOT NULL auto_increment,
+ name varchar(50) NOT NULL default '',
+ description text NOT NULL,
+ group_type varchar(10) NOT NULL default '',
+ PRIMARY KEY (groupid),
+ KEY group_type (group_type)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `group_permission`
+#
+
+CREATE TABLE group_permission (
+ gperm_id int(10) unsigned NOT NULL auto_increment,
+ gperm_groupid smallint(5) unsigned NOT NULL default '0',
+ gperm_itemid mediumint(8) unsigned NOT NULL default '0',
+ gperm_modid mediumint(5) unsigned NOT NULL default '0',
+ gperm_name varchar(50) NOT NULL default '',
+ PRIMARY KEY (gperm_id),
+ KEY groupid (gperm_groupid),
+ KEY itemid (gperm_itemid),
+ KEY gperm_modid (gperm_modid,gperm_name(10))
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+
+#
+# Table structure for table `groups_users_link`
+#
+
+CREATE TABLE groups_users_link (
+ linkid mediumint(8) unsigned NOT NULL auto_increment,
+ groupid smallint(5) unsigned NOT NULL default '0',
+ uid mediumint(8) unsigned NOT NULL default '0',
+ PRIMARY KEY (linkid),
+ KEY groupid_uid (groupid,uid)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `image`
+#
+
+CREATE TABLE image (
+ image_id mediumint(8) unsigned NOT NULL auto_increment,
+ image_name varchar(30) NOT NULL default '',
+ image_nicename varchar(255) NOT NULL default '',
+ image_mimetype varchar(30) NOT NULL default '',
+ image_created int(10) unsigned NOT NULL default '0',
+ image_display tinyint(1) unsigned NOT NULL default '0',
+ image_weight smallint(5) unsigned NOT NULL default '0',
+ imgcat_id smallint(5) unsigned NOT NULL default '0',
+ PRIMARY KEY (image_id),
+ KEY imgcat_id (imgcat_id),
+ KEY image_display (image_display)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `imagebody`
+#
+
+CREATE TABLE imagebody (
+ image_id mediumint(8) unsigned NOT NULL default '0',
+ image_body mediumblob,
+ KEY image_id (image_id)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `imagecategory`
+#
+
+CREATE TABLE imagecategory (
+ imgcat_id smallint(5) unsigned NOT NULL auto_increment,
+ imgcat_name varchar(100) NOT NULL default '',
+ imgcat_maxsize int(8) unsigned NOT NULL default '0',
+ imgcat_maxwidth smallint(3) unsigned NOT NULL default '0',
+ imgcat_maxheight smallint(3) unsigned NOT NULL default '0',
+ imgcat_display tinyint(1) unsigned NOT NULL default '0',
+ imgcat_weight smallint(3) unsigned NOT NULL default '0',
+ imgcat_type char(1) NOT NULL default '',
+ imgcat_storetype varchar(5) NOT NULL default '',
+ PRIMARY KEY (imgcat_id),
+ KEY imgcat_display (imgcat_display)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+
+#
+# Table structure for table `imgset`
+#
+
+CREATE TABLE imgset (
+ imgset_id smallint(5) unsigned NOT NULL auto_increment,
+ imgset_name varchar(50) NOT NULL default '',
+ imgset_refid mediumint(8) unsigned NOT NULL default '0',
+ PRIMARY KEY (imgset_id),
+ KEY imgset_refid (imgset_refid)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `imgset_tplset_link`
+#
+
+CREATE TABLE imgset_tplset_link (
+ imgset_id smallint(5) unsigned NOT NULL default '0',
+ tplset_name varchar(50) NOT NULL default '',
+ KEY tplset_name (tplset_name(10))
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `imgsetimg`
+#
+
+CREATE TABLE imgsetimg (
+ imgsetimg_id mediumint(8) unsigned NOT NULL auto_increment,
+ imgsetimg_file varchar(50) NOT NULL default '',
+ imgsetimg_body blob NOT NULL,
+ imgsetimg_imgset smallint(5) unsigned NOT NULL default '0',
+ PRIMARY KEY (imgsetimg_id),
+ KEY imgsetimg_imgset (imgsetimg_imgset)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `modules`
+#
+
+CREATE TABLE modules (
+ mid smallint(5) unsigned NOT NULL auto_increment,
+ name varchar(150) NOT NULL default '',
+ version smallint(5) unsigned NOT NULL default '100',
+ last_update int(10) unsigned NOT NULL default '0',
+ weight smallint(3) unsigned NOT NULL default '0',
+ isactive tinyint(1) unsigned NOT NULL default '0',
+ dirname varchar(25) NOT NULL default '',
+ hasmain tinyint(1) unsigned NOT NULL default '0',
+ hasadmin tinyint(1) unsigned NOT NULL default '0',
+ hassearch tinyint(1) unsigned NOT NULL default '0',
+ hasconfig tinyint(1) unsigned NOT NULL default '0',
+ hascomments tinyint(1) unsigned NOT NULL default '0',
+ hasnotification tinyint(1) unsigned NOT NULL default '0',
+ PRIMARY KEY (mid),
+ KEY hasmain (hasmain),
+ KEY hasadmin (hasadmin),
+ KEY hassearch (hassearch),
+ KEY hasnotification (hasnotification),
+ KEY dirname (dirname),
+ KEY name (name(15))
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `newblocks`
+#
+
+CREATE TABLE newblocks (
+ bid mediumint(8) unsigned NOT NULL auto_increment,
+ mid smallint(5) unsigned NOT NULL default '0',
+ options varchar(255) NOT NULL default '',
+ name varchar(255) NOT NULL default '',
+ c_type char(1) NOT NULL default '',
+ isactive tinyint(1) unsigned NOT NULL default '0',
+ dirname varchar(50) NOT NULL default '',
+ func_file varchar(50) NOT NULL default '',
+ show_func varchar(50) NOT NULL default '',
+ edit_func varchar(50) NOT NULL default '',
+ template varchar(50) NOT NULL default '',
+ last_modified int(10) unsigned NOT NULL default '0',
+ PRIMARY KEY (bid),
+ KEY mid (mid),
+ KEY `active` (`bid`, `isactive`)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `online`
+#
+
+CREATE TABLE online (
+ online_uid mediumint(8) unsigned NOT NULL default '0',
+ online_uname varchar(25) NOT NULL default '',
+ online_updated int(10) unsigned NOT NULL default '0',
+ online_module smallint(5) unsigned NOT NULL default '0',
+ online_ip varchar(15) NOT NULL default '',
+ KEY online_module (online_module)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `ranks`
+#
+
+CREATE TABLE ranks (
+ rank_id smallint(5) unsigned NOT NULL auto_increment,
+ rank_title varchar(50) NOT NULL default '',
+ rank_min mediumint(8) unsigned NOT NULL default '0',
+ rank_max mediumint(8) unsigned NOT NULL default '0',
+ rank_special tinyint(1) unsigned NOT NULL default '0',
+ rank_image varchar(255) default NULL,
+ PRIMARY KEY (rank_id),
+ KEY rank_min (rank_min),
+ KEY rank_max (rank_max),
+ KEY rankminrankmaxranspecial (rank_min,rank_max,rank_special),
+ KEY rankspecial (rank_special)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `session`
+#
+
+CREATE TABLE session (
+ sess_id varchar(32) NOT NULL default '',
+ sess_updated int(10) unsigned NOT NULL default '0',
+ sess_ip varchar(15) NOT NULL default '',
+ sess_data MEDIUMBLOB NOT NULL,
+ PRIMARY KEY (sess_id),
+ KEY updated (sess_updated)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `smiles`
+#
+
+CREATE TABLE smiles (
+ id smallint(5) unsigned NOT NULL auto_increment,
+ code varchar(50) NOT NULL default '',
+ smile_url varchar(100) NOT NULL default '',
+ emotion varchar(75) NOT NULL default '',
+ display tinyint(1) NOT NULL default '0',
+ PRIMARY KEY (id)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `tplset`
+#
+
+CREATE TABLE tplset (
+ tplset_id int(7) unsigned NOT NULL auto_increment,
+ tplset_name varchar(50) NOT NULL default '',
+ tplset_desc varchar(255) NOT NULL default '',
+ tplset_credits text NOT NULL,
+ tplset_created int(10) unsigned NOT NULL default '0',
+ PRIMARY KEY (tplset_id)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `tplfile`
+#
+
+CREATE TABLE tplfile (
+ tpl_id mediumint(7) unsigned NOT NULL auto_increment,
+ tpl_refid smallint(5) unsigned NOT NULL default '0',
+ tpl_module varchar(25) NOT NULL default '',
+ tpl_tplset varchar(50) NOT NULL default '',
+ tpl_file varchar(50) NOT NULL default '',
+ tpl_desc varchar(255) NOT NULL default '',
+ tpl_lastmodified int(10) unsigned NOT NULL default '0',
+ tpl_lastimported int(10) unsigned NOT NULL default '0',
+ tpl_type varchar(20) NOT NULL default '',
+ PRIMARY KEY (tpl_id),
+ KEY tpl_refid (tpl_refid,tpl_type),
+ KEY tpl_tplset (tpl_tplset,tpl_file(10))
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+#
+# Table structure for table `tplsource`
+#
+
+CREATE TABLE tplsource (
+ tpl_id mediumint(7) unsigned NOT NULL default '0',
+ tpl_source mediumtext NOT NULL,
+ KEY tpl_id (tpl_id)
+) TYPE=MyISAM;
+# --------------------------------------------------------
+
+# Table structure for table `users`
+#
+
+CREATE TABLE `users` (
+ `uid` mediumint(8) unsigned NOT NULL auto_increment,
+ `uname` varchar(55) NOT NULL default '',
+ `loginname` varchar(25) NOT NULL default '',
+ `name` varchar(75) NOT NULL default '',
+ `email` varchar(60) NOT NULL default '',
+ `user_avatar` varchar(30) NOT NULL default 'blank.gif',
+ `pass` varchar(32) NOT NULL default '',
+ `rank` smallint(5) unsigned NOT NULL default '0',
+ `level` tinyint(3) NOT NULL default '1',
+ PRIMARY KEY (`uid`),
+ KEY uname (`uname`),
+ KEY email (`email`),
+ KEY uiduname (`uid`,`uname`),
+ KEY unamepass (`uname`,`pass`)
+) TYPE=MyISAM;
+
+CREATE TABLE `user_profile` (
+ `profileid` int(12) unsigned NOT NULL auto_increment,
+ PRIMARY KEY (`profileid`)
+) TYPE=MyISAM;
+
+CREATE TABLE `user_profile_field` (
+ `fieldid` int(12) unsigned NOT NULL auto_increment,
+ `field_type` varchar(30) NOT NULL default '',
+ `field_valuetype` tinyint(2) unsigned NOT NULL default '0',
+ `field_name` varchar(255) NOT NULL default '',
+ `field_title` varchar(255) NOT NULL default '',
+ `field_description` text NOT NULL,
+ `field_required` tinyint(2) unsigned NOT NULL default '0',
+ `field_maxlength` tinyint(6) unsigned NOT NULL default '0',
+ `field_default` text NOT NULL,
+ `field_moduleid` int(12) unsigned NOT NULL default '0',
+ `field_notnull` tinyint(2) unsigned NOT NULL default '0',
+ `field_edit` tinyint(2) unsigned NOT NULL default '0',
+ `field_show` tinyint(2) unsigned NOT NULL default '0',
+ `field_config` tinyint(2) unsigned NOT NULL default '0',
+ `field_options` text NOT NULL default '',
+ `field_register` tinyint(2) unsigned NOT NULL default '0',
+ PRIMARY KEY (`fieldid`),
+ UNIQUE KEY `field_name` (`field_name`)
+) TYPE=MyISAM;
+
+CREATE TABLE `block_instance` (
+ `instanceid` int(12) unsigned NOT NULL auto_increment,
+ `bid` int(12) unsigned NOT NULL,
+ `options` text NOT NULL default '',
+ `title` varchar(255) NOT NULL default '',
+ `side` tinyint(1) unsigned NOT NULL default '0',
+ `weight` smallint(5) unsigned NOT NULL default '0',
+ `visible` tinyint(1) unsigned NOT NULL default '0',
+ `bcachetime` int(10) unsigned NOT NULL default '0',
+ PRIMARY KEY (`instanceid`),
+ KEY `join` (`instanceid`, `visible`, `weight`)
+) TYPE=MyISAM;
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/sql/mysql.structure.sql
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/install/style.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/install/style.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/install/style.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,62 @@
+body {
+ font-family : tahoma, osaka,taipei,verdana, arial, helvetica, sans-serif;
+ color;#000000;
+ font-size: 12px;
+ margin: 0;
+ padding: 0;
+}
+
+a {
+ text-decoration: none;
+ color: #666666;font-weight: bold;
+ background-color: transparent;
+}
+
+a:hover {
+ text-decoration: none;
+ color: #ff9966;
+ font-weight: bold;
+ background-color: transparent;
+}
+
+td {
+ font-family : tahoma, osaka,taipei,verdana, arial, helvetica, sans-serif;
+ color: #000000;
+ font-size: 12px;
+ border-top-width : 1px;
+ border-right-width : 1px;
+ border-bottom-width : 1px;
+ border-left-width : 1px;
+}
+
+img { border:0; }
+div { text-align: center; }
+.bg1 { background-color: #f7f7f7; color: #000000; }
+.bg2 { background-color: #000000; color: #ffffff; }
+.bg3 { background-color: #2f5376; color: #f9b743; }
+.bg4 { background-color: #f5f5f5; color: #000000; }
+.bg5 { background-color: #f5f5f5; color: #000000; }
+.fg1 { color: #f9b743; }
+.fg2 { color: #000000; }
+
+input {
+ border-right: #000000 1px solid;
+ border-top: #000000 1px solid;
+ font: 8pt verdana, arial, helvetica;
+ border-left: #000000 1px solid;
+ color: #000000;
+ border-bottom: #000000 1px solid;
+ background-color: #f7f7f7
+}
+
+select {
+ border-right: #000000 1px solid;
+ border-top: #000000 1px solid; background: #f7f7f7;
+ font: 8pt verdana, arial, helvetica;
+ border-left: #000000 1px solid;
+ color: #000000;
+ border-bottom: #000000 1px solid
+}
+table {
+ border : 0;
+}
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/install/style.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/avatar.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/avatar.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/avatar.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,128 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+
+class XoopsAvatar extends XoopsObject
+{
+ var $_userCount;
+
+ function XoopsAvatar()
+ {
+ $this->XoopsObject();
+ $this->initVar('avatar_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('avatar_file', XOBJ_DTYPE_OTHER, null, false, 30);
+ $this->initVar('avatar_name', XOBJ_DTYPE_TXTBOX, null, true, 100);
+ $this->initVar('avatar_mimetype', XOBJ_DTYPE_OTHER, null, false);
+ $this->initVar('avatar_created', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('avatar_display', XOBJ_DTYPE_INT, 1, false);
+ $this->initVar('avatar_weight', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('avatar_type', XOBJ_DTYPE_OTHER, 0, false);
+ }
+
+ function setUserCount($value)
+ {
+ $this->_userCount = intval($value);
+ }
+
+ function getUserCount()
+ {
+ return $this->_userCount;
+ }
+}
+
+
+/**
+* XOOPS avatar handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS avatar class objects.
+*
+*
+* @author Kazumi Ono <onokazu at xoops.org>
+*/
+
+class XoopsAvatarHandler extends XoopsPersistableObjectHandler
+{
+ function XoopsAvatarHandler(&$db) {
+ $this->XoopsPersistableObjectHandler($db, 'avatar', 'XoopsAvatar', 'avatar_id');
+ }
+
+ function addUser($avatar_id, $user_id){
+ $avatar_id = intval($avatar_id);
+ $user_id = intval($user_id);
+ if ($avatar_id < 1 || $user_id < 1) {
+ return false;
+ }
+ $sql = sprintf("DELETE FROM %s WHERE user_id = %u", $this->db->prefix('avatar_user_link'), $user_id);
+ $this->db->query($sql);
+ $sql = sprintf("INSERT INTO %s (avatar_id, user_id) VALUES (%u, %u)", $this->db->prefix('avatar_user_link'), $avatar_id, $user_id);
+ if (!$result =& $this->db->query($sql)) {
+ return false;
+ }
+ return true;
+ }
+
+ function getUser( &$avatar ) {
+ $ret = array();
+ if (strtolower(get_class($avatar)) != 'xoopsavatar') {
+ return $ret;
+ }
+ $sql = 'SELECT user_id FROM '.$this->db->prefix('avatar_user_link').' WHERE avatar_id='.$avatar->getVar('avatar_id');
+ if (!$result = $this->db->query($sql)) {
+ return $ret;
+ }
+ while ($myrow = $this->db->fetchArray($result)) {
+ $ret[] =& $myrow['user_id'];
+ }
+ return $ret;
+ }
+
+ function getList($avatar_type = null, $avatar_display = null)
+ {
+ $criteria = new CriteriaCompo();
+ if (isset($avatar_type)) {
+ $avatar_type = ($avatar_type == 'C') ? 'C' : 'S';
+ $criteria->add(new Criteria('avatar_type', $avatar_type));
+ }
+ if (isset($avatar_display)) {
+ $criteria->add(new Criteria('avatar_display', intval($avatar_display)));
+ }
+ $avatars =& $this->getObjects($criteria, true);
+ $ret = array('blank.gif' => _NONE);
+ foreach (array_keys($avatars) as $i) {
+ $ret[$avatars[$i]->getVar('avatar_file')] = $avatars[$i]->getVar('avatar_name');
+ }
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/avatar.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/block.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/block.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/block.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,250 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+
+/**
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000 XOOPS.org
+ **/
+
+/**
+ * A block
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000 XOOPS.org
+ *
+ * @package kernel
+ **/
+class XoopsBlock extends XoopsObject
+{
+
+ /**
+ * constructor
+ *
+ * @param mixed $id
+ **/
+ function XoopsBlock($id = null)
+ {
+ $this->initVar('bid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('mid', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('options', XOBJ_DTYPE_ARRAY, null, false);
+ $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, true, 150);
+ $this->initVar('isactive', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('dirname', XOBJ_DTYPE_TXTBOX, null, false, 50);
+ $this->initVar('func_file', XOBJ_DTYPE_TXTBOX, null, false, 50);
+ $this->initVar('show_func', XOBJ_DTYPE_TXTBOX, null, false, 50);
+ $this->initVar('edit_func', XOBJ_DTYPE_TXTBOX, null, false, 50);
+ $this->initVar('template', XOBJ_DTYPE_OTHER, null, false);
+ $this->initVar('last_modified', XOBJ_DTYPE_INT, 0, false);
+
+ }
+
+ /**
+ * (HTML-) form for setting the options of the block
+ *
+ * @return string HTML for the form, FALSE if not defined for this block
+ **/
+ function getOptions() {
+ if ( !( $edit_func = $this->getVar('edit_func') ) ) {
+ return false;
+ }
+ list( $dirname, $func, $lang ) = array( $this->getVar('dirname'), $this->getVar('func_file'), $GLOBALS['xoopsConfig']['language'] );
+
+ if ( file_exists( XOOPS_ROOT_PATH . "/modules/$dirname/blocks/$func" ) ) {
+ if ( file_exists( XOOPS_ROOT_PATH . "/modules/$dirname/language/$lang/blocks.php") ) {
+ include_once( XOOPS_ROOT_PATH . "/modules/$dirname/language/$lang/blocks.php" );
+ } elseif ( file_exists( XOOPS_ROOT_PATH . "/modules/$dirname/language/english/blocks.php" ) ) {
+ include_once( XOOPS_ROOT_PATH . "/modules/$dirname/language/english/blocks.php" );
+ }
+ include_once( XOOPS_ROOT_PATH . "/modules/$dirname/blocks/$func" );
+ return $edit_func( $this->getVar('options') );
+ }
+ return false;
+ }
+}
+
+
+/**
+ * XOOPS block handler class. (Singelton)
+ *
+ * This class is responsible for providing data access mechanisms to the data source
+ * of XOOPS block class objects.
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000 XOOPS.org
+ * @package kernel
+ * @subpackage block
+*/
+class XoopsBlockHandler extends XoopsPersistableObjectHandler
+{
+
+ function XoopsBlockHandler(&$db) {
+ $this->XoopsPersistableObjectHandler($db, 'newblocks', 'XoopsBlock', 'bid', 'name');
+ }
+
+ /**
+ * delete a block from the database
+ *
+ * @param object XoopsBlock $block reference to the block to delete
+ * @param bool $force
+ *
+ * @return bool TRUE if succesful
+ **/
+ function delete(&$block, $force = false)
+ {
+ $instance_handler =& xoops_gethandler('blockinstance');
+ $instances = $instance_handler->getObjects(new Criteria('bid', $block->getVar('bid')));
+ if (count($instances) > 0) {
+ foreach (array_keys($instances) as $i) {
+ if (!$instance_handler->delete($instances[$i], $force)) {
+ //@TODO: LOCALIZE!
+ $block->setErrors("could not delete block instance ".$instances[$i]->getVar('title')."<br />".implode('<br />', $instances[$i]->getErrors()));
+ return false;
+ }
+ }
+ }
+ if ($block->getVar('template') != '') {
+ $tplfile_handler =& xoops_gethandler('tplfile');
+ $btemplate = $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $block->getVar('bid'));
+ if (count($btemplate) > 0) {
+ $tplfile_handler->delete($btemplate[0]);
+ }
+ }
+ return parent::delete($block, $force);
+ }
+
+ /**
+ * get a list of blocks matchich certain conditions
+ *
+ * @param string $criteria conditions to match
+ *
+ * @return array array of blocks matching the conditions
+ **/
+ function getList($criteria = null)
+ {
+ $blocks = $this->getObjects($criteria, true);
+ $ret = array();
+ foreach ( array_keys($blocks) as $i ) {
+ $ret[$i] = $blocks[$i]->getVar( 'name' );
+ }
+ return $ret;
+ }
+
+ function getByModule($moduleid, $asobject=true, $id_as_key = false) {
+ return $this->getObjects(new Criteria('mid', $moduleid), $id_as_key, $asobject);
+ }
+
+ function getAllByGroupModule($groupid, $module_id=0, $toponlyblock=false, $visible=null, $orderby='i.weight,i.instanceid', $isactive=1) {
+ $instance_handler =& xoops_gethandler( 'blockinstance' );
+ return $instance_handler->getLinkedObjects( $groupid, $module_id, $toponlyblock, $visible, $orderby, $isactive );
+ }
+
+ function getAdminBlocks($groupid, $orderby='i.weight,i.instanceid') {
+ $instance_handler =& xoops_gethandler('blockinstance');
+ return $instance_handler->getLinkedObjects($groupid, -2, false, 1);
+ }
+
+ function assignBlocks() {
+ global $xoopsTpl, $xoopsLogger, $xoopsUser, $xoopsModule, $xoopsConfig, $xoopsOption;
+
+ $modulepage = $xoopsModule->getCurrentPage();
+
+ if ($modulepage == array() ) {
+ return;
+ }
+
+ $groups = $xoopsUser ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
+ $block_arr = $this->getAllByGroupModule($groups, $modulepage["mid"], $modulepage["page"], XOOPS_BLOCK_VISIBLE);
+
+ $old_context = $xoopsLogger->context;
+ $xoopsLogger->context = "block";
+ $sides = array(XOOPS_SIDEBLOCK_LEFT => 'l',
+ XOOPS_CENTERBLOCK_LEFT => 'cl',
+ XOOPS_CENTERBLOCK_RIGHT => 'cr',
+ XOOPS_CENTERBLOCK_CENTER => 'cc',
+ XOOPS_SIDEBLOCK_RIGHT => 'r');
+
+ foreach (array_keys($block_arr) as $i) {
+ $bcachetime = $block_arr[$i]->getVar('bcachetime');
+ if (empty($bcachetime)) {
+ $xoopsTpl->xoops_setCaching(0);
+ } else {
+ $xoopsTpl->xoops_setCaching(2);
+ $xoopsTpl->xoops_setCacheTime($bcachetime);
+ }
+ $btpl = $block_arr[$i]->block->getVar('template') != '' ? $block_arr[$i]->block->getVar('template') : "system_block_dummy.html";
+
+ list( $side, $instanceid ) = array( $block_arr[$i]->getVar('side'), $block_arr[$i]->getVar('instanceid') );
+ if (empty($bcachetime) || !$xoopsTpl->is_cached('db:'.$btpl, 'blk_'.$instanceid)) {
+ //@TODO: This should definitely not be here !! (have to put this in the logger class somewhere, if needed)
+ if ( !isset( $xoopsLogger->queries[$xoopsLogger->context] ) ) {
+ $xoopsLogger->queries[$xoopsLogger->context] = array();
+ }
+ $querycountbefore = count( $xoopsLogger->queries[$xoopsLogger->context] );
+ if ( !( $bresult = $block_arr[$i]->buildBlock() ) ) {
+ continue;
+ }
+ $xoopsTpl->assign_by_ref('block', $bresult);
+
+ $bcontent = $xoopsTpl->fetch( "db:$btpl", "blk_$instanceid" );
+ $xoopsTpl->clear_assign('block');
+ $querycount = count( $xoopsLogger->queries[$xoopsLogger->context] ) - $querycountbefore;
+ $xoopsLogger->addBlock( $block_arr[$i]->block->getVar('name'), false, 0, $querycount );
+ } else {
+ $xoopsLogger->addBlock( $block_arr[$i]->block->getVar('name'), true, $bcachetime );
+ $bcontent = $xoopsTpl->fetch( "db:$btpl", "blk_$instanceid" );
+ }
+
+ $block_info = array(
+ 'id' => $instanceid,
+ 'typeid' => $block_arr[$i]->block->getVar('bid'),
+ 'title' => $block_arr[$i]->getVar('title'),
+ 'content' => $bcontent,
+ 'weight' => $block_arr[$i]->getVar('weight'),
+ );
+ if ( !isset($show_cblock) && in_array( $side, array(XOOPS_CENTERBLOCK_CENTER, XOOPS_CENTERBLOCK_LEFT, XOOPS_CENTERBLOCK_RIGHT) ) ) {
+ //backwards compatibility fix
+ $show_cblock = 1;
+ $xoopsTpl->assign('xoops_showcblock', 1);
+ } elseif ( !isset( ${"show_".$sides[$side]."block"}) ) {
+ ${"show_".$sides[$side]."block"} = 1;
+ $xoopsTpl->assign( 'xoops_show' . $sides[$side] . 'block', 1);
+ }
+ $xoopsTpl->append( 'xoops_' . $sides[$side] . 'blocks' , $block_info );
+ unset($bcontent);
+ }
+ $xoopsLogger->context = $old_context;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/block.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/blockinstance.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/blockinstance.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/blockinstance.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,218 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+require_once XOOPS_ROOT_PATH."/kernel/object.php";
+
+class XoopsBlockInstance extends XoopsObject
+{
+ var $block;
+
+ function XoopsBlockInstance()
+ {
+ $this->initVar('instanceid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('bid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('options', XOBJ_DTYPE_ARRAY, null, false);
+ $this->initVar('title', XOBJ_DTYPE_TXTBOX, null, false, 150);
+
+ $this->initVar('side', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('weight', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('visible', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('bcachetime', XOBJ_DTYPE_INT, 0, false);
+ }
+
+ function setBlock(&$block) {
+ $this->block =& $block;
+ }
+
+ /**
+ * (HTML-) form for setting the options of the block
+ *
+ * @return string HTML for the form, FALSE if not defined for this block
+ **/
+ function getOptions()
+ {
+ $edit_func = $this->block->getVar('edit_func');
+ if (!$edit_func) {
+ return false;
+ }
+ if (file_exists(XOOPS_ROOT_PATH.'/modules/'.$this->block->getVar('dirname').'/blocks/'.$this->block->getVar('func_file'))) {
+ if (file_exists(XOOPS_ROOT_PATH.'/modules/'.$this->block->getVar('dirname').'/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php')) {
+ include_once XOOPS_ROOT_PATH.'/modules/'.$this->block->getVar('dirname').'/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php';
+ } elseif (file_exists(XOOPS_ROOT_PATH.'/modules/'.$this->block->getVar('dirname').'/language/english/blocks.php')) {
+ include_once XOOPS_ROOT_PATH.'/modules/'.$this->block->getVar('dirname').'/language/english/blocks.php';
+ }
+ include_once XOOPS_ROOT_PATH.'/modules/'.$this->block->getVar('dirname').'/blocks/'.$this->block->getVar('func_file');
+ $options = $this->getVar('options');
+ $edit_form = $edit_func($options);
+ if (!$edit_form) {
+ return false;
+ }
+ return $edit_form;
+ } else {
+ return false;
+ }
+ }
+
+ function &buildBlock()
+ {
+ global $xoopsConfig, $xoopsOption;
+ $block = array();
+
+ // get block display function
+ $show_func = $this->block->getVar('show_func');
+ if ( !$show_func ) {
+ return false;
+ }
+ // must get lang files b4 execution of the function
+ if ( file_exists(XOOPS_ROOT_PATH."/modules/".$this->block->getVar('dirname')."/blocks/".$this->block->getVar('func_file')) ) {
+ if ( file_exists(XOOPS_ROOT_PATH."/modules/".$this->block->getVar('dirname')."/language/".$xoopsConfig['language']."/blocks.php") ) {
+ include_once XOOPS_ROOT_PATH."/modules/".$this->block->getVar('dirname')."/language/".$xoopsConfig['language']."/blocks.php";
+ } elseif ( file_exists(XOOPS_ROOT_PATH."/modules/".$this->block->getVar('dirname')."/language/english/blocks.php") ) {
+ include_once XOOPS_ROOT_PATH."/modules/".$this->block->getVar('dirname')."/language/english/blocks.php";
+ }
+ include_once XOOPS_ROOT_PATH."/modules/".$this->block->getVar('dirname')."/blocks/".$this->block->getVar('func_file');
+ $options = $this->getVar("options");
+// var_dump($this->getVar('title'), $this);
+ if ( function_exists($show_func) ) {
+ // execute the function
+ $block = $show_func($options);
+ if ( !$block ) {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ } else {
+ return false;
+ }
+
+ return $block;
+ }
+ /**
+ * Get module IDs this instance is visible in
+ *
+ * @return array
+ **/
+ function getVisibleIn() {
+ $ret = array();
+ if (!$this->isNew()) {
+ $sql = "SELECT module_id, pageid FROM ".$GLOBALS['xoopsDB']->prefix('block_module_link')." WHERE block_id=".$this->getVar('instanceid');
+ $result = $GLOBALS['xoopsDB']->query($sql);
+ while (list($mid, $pageid) = $GLOBALS['xoopsDB']->fetchRow($result)) {
+ $ret[] = $mid."-".$pageid;
+ }
+ }
+ return $ret;
+ }
+
+ function getVisibleGroups() {
+ $groupperm_handler =& xoops_gethandler('groupperm');
+ return $groupperm_handler->getGroupIds('block_read', $this->getVar('instanceid'));
+ }
+}
+
+class XoopsBlockInstanceHandler extends XoopsPersistableObjectHandler {
+ function XoopsBlockInstanceHandler(&$db) {
+ $this->XoopsPersistableObjectHandler($db, 'block_instance', 'XoopsBlockInstance', 'instanceid', 'title');
+ }
+
+ function delete(&$obj, $force = false) {
+ $sql = sprintf("DELETE FROM %s WHERE block_id = %u", $this->db->prefix('block_module_link'), $obj->getVar('instanceid'));
+ if ($this->db->query($sql)) {
+ $groupperm_handler =& xoops_gethandler('groupperm');
+ $criteria = new CriteriaCompo(new Criteria('gperm_modid', 1));
+ $criteria->add(new Criteria('gperm_name', 'block_read'));
+ $criteria->add(new Criteria('gperm_itemid', $obj->getVar('instanceid')));
+ if ($groupperm_handler->deleteAll($criteria)) {
+ return parent::delete($obj, $force);
+ }
+ }
+ //@TODO: LOCALIZE
+ $obj->setErrors("Could not delete instance link");
+ return false;
+ }
+
+ function getLinkedObjects($groupid, $module_id=0, $pageid=0, $visible=null, $orderby='i.weight,i.instanceid', $isactive=1) {
+ $ret = array();
+ $groupperm_handler =& xoops_gethandler('groupperm');
+ $instanceids =& $groupperm_handler->getItemIds('block_read', $groupid);
+ if (!empty($instanceids)) {
+ $block_handler =& xoops_gethandler('block');
+ $sql = 'SELECT DISTINCT i.instanceid, b.*, i.* FROM '.$this->table.' i, '.$block_handler->table.' b, '.$this->db->prefix('block_module_link').' m WHERE m.block_id=i.instanceid';
+ $sql .= ' AND i.instanceid IN ('.implode(',', $instanceids).')';
+ if (isset($visible)) {
+ $sql .= ' AND i.visible='.intval($visible);
+ }
+ $sql .= ' AND i.bid=b.bid';
+ $sql .= ' AND b.isactive='.$isactive;
+ if (!empty($module_id) && $module_id != 0) {
+ $sql .= ' AND ( (m.module_id=0 AND m.pageid=0) OR (m.module_id='.intval($module_id).' AND m.pageid IN (0,'.intval($pageid).')) )';
+ } else {
+ if ($pageid == 2) {
+ //adminside blocks
+ $sql .= ' AND m.module_id=0 AND m.pageid=2';
+ }
+ else {
+ $sql .= ' AND m.module_id=0 AND m.pageid IN (0, '.intval($pageid).')';
+ }
+ }
+ $sql .= ' ORDER BY '.$orderby;
+ $result = $this->db->query($sql);
+ while ( $myrow = $this->db->fetchArray($result) ) {
+ $newblock = false;
+ if (!isset($blocks[$myrow['bid']])) {
+ $blocks[$myrow['bid']] =& $block_handler->create(false);
+ $newblock = true;
+ }
+
+ $instance =& $this->create(false);
+ $instance_vars = array_keys($instance->getVars());
+ foreach ($myrow as $key => $value) {
+ if ($newblock && !in_array($key, $instance_vars)) {
+ $blocks[$myrow['bid']]->assignVar($key, $value);
+ }
+ else {
+ $instance->assignVar($key, $value);
+ }
+ }
+ $blocks[$myrow['bid']]->assignVar('bid', $myrow['bid']);
+ $instance->setBlock($blocks[$myrow['bid']]);
+ $ret[] = $instance;
+ unset($instance);
+ }
+ }
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/blockinstance.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/comment.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/comment.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/comment.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,232 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+
+/**
+ *
+ *
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * A Comment
+ *
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsComment extends XoopsObject
+{
+
+ /**
+ * Constructor
+ **/
+ function XoopsComment()
+ {
+ $this->XoopsObject();
+ $this->initVar('com_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('com_pid', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('com_modid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('com_icon', XOBJ_DTYPE_OTHER, null, false);
+ $this->initVar('com_title', XOBJ_DTYPE_TXTBOX, null, true, 255, true);
+ $this->initVar('com_text', XOBJ_DTYPE_TXTAREA, null, true, null, true);
+ $this->initVar('com_created', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('com_modified', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('com_uid', XOBJ_DTYPE_INT, 0, true);
+ $this->initVar('com_ip', XOBJ_DTYPE_OTHER, null, false);
+ $this->initVar('com_sig', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('com_itemid', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('com_rootid', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('com_status', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('com_exparams', XOBJ_DTYPE_OTHER, "", false, 255);
+ $this->initVar('dohtml', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('dosmiley', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('doxcode', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('doimage', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('dobr', XOBJ_DTYPE_INT, 0, false);
+ }
+
+ /**
+ * Is this comment on the root level?
+ *
+ * @return bool
+ **/
+ function isRoot()
+ {
+ return ($this->getVar('com_id') == $this->getVar('com_rootid'));
+ }
+}
+
+/**
+ * XOOPS comment handler class.
+ *
+ * This class is responsible for providing data access mechanisms to the data source
+ * of XOOPS comment class objects.
+ *
+ *
+ * @package kernel
+ * @subpackage comment
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsCommentHandler extends XoopsPersistableObjectHandler
+{
+ function XoopsCommentHandler(&$db) {
+ $this->XoopsPersistableObjectHandler($db, 'xoopscomments', 'XoopsComment', 'com_id', 'com_title');
+ }
+
+ /**
+ * Retrieves comments for an item
+ *
+ * @param int $module_id Module ID
+ * @param int $item_id Item ID
+ * @param string $order Sort order
+ * @param int $status Status of the comment
+ * @param int $limit Max num of comments to retrieve
+ * @param int $start Start offset
+ *
+ * @return array Array of {@link XoopsComment} objects
+ **/
+ function getByItemId($module_id, $item_id, $order = null, $status = null, $limit = null, $start = 0)
+ {
+ $criteria = new CriteriaCompo(new Criteria('com_modid', intval($module_id)));
+ $criteria->add(new Criteria('com_itemid', intval($item_id)));
+ if (isset($status)) {
+ $criteria->add(new Criteria('com_status', intval($status)));
+ }
+ if (isset($order)) {
+ $criteria->setSort("com_created");
+ $criteria->setOrder($order);
+ }
+ if (isset($limit)) {
+ $criteria->setLimit($limit);
+ $criteria->setStart($start);
+ }
+ return $this->getObjects($criteria);
+ }
+
+ /**
+ * Gets total number of comments for an item
+ *
+ * @param int $module_id Module ID
+ * @param int $item_id Item ID
+ * @param int $status Status of the comment
+ *
+ * @return array Array of {@link XoopsComment} objects
+ **/
+ function getCountByItemId($module_id, $item_id, $status = null)
+ {
+ $criteria = new CriteriaCompo(new Criteria('com_modid', intval($module_id)));
+ $criteria->add(new Criteria('com_itemid', intval($item_id)));
+ if (isset($status)) {
+ $criteria->add(new Criteria('com_status', intval($status)));
+ }
+ return $this->getCount($criteria);
+ }
+
+
+ /**
+ * Get the top {@link XoopsComment}s
+ *
+ * @param int $module_id
+ * @param int $item_id
+ * @param strint $order
+ * @param int $status
+ *
+ * @return array Array of {@link XoopsComment} objects
+ **/
+ function getTopComments($module_id, $item_id, $order, $status = null)
+ {
+ $criteria = new CriteriaCompo(new Criteria('com_modid', intval($module_id)));
+ $criteria->add(new Criteria('com_itemid', intval($item_id)));
+ $criteria->add(new Criteria('com_pid', 0));
+ if (isset($status)) {
+ $criteria->add(new Criteria('com_status', intval($status)));
+ }
+ $criteria->setOrder($order);
+ return $this->getObjects($criteria);
+ }
+
+ /**
+ * Retrieve a whole thread
+ *
+ * @param int $comment_rootid
+ * @param int $comment_id
+ * @param int $status
+ *
+ * @return array Array of {@link XoopsComment} objects
+ **/
+ function getThread($comment_rootid, $comment_id, $status = null)
+ {
+ $criteria = new CriteriaCompo(new Criteria('com_rootid', intval($comment_rootid)));
+ $criteria->add(new Criteria('com_id', intval($comment_id), '>='));
+ if (isset($status)) {
+ $criteria->add(new Criteria('com_status', intval($status)));
+ }
+ return $this->getObjects($criteria);
+ }
+
+ /**
+ * Update
+ *
+ * @param object &$comment {@link XoopsComment} object
+ * @param string $field_name Name of the field
+ * @param mixed $field_value Value to write
+ *
+ * @return bool
+ **/
+ function updateByField(&$comment, $field_name, $field_value)
+ {
+ $comment->unsetNew();
+ $comment->setVar($field_name, $field_value);
+ return $this->insert($comment);
+ }
+
+ /**
+ * Delete all comments for one whole module
+ *
+ * @param int $module_id ID of the module
+ * @return bool
+ **/
+ function deleteByModule($module_id)
+ {
+ return $this->deleteAll(new Criteria('com_modid', intval($module_id)));
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/comment.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/config.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/config.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/config.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,326 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+
+require_once XOOPS_ROOT_PATH.'/kernel/configoption.php';
+require_once XOOPS_ROOT_PATH.'/kernel/configitem.php';
+
+/**
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+
+/**
+* XOOPS configuration handling class.
+* This class acts as an interface for handling general configurations of XOOPS
+* and its modules.
+*
+*
+* @author Kazumi Ono <webmaster at myweb.ne.jp>
+* @todo Tests that need to be made:
+* - error handling
+* @access public
+*/
+
+class XoopsConfigHandler
+{
+
+ /**
+ * holds reference to config item handler(DAO) class
+ *
+ * @var object
+ * @access private
+ */
+ var $_cHandler;
+
+ /**
+ * holds reference to config option handler(DAO) class
+ *
+ * @var object
+ * @access private
+ */
+ var $_oHandler;
+
+ /**
+ * holds an array of cached references to config value arrays,
+ * indexed on module id and category id
+ *
+ * @var array
+ * @access private
+ */
+ var $_cachedConfigs = array();
+
+ /**
+ * Constructor
+ *
+ * @param object &$db reference to database object
+ */
+ function XoopsConfigHandler(&$db)
+ {
+ $this->_cHandler = new XoopsConfigItemHandler($db);
+ $this->_oHandler = new XoopsConfigOptionHandler($db);
+ }
+
+ /**
+ * Create a config
+ *
+ * @see XoopsConfigItem
+ * @return object reference to the new {@link XoopsConfigItem}
+ */
+ function &createConfig()
+ {
+ $return = $this->_cHandler->create();
+ return $return;
+ }
+
+ /**
+ * Get a config
+ *
+ * @param int $id ID of the config
+ * @param bool $withoptions load the config's options now?
+ * @return object reference to the {@link XoopsConfig}
+ */
+ function &getConfig($id, $withoptions = false)
+ {
+ $config =& $this->_cHandler->get($id);
+ if ($withoptions == true) {
+ $config->setConfOptions($this->getConfigOptions(new Criteria('conf_id', $id)));
+ }
+ return $config;
+ }
+
+ /**
+ * insert a new config in the database
+ *
+ * @param object &$config reference to the {@link XoopsConfigItem}
+ */
+ function insertConfig(&$config)
+ {
+ if (!$this->_cHandler->insert($config)) {
+ return false;
+ }
+ $options =& $config->getConfOptions();
+ $count = count($options);
+ $conf_id = $config->getVar('conf_id');
+ for ($i = 0; $i < $count; $i++) {
+ $options[$i]->setVar('conf_id', $conf_id);
+ if (!$this->_oHandler->insert($options[$i])) {
+ echo $options[$i]->getErrors();
+ }
+ }
+ if (!empty($this->_cachedConfigs[$config->getVar('conf_modid')][$config->getVar('conf_catid')])) {
+ unset ($this->_cachedConfigs[$config->getVar('conf_modid')][$config->getVar('conf_catid')]);
+ }
+ return true;
+ }
+
+ /**
+ * Delete a config from the database
+ *
+ * @param object &$config reference to a {@link XoopsConfigItem}
+ */
+ function deleteConfig(&$config)
+ {
+ if (!$this->_cHandler->delete($config)) {
+ return false;
+ }
+ $options =& $config->getConfOptions();
+ $count = count($options);
+ if ($count == 0) {
+ $options =& $this->getConfigOptions(new Criteria('conf_id', $config->getVar('conf_id')));
+ $count = count($options);
+ }
+ if (is_array($options) && $count > 0) {
+ for ($i = 0; $i < $count; $i++) {
+ $this->_oHandler->delete($options[$i]);
+ }
+ }
+ if (!empty($this->_cachedConfigs[$config->getVar('conf_modid')][$config->getVar('conf_catid')])) {
+ unset ($this->_cachedConfigs[$config->getVar('conf_modid')][$config->getVar('conf_catid')]);
+ }
+ return true;
+ }
+
+ /**
+ * Delete config option(s) from the database
+ *
+ * @param object &$criteria reference to a {@link Criteria}
+ *
+ * @return bool
+ */
+ function deleteConfigOption(&$criteria)
+ {
+ return $this->_oHandler->deleteAll($criteria);
+ }
+
+ /**
+ * get one or more Configs
+ *
+ * @param object $criteria {@link CriteriaElement}
+ * @param bool $id_as_key Use the configs' ID as keys?
+ * @param bool $with_options get the options now?
+ *
+ * @return array Array of {@link XoopsConfigItem} objects
+ */
+ function getConfigs($criteria = null, $id_as_key = false, $with_options = false)
+ {
+ $confs = $this->_cHandler->getObjects($criteria, $id_as_key);
+ if ($with_options == true) {
+ foreach(array_keys($confs) as $key){
+ $confs[$key]->setConfOptions($this->getConfigOptions(new Criteria('conf_id', $confs[$key]->getVar("conf_id"))));
+ }
+ }
+ return $confs;
+ }
+
+ /**
+ * Count some configs
+ *
+ * @param object $criteria {@link CriteriaElement}
+ */
+ function getConfigCount($criteria = null)
+ {
+ return $this->_cHandler->getCount($criteria);
+ }
+
+ /**
+ * Get configs from a certain category
+ *
+ * @param int $category ID of a category
+ * @param int $module ID of a module
+ *
+ * @return array array of {@link XoopsConfig}s
+ */
+ function &getConfigsByCat($category, $module = 1)
+ {
+ static $_cachedConfigs;
+ if (!empty($_cachedConfigs[$module][$category])) {
+ return $_cachedConfigs[$module][$category];
+ } else {
+ $ret = array();
+ $criteria = new CriteriaCompo(new Criteria('conf_modid', intval($module)));
+ if (!empty($category)) {
+ $criteria->add(new Criteria('conf_catid', intval($category)));
+ }
+ $configs =& $this->getConfigs($criteria, true);
+ if (is_array($configs)) {
+ foreach (array_keys($configs) as $i) {
+ $ret[$configs[$i]->getVar('conf_name')] = $configs[$i]->getConfValueForOutput();
+ }
+ }
+ $_cachedConfigs[$module][$category] =& $ret;
+ return $ret;
+ }
+ }
+
+ /**
+ * Make a new {@link XoopsConfigOption}
+ *
+ * @return object {@link XoopsConfigOption}
+ */
+ function &createConfigOption(){
+ $return =& $this->_oHandler->create();
+ return $return;
+ }
+
+ /**
+ * Get a {@link XoopsConfigOption}
+ *
+ * @param int $id ID of the config option
+ *
+ * @return object {@link XoopsConfigOption}
+ */
+ function &getConfigOption($id)
+ {
+ $return =& $this->_oHandler->get($id);
+ return $return;
+ }
+
+ /**
+ * Get one or more {@link XoopsConfigOption}s
+ *
+ * @param object $criteria {@link CriteriaElement}
+ * @param bool $id_as_key Use IDs as keys in the array?
+ *
+ * @return array Array of {@link XoopsConfigOption}s
+ */
+ function getConfigOptions($criteria = null, $id_as_key = false)
+ {
+ return $this->_oHandler->getObjects($criteria, $id_as_key);
+ }
+
+ /**
+ * Count some {@link XoopsConfigOption}s
+ *
+ * @param object $criteria {@link CriteriaElement}
+ *
+ * @return int Count of {@link XoopsConfigOption}s matching $criteria
+ */
+ function getConfigOptionsCount($criteria = null)
+ {
+ return $this->_oHandler->getCount($criteria);
+ }
+
+ /**
+ * Get a list of configs
+ *
+ * @param int $conf_modid ID of the modules
+ * @param int $conf_catid ID of the category
+ *
+ * @return array Associative array of name=>value pairs.
+ */
+ function &getConfigList($conf_modid, $conf_catid = 0)
+ {
+ if (!empty($this->_cachedConfigs[$conf_modid][$conf_catid])) {
+ return $this->_cachedConfigs[$conf_modid][$conf_catid];
+ } else {
+ $criteria = new CriteriaCompo(new Criteria('conf_modid', $conf_modid));
+ if (empty($conf_catid)) {
+ $criteria->add(new Criteria('conf_catid', $conf_catid));
+ }
+ $configs =& $this->_cHandler->getObjects($criteria);
+ $confcount = count($configs);
+ $ret = array();
+ for ($i = 0; $i < $confcount; $i++) {
+ $ret[$configs[$i]->getVar('conf_name')] = $configs[$i]->getConfValueForOutput();
+ }
+ $this->_cachedConfigs[$conf_modid][$conf_catid] =& $ret;
+ return $ret;
+ }
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/config.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/configcategory.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/configcategory.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/configcategory.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,105 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+
+/**
+ *
+ *
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+
+/**
+ * A category of configs
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ */
+class XoopsConfigCategory extends XoopsObject
+{
+ /**
+ * Constructor
+ *
+ */
+ function XoopsConfigCategory()
+ {
+ $this->XoopsObject();
+ $this->initVar('confcat_id', XOBJ_DTYPE_INT, null);
+ $this->initVar('confcat_modid', XOBJ_DTYPE_INT, 0);
+ $this->initVar('confcat_name', XOBJ_DTYPE_OTHER, null);
+ $this->initVar('confcat_order', XOBJ_DTYPE_INT, 0);
+ $this->initVar('confcat_nameid', XOBJ_DTYPE_TXTBOX, null, true, 50);
+ $this->initVar('confcat_description', XOBJ_DTYPE_TXTAREA, null, false);
+ }
+}
+
+
+/**
+ * XOOPS configuration category handler class.
+ *
+ * This class is responsible for providing data access mechanisms to the data source
+ * of XOOPS configuration category class objects.
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage config
+ */
+class XoopsConfigCategoryHandler extends XoopsPersistableObjectHandler
+{
+ function XoopsConfigCategoryHandler(&$db) {
+ $this->XoopsPersistableObjectHandler($db, 'configcategory', 'XoopsConfigCategory', array('confcat_id', 'confcat_modid'), 'confcat_name');
+ }
+
+ /**
+ * Get array of categories for a module
+ *
+ * @param int $modid ID of module
+ *
+ * @return array
+ **/
+ function getCatByModule($modid = 0)
+ {
+ $criteria = new criteria('confcat_modid', $modid);
+ $ret = $this->getObjects($criteria, false);
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/configcategory.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/configitem.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/configitem.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/configitem.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,214 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+
+/**
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**#@+
+ * Config type
+ */
+define('XOOPS_CONF', 1);
+define('XOOPS_CONF_METAFOOTER', 3);
+define('XOOPS_CONF_CENSOR', 4);
+define('XOOPS_CONF_SEARCH', 5);
+define('XOOPS_CONF_MAILER', 6);
+define('XOOPS_CONF_AUTH', 7);
+/**#@-*/
+
+/**
+ *
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsConfigItem extends XoopsObject
+{
+
+ /**
+ * Config options
+ *
+ * @var array
+ * @access private
+ */
+ var $_confOptions = array();
+
+ /**
+ * Constructor
+ */
+ function XoopsConfigItem()
+ {
+ $this->initVar('conf_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('conf_modid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('conf_catid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('conf_name', XOBJ_DTYPE_OTHER);
+ $this->initVar('conf_title', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('conf_value', XOBJ_DTYPE_TXTAREA, "");
+ $this->initVar('conf_desc', XOBJ_DTYPE_OTHER, "");
+ $this->initVar('conf_formtype', XOBJ_DTYPE_OTHER);
+ $this->initVar('conf_valuetype', XOBJ_DTYPE_OTHER);
+ $this->initVar('conf_order', XOBJ_DTYPE_INT, 0);
+ }
+
+ /**
+ * Get a config value in a format ready for output
+ *
+ * @return string
+ */
+ function getConfValueForOutput()
+ {
+ switch ( $this->getVar('conf_valuetype') ) {
+ case 'int':
+ return intval( $this->getVar('conf_value', 'N') );
+ break;
+ case 'array':
+ $value = $this->getVar( 'conf_value', 'N' );
+ if ( $value != "" ) {
+ $value = @unserialize($value);
+ }
+ return ( is_array($value) ? $value : array() );
+ case 'float':
+ $value = $this->getVar( 'conf_value', 'N' );
+ return (float)$value;
+ break;
+ case 'textarea':
+ return $this->getVar('conf_value');
+ }
+ return $this->getVar( 'conf_value', 'N' );
+
+ }
+
+ /**
+ * Set a config value
+ *
+ * @param mixed &$value Value
+ * @param bool $force_slash
+ */
+ function setConfValueForInput(&$value, $force_slash = false)
+ {
+ switch($this->getVar('conf_valuetype')) {
+ case 'array':
+ if (!is_array($value)) {
+ $value = explode('|', trim($value));
+ }
+ $this->setVar('conf_value', serialize($value), $force_slash);
+ break;
+ case 'text':
+ $this->setVar('conf_value', trim($value), $force_slash);
+ break;
+ default:
+ $this->setVar('conf_value', $value, $force_slash);
+ break;
+ }
+ }
+
+ /**
+ * Assign one or more {@link XoopsConfigItemOption}s
+ *
+ * @param mixed $option either a {@link XoopsConfigItemOption} object or an array of them
+ */
+ function setConfOptions($option)
+ {
+ if (is_array($option)) {
+ $count = count($option);
+ for ($i = 0; $i < $count; $i++) {
+ $this->setConfOptions($option[$i]);
+ }
+ } else {
+ if(is_object($option)) {
+ $this->_confOptions[] =& $option;
+ }
+ }
+ }
+
+ /**
+ * Get the {@link XoopsConfigItemOption}s of this Config
+ *
+ * @return array array of {@link XoopsConfigItemOption}
+ */
+ function &getConfOptions()
+ {
+ return $this->_confOptions;
+ }
+
+ /**
+ * Clear options from this item
+ *
+ * @return void
+ **/
+ function clearConfOptions() {
+ $this->_confOptions = array();
+ }
+}
+
+
+/**
+* XOOPS configuration handler class.
+*
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS configuration class objects.
+*
+* @author Kazumi Ono <onokazu at xoops.org>
+* @copyright copyright (c) 2000-2003 XOOPS.org
+*/
+class XoopsConfigItemHandler extends XoopsPersistableObjectHandler
+{
+ function XoopsConfigItemHandler(&$db) {
+ $this->XoopsPersistableObjectHandler($db, 'config', 'XoopsConfigItem', 'conf_id', 'conf_title');
+ }
+
+ /**
+ * Get configs from the database
+ *
+ * @param object $criteria {@link CriteriaElement}
+ * @param bool $id_as_key return the config's id as key?
+ *
+ * @return array Array of {@link XoopsConfigItem} objects
+ */
+ function getObjects($criteria = null, $id_as_key = false) {
+ if ($criteria == null) {
+ $criteria = new CriteriaCompo();
+ }
+ if ($criteria->getSort() == "") {
+ $criteria->setSort('conf_order');
+ }
+ return parent::getObjects($criteria, $id_as_key);
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/configitem.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/configoption.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/configoption.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/configoption.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,85 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+
+/**
+ *
+ *
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * A Config-Option
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ */
+class XoopsConfigOption extends XoopsObject
+{
+ /**
+ * Constructor
+ */
+ function XoopsConfigOption()
+ {
+ $this->XoopsObject();
+ $this->initVar('confop_id', XOBJ_DTYPE_INT, null);
+ $this->initVar('confop_name', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('confop_value', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('conf_id', XOBJ_DTYPE_INT, 0);
+ }
+}
+
+/**
+ * XOOPS configuration option handler class.
+ * This class is responsible for providing data access mechanisms to the data source
+ * of XOOPS configuration option class objects.
+ *
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ * @author Kazumi Ono <onokazu at xoops.org>
+ *
+ * @package kernel
+ * @subpackage config
+*/
+class XoopsConfigOptionHandler extends XoopsPersistableObjectHandler
+{
+ function XoopsConfigOptionHandler(&$db) {
+ $this->XoopsPersistableObjectHandler($db, 'configoption', 'XoopsConfigOption', 'confop_id', 'confop_name');
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/configoption.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/editor.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/editor.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/editor.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,37 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: XOOPS Foundation //
+// URL: http://www.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+
+require_once XOOPS_ROOT_PATH."/class/xoopseditor/xoopseditor.php";
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/editor.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/group.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/group.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/group.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,160 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+
+/**
+ * a group of users
+ *
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @package kernel
+ */
+class XoopsGroup extends XoopsObject
+{
+ /**
+ * constructor
+ */
+ function XoopsGroup()
+ {
+ $this->XoopsObject();
+ $this->initVar('groupid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, true, 100);
+ $this->initVar('description', XOBJ_DTYPE_TXTAREA, '', false);
+ $this->initVar('group_type', XOBJ_DTYPE_OTHER, '', false);
+ }
+}
+
+
+/**
+* XOOPS group handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS group class objects.
+*
+* @author Kazumi Ono <onokazu at xoops.org>
+* @copyright copyright (c) 2000-2003 XOOPS.org
+* @package kernel
+* @subpackage member
+*/
+class XoopsGroupHandler extends XoopsPersistableObjectHandler
+{
+ function XoopsGroupHandler(&$db) {
+ $this->XoopsPersistableObjectHandler($db, 'groups', 'XoopsGroup', 'groupid', 'name');
+ }
+}
+
+/**
+ * membership of a user in a group
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ * @package kernel
+ */
+class XoopsMembership extends XoopsObject
+{
+ /**
+ * constructor
+ */
+ function XoopsMembership()
+ {
+ $this->XoopsObject();
+ $this->initVar('linkid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('groupid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('uid', XOBJ_DTYPE_INT, null, false);
+ }
+}
+
+/**
+* XOOPS membership handler class. (Singleton)
+*
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS group membership class objects.
+*
+* @author Kazumi Ono <onokazu at xoops.org>
+* @copyright copyright (c) 2000-2003 XOOPS.org
+* @package kernel
+*/
+class XoopsMembershipHandler extends XoopsPersistableObjectHandler
+{
+
+ function XoopsMembershipHandler(&$db) {
+ $this->XoopsPersistableObjectHandler($db, 'groups_users_link', 'XoopsMembership', 'linkid');
+ }
+
+ /**
+ * retrieve groups for a user
+ *
+ * @param int $uid ID of the user
+ * @param bool $asobject should the groups be returned as {@link XoopsGroup}
+ * objects? FALSE returns associative array.
+ * @return array array of groups the user belongs to
+ */
+ function getGroupsByUser($uid)
+ {
+ $ret = array();
+ $sql = 'SELECT groupid FROM '.$this->db->prefix('groups_users_link').' WHERE uid='.intval($uid);
+ $result = $this->db->query($sql);
+ if (!$result) {
+ return $ret;
+ }
+ while ($myrow = $this->db->fetchArray($result)) {
+ $ret[] = $myrow['groupid'];
+ }
+ return $ret;
+ }
+
+ /**
+ * retrieve users belonging to a group
+ *
+ * @param int $groupid ID of the group
+ * @param bool $asobject return users as {@link XoopsUser} objects?
+ * FALSE will return arrays
+ * @param int $limit number of entries to return
+ * @param int $start offset of first entry to return
+ * @return array array of users belonging to the group
+ */
+ function getUsersByGroup($groupid, $limit=0, $start=0)
+ {
+ $ret = array();
+ $sql = 'SELECT uid FROM '.$this->db->prefix('groups_users_link').' WHERE groupid='.intval($groupid);
+ $result = $this->db->query($sql, $limit, $start);
+ if (!$result) {
+ return $ret;
+ }
+ while ($myrow = $this->db->fetchArray($result)) {
+ $ret[] = $myrow['uid'];
+ }
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/group.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/groupperm.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/groupperm.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/groupperm.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,258 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+
+/**
+ *
+ *
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * A group permission
+ *
+ * These permissions are managed through a {@link XoopsGroupPermHandler} object
+ *
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsGroupPerm extends XoopsObject
+{
+
+ /**
+ * Constructor
+ *
+ */
+ function XoopsGroupPerm()
+ {
+ $this->XoopsObject();
+ $this->initVar('gperm_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('gperm_groupid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('gperm_itemid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('gperm_modid', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('gperm_name', XOBJ_DTYPE_OTHER, null, false);
+ }
+}
+
+
+/**
+* XOOPS group permission handler class.
+*
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS group permission class objects.
+* This class is an abstract class to be implemented by child group permission classes.
+*
+* @see XoopsGroupPerm
+* @author Kazumi Ono <onokazu at xoops.org>
+* @copyright copyright (c) 2000-2003 XOOPS.org
+*/
+class XoopsGroupPermHandler extends XoopsPersistableObjectHandler
+{
+
+ function XoopsGroupPermHandler(&$db) {
+ $this->XoopsPersistableObjectHandler($db, 'group_permission', 'XoopsGroupPerm', 'gperm_id');
+ }
+
+ /**
+ * Delete all module specific permissions assigned for a group
+ *
+ * @param int $gperm_groupid ID of a group
+ * @param int $gperm_modid ID of a module
+ *
+ * @return bool TRUE on success
+ */
+ function deleteByGroup($gperm_groupid, $gperm_modid = null)
+ {
+ $criteria = new CriteriaCompo(new Criteria('gperm_groupid', intval($gperm_groupid)));
+ if (isset($gperm_modid)) {
+ $criteria->add(new Criteria('gperm_modid', intval($gperm_modid)));
+ }
+ return $this->deleteAll($criteria);
+ }
+
+ /**
+ * Delete all module specific permissions
+ *
+ * @param int $gperm_modid ID of a module
+ * @param string $gperm_name Name of a module permission
+ * @param int $gperm_itemid ID of a module item
+ *
+ * @return bool TRUE on success
+ */
+ function deleteByModule($gperm_modid, $gperm_name = null, $gperm_itemid = null)
+ {
+ $criteria = new CriteriaCompo(new Criteria('gperm_modid', intval($gperm_modid)));
+ if (isset($gperm_name)) {
+ $criteria->add(new Criteria('gperm_name', $gperm_name));
+ if (isset($gperm_itemid)) {
+ $criteria->add(new Criteria('gperm_itemid', intval($gperm_itemid)));
+ }
+ }
+ return $this->deleteAll($criteria);
+ }
+ /**#@-*/
+
+ /**
+ * Check permission
+ *
+ * @param string $gperm_name Name of permission
+ * @param int $gperm_itemid ID of an item
+ * @param int/array $gperm_groupid A group ID or an array of group IDs
+ * @param int $gperm_modid ID of a module
+ *
+ * @return bool TRUE if permission is enabled
+ */
+ function checkRight($gperm_name, $gperm_itemid, $gperm_groupid, $gperm_modid = 1)
+ {
+ $criteria = new CriteriaCompo(new Criteria('gperm_modid', $gperm_modid));
+ $criteria->add(new Criteria('gperm_name', $gperm_name));
+
+ if (is_array($gperm_groupid)) {
+ if (in_array(XOOPS_GROUP_ADMIN, $gperm_groupid)) {
+ return true;
+ }
+ $criteria->add(new Criteria('gperm_groupid', "(".implode(',', $gperm_groupid).")", "IN"));
+ } else {
+ if (XOOPS_GROUP_ADMIN == $gperm_groupid) {
+ return true;
+ }
+ $criteria->add(new Criteria('gperm_groupid', $gperm_groupid));
+ }
+ $gperm_itemid = intval($gperm_itemid);
+ if ($gperm_itemid > 0) {
+ $criteria->add(new Criteria('gperm_itemid', $gperm_itemid));
+ }
+ if ($this->getCount($criteria) > 0) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Add a permission
+ *
+ * @param string $gperm_name Name of permission
+ * @param int $gperm_itemid ID of an item
+ * @param int $gperm_groupid ID of a group
+ * @param int $gperm_modid ID of a module
+ *
+ * @return bool TRUE jf success
+ */
+ function addRight($gperm_name, $gperm_itemid, $gperm_groupid, $gperm_modid = 1)
+ {
+ $perm =& $this->create();
+ $perm->setVar('gperm_name', $gperm_name);
+ $perm->setVar('gperm_groupid', $gperm_groupid);
+ $perm->setVar('gperm_itemid', $gperm_itemid);
+ $perm->setVar('gperm_modid', $gperm_modid);
+ return $this->insert($perm);
+ }
+
+ /**
+ * Remove a permission
+ *
+ * @param string $gperm_name Name of permission
+ * @param int $gperm_itemid ID of an item
+ * @param int $gperm_groupid ID of a group
+ * @param int $gperm_modid ID of a module
+ *
+ * @return bool TRUE jf success
+ */
+ function deleteRight($gperm_name, $gperm_itemid, $gperm_groupid, $gperm_modid = 1)
+ {
+ $criteria = new CriteriaCompo(new Criteria('gperm_name', $gperm_name));
+ $criteria->add(new Criteria('gperm_groupid', $gperm_groupid));
+ $criteria->add(new Criteria('gperm_itemid', $gperm_itemid));
+ $criteria->add(new Criteria('gperm_modid', $gperm_modid));
+ $perm = $this->getObjects($criteria);
+ if (isset($perm[0]) && is_object($perm[0])) {
+ return $this->delete($perm[0]);
+ }
+ return false;
+ }
+
+ /**
+ * Get all item IDs that a group is assigned a specific permission
+ *
+ * @param string $gperm_name Name of permission
+ * @param int/array $gperm_groupid A group ID or an array of group IDs
+ * @param int $gperm_modid ID of a module
+ *
+ * @return array array of item IDs
+ */
+ function getItemIds($gperm_name, $gperm_groupid, $gperm_modid = 1)
+ {
+ $ret = array();
+ $criteria = new CriteriaCompo(new Criteria('gperm_modid', intval($gperm_modid)));
+ $criteria->add(new Criteria('gperm_name', $gperm_name));
+ if (is_array($gperm_groupid)) {
+ $criteria->add(new Criteria('gperm_groupid', "(".implode(',', $gperm_groupid).")", "IN"));
+ } else {
+ $criteria->add(new Criteria('gperm_groupid', intval($gperm_groupid)));
+ }
+ $perms =& $this->getObjects($criteria, true);
+ foreach (array_keys($perms) as $i) {
+ $ret[] = $perms[$i]->getVar('gperm_itemid');
+ }
+ return array_unique($ret);
+ }
+
+ /**
+ * Get all group IDs assigned a specific permission for a particular item
+ *
+ * @param string $gperm_name Name of permission
+ * @param int $gperm_itemid ID of an item
+ * @param int $gperm_modid ID of a module
+ *
+ * @return array array of group IDs
+ */
+ function getGroupIds($gperm_name, $gperm_itemid, $gperm_modid = 1)
+ {
+ $ret = array();
+ $criteria = new CriteriaCompo(new Criteria('gperm_modid', intval($gperm_modid)));
+ $criteria->add(new Criteria('gperm_name', $gperm_name));
+ $criteria->add(new Criteria('gperm_itemid', intval($gperm_itemid)));
+ $perms =& $this->getObjects($criteria, true);
+ foreach (array_keys($perms) as $i) {
+ $ret[] = $perms[$i]->getVar('gperm_groupid');
+ }
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/groupperm.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/handlerregistry.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/handlerregistry.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/handlerregistry.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,146 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+
+/**
+ * A registry for holding references to {@link XoopsObjectHandler} classes
+ *
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+class XoopsHandlerRegistry
+{
+ /**
+ * holds references to handler class objects
+ *
+ * @var array
+ * @access private
+ */
+ var $_handlers = array();
+
+ /**
+ * get a reference to the only instance of this class
+ *
+ * if the class has not been instantiated yet, this will also take
+ * care of that
+ *
+ * @static
+ * @staticvar object The only instance of this class
+ * @return object Reference to the only instance of this class
+ */
+ function &instance()
+ {
+ static $instance;
+ if (!isset($instance)) {
+ $instance = new XoopsHandlerRegistry();
+ }
+ return $instance;
+ }
+
+ /**
+ * Register a handler class object
+ *
+ * @param string $name Short name of a handler class
+ * @param object &$handler {@link XoopsObjectHandler} class object
+ */
+ function setHandler($name, &$handler)
+ {
+ $this->_handlers['kernel'][$name] =& $handler;
+ }
+
+ /**
+ * Get a registered handler class object
+ *
+ * @param string $name Short name of a handler class
+ *
+ * @return object {@link XoopsObjectHandler}, FALSE if not registered
+ */
+ function &getHandler($name)
+ {
+ if (!isset($this->_handlers['kernel'][$name])) {
+ return false;
+ }
+ return $this->_handlers['kernel'][$name];
+ }
+
+ /**
+ * Unregister a handler class object
+ *
+ * @param string $name Short name of a handler class
+ */
+ function unsetHandler($name)
+ {
+ unset($this->_handlers['kernel'][$name]);
+ }
+
+ /**
+ * Register a handler class object for a module
+ *
+ * @param string $module Directory name of a module
+ * @param string $name Short name of a handler class
+ * @param object &$handler {@link XoopsObjectHandler} class object
+ */
+ function setModuleHandler($module, $name, &$handler)
+ {
+ $this->_handlers['module'][$module][$name] =& $handler;
+ }
+
+ /**
+ * Get a registered handler class object for a module
+ *
+ * @param string $module Directory name of a module
+ * @param string $name Short name of a handler class
+ *
+ * @return object {@link XoopsObjectHandler}, FALSE if not registered
+ */
+ function &getModuleHandler($module, $name)
+ {
+ if (!isset($this->_handlers['module'][$module][$name])) {
+ return false;
+ }
+ return $this->_handlers['module'][$module][$name];
+ }
+
+ /**
+ * Unregister a handler class object for a module
+ *
+ * @param string $module Directory name of a module
+ * @param string $name Short name of a handler class
+ */
+ function unsetModuleHandler($module, $name)
+ {
+ unset($this->_handlers['module'][$module][$name]);
+ }
+
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/handlerregistry.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/image.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/image.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/image.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,275 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+
+/**
+ * An Image
+ *
+ * @package kernel
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright (c) 2000-2003 The Xoops Project - www.xoops.org
+ */
+class XoopsImage extends XoopsObject
+{
+ /**
+ * Constructor
+ **/
+ function XoopsImage()
+ {
+ $this->XoopsObject();
+ $this->initVar('image_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('image_name', XOBJ_DTYPE_OTHER, null, false, 30);
+ $this->initVar('image_nicename', XOBJ_DTYPE_TXTBOX, null, true, 100);
+ $this->initVar('image_mimetype', XOBJ_DTYPE_OTHER, null, false);
+ $this->initVar('image_created', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('image_display', XOBJ_DTYPE_INT, 1, false);
+ $this->initVar('image_weight', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('image_body', XOBJ_DTYPE_SOURCE, null, true);
+ $this->initVar('imgcat_id', XOBJ_DTYPE_INT, 0, false);
+ }
+}
+
+/**
+ * XOOPS image handler class.
+ *
+ * This class is responsible for providing data access mechanisms to the data source
+ * of XOOPS image class objects.
+ *
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright (c) 2000-2003 The Xoops Project - www.xoops.org
+ */
+class XoopsImageHandler extends XoopsObjectHandler
+{
+
+ /**
+ * Create a new {@link XoopsImage}
+ *
+ * @param boolean $isNew Flag the object as "new"
+ * @return object
+ **/
+ function &create($isNew = true)
+ {
+ $image =& new XoopsImage();
+ if ($isNew) {
+ $image->setNew();
+ }
+ return $image;
+ }
+
+ /**
+ * Load a {@link XoopsImage} object from the database
+ *
+ * @param int $id ID
+ * @param boolean $getbinary
+ * @return object {@link XoopsImage}, FALSE on fail
+ **/
+ function &get($id, $getbinary=true)
+ {
+ $id = intval($id);
+ if ($id > 0) {
+ $sql = 'SELECT i.*, b.image_body FROM '.$this->db->prefix('image').' i LEFT JOIN '.$this->db->prefix('imagebody').' b ON b.image_id=i.image_id WHERE i.image_id='.$id;
+ if (!$result = $this->db->query($sql)) {
+ $return = false;
+ return $return;
+ }
+ $numrows = $this->db->getRowsNum($result);
+ if ($numrows == 1) {
+ $image = new XoopsImage();
+ $image->assignVars($this->db->fetchArray($result));
+ return $image;
+ }
+ }
+ $return = false;
+ return $return;
+ }
+
+ /**
+ * Write a {@link XoopsImage} object to the database
+ *
+ * @param object &$image {@link XoopsImage}
+ * @return bool
+ **/
+ function insert(&$image)
+ {
+ if (strtolower(get_class($image)) != 'xoopsimage') {
+ return false;
+ }
+ if (!$image->isDirty()) {
+ return true;
+ }
+ if (!$image->cleanVars()) {
+ return false;
+ }
+ foreach ($image->cleanVars as $k => $v) {
+ ${$k} = $v;
+ }
+ if ($image->isNew()) {
+ $image_id = $this->db->genId('image_image_id_seq');
+ $sql = sprintf("INSERT INTO %s (image_id, image_name, image_nicename, image_mimetype, image_created, image_display, image_weight, imgcat_id) VALUES (%u, %s, %s, %s, %u, %u, %u, %u)", $this->db->prefix('image'), $image_id, $this->db->quoteString($image_name), $this->db->quoteString($image_nicename), $this->db->quoteString($image_mimetype), time(), $image_display, $image_weight, $imgcat_id);
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ if (empty($image_id)) {
+ $image_id = $this->db->getInsertId();
+ }
+ if (isset($image_body) && $image_body != '') {
+ $sql = sprintf("INSERT INTO %s (image_id, image_body) VALUES (%u, %s)", $this->db->prefix('imagebody'), $image_id, $this->db->quoteString($image_body));
+ if (!$result = $this->db->query($sql)) {
+ $sql = sprintf("DELETE FROM %s WHERE image_id = %u", $this->db->prefix('image'), $image_id);
+ $this->db->query($sql);
+ return false;
+ }
+ }
+ $image->assignVar('image_id', $image_id);
+ } else {
+ $sql = sprintf("UPDATE %s SET image_name = %s, image_nicename = %s, image_display = %u, image_weight = %u, imgcat_id = %u WHERE image_id = %u", $this->db->prefix('image'), $this->db->quoteString($image_name), $this->db->quoteString($image_nicename), $image_display, $image_weight, $imgcat_id, $image_id);
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ if (isset($image_body) && $image_body != '') {
+ $sql = sprintf("UPDATE %s SET image_body = %s WHERE image_id = %u", $this->db->prefix('imagebody'), $this->db->quoteString($image_body), $image_id);
+ if (!$result = $this->db->query($sql)) {
+ $this->db->query(sprintf("DELETE FROM %s WHERE image_id = %u", $this->db->prefix('image'), $image_id));
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Delete an image from the database
+ *
+ * @param object &$image {@link XoopsImage}
+ * @return bool
+ **/
+ function delete(&$image)
+ {
+ if (strtolower(get_class($image)) != 'xoopsimage') {
+ return false;
+ }
+ $id = $image->getVar('image_id');
+ $sql = sprintf("DELETE FROM %s WHERE image_id = %u", $this->db->prefix('image'), $id);
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ $sql = sprintf("DELETE FROM %s WHERE image_id = %u", $this->db->prefix('imagebody'), $id);
+ $this->db->query($sql);
+ return true;
+ }
+
+ /**
+ * Load {@link XoopsImage}s from the database
+ *
+ * @param object $criteria {@link CriteriaElement}
+ * @param boolean $id_as_key Use the ID as key into the array
+ * @param boolean $getbinary
+ * @return array Array of {@link XoopsImage} objects
+ **/
+ function getObjects($criteria = null, $id_as_key = false, $getbinary = false)
+ {
+ $ret = array();
+ $limit = $start = 0;
+ if ($getbinary) {
+ $sql = 'SELECT i.*, b.image_body FROM '.$this->db->prefix('image').' i LEFT JOIN '.$this->db->prefix('imagebody').' b ON b.image_id=i.image_id';
+ } else {
+ $sql = 'SELECT * FROM '.$this->db->prefix('image');
+ }
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ $sort = !in_array($criteria->getSort(), array('image_id', 'image_created', 'image_mimetype', 'image_display', 'image_weight')) ? 'image_weight' : $criteria->getSort();
+ $sql .= ' ORDER BY '.$sort.' '.$criteria->getOrder();
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ if (!$result) {
+ return $ret;
+ }
+ while ($myrow = $this->db->fetchArray($result)) {
+ $image = new XoopsImage();
+ $image->assignVars($myrow);
+ if (!$id_as_key) {
+ $ret[] =& $image;
+ } else {
+ $ret[$myrow['image_id']] =& $image;
+ }
+ unset($image);
+ }
+ return $ret;
+ }
+
+ /**
+ * Count some images
+ *
+ * @param object $criteria {@link CriteriaElement}
+ * @return int
+ **/
+ function getCount($criteria = null)
+ {
+ $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('image');
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ }
+ if (!$result = $this->db->query($sql)) {
+ return 0;
+ }
+ list($count) = $this->db->fetchRow($result);
+ return $count;
+ }
+
+ /**
+ * Get a list of images
+ *
+ * @param int $imgcat_id
+ * @param bool $image_display
+ * @return array Array of {@link XoopsImage} objects
+ **/
+ function getList($imgcat_id, $image_display = null)
+ {
+ $criteria = new CriteriaCompo(new Criteria('imgcat_id', intval($imgcat_id)));
+ if (isset($image_display)) {
+ $criteria->add(new Criteria('image_display', intval($image_display)));
+ }
+ $images =& $this->getObjects($criteria, false, true);
+ $ret = array();
+ foreach (array_keys($images) as $i) {
+ $ret[$images[$i]->getVar('image_name')] = $images[$i]->getVar('image_nicename');
+ }
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/image.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/imagecategory.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/imagecategory.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/imagecategory.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,219 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+
+class XoopsImagecategory extends XoopsObject
+{
+ var $_imageCount;
+
+ function XoopsImagecategory()
+ {
+ $this->XoopsObject();
+ $this->initVar('imgcat_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('imgcat_name', XOBJ_DTYPE_TXTBOX, null, true, 100);
+ $this->initVar('imgcat_display', XOBJ_DTYPE_INT, 1, false);
+ $this->initVar('imgcat_weight', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('imgcat_maxsize', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('imgcat_maxwidth', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('imgcat_maxheight', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('imgcat_type', XOBJ_DTYPE_OTHER, null, false);
+ $this->initVar('imgcat_storetype', XOBJ_DTYPE_OTHER, null, false);
+ }
+
+ function setImageCount($value)
+ {
+ $this->_imageCount = intval($value);
+ }
+
+ function getImageCount()
+ {
+ return $this->_imageCount;
+ }
+}
+
+/**
+* XOOPS image caetgory handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS image category class objects.
+*
+*
+* @author Kazumi Ono <onokazu at xoops.org>
+*/
+
+class XoopsImagecategoryHandler extends XoopsObjectHandler
+{
+
+ function &create($isNew = true)
+ {
+ $imgcat = new XoopsImagecategory();
+ if ($isNew) {
+ $imgcat->setNew();
+ }
+ return $imgcat;
+ }
+
+ function &get($id)
+ {
+ if (intval($id) > 0) {
+ $sql = 'SELECT * FROM '.$this->db->prefix('imagecategory').' WHERE imgcat_id='.$id;
+ if (!$result = $this->db->query($sql)) {
+ $return = false;
+ return $return;
+ }
+ $numrows = $this->db->getRowsNum($result);
+ if ($numrows == 1) {
+ $imgcat = new XoopsImagecategory();
+ $imgcat->assignVars($this->db->fetchArray($result));
+ return $imgcat;
+ }
+ }
+ $return = false;
+ return $return;
+ }
+
+ function insert(&$imgcat)
+ {
+ if (strtolower(get_class($imgcat)) != 'xoopsimagecategory') {
+ return false;
+ }
+ if (!$imgcat->isDirty()) {
+ return true;
+ }
+ if (!$imgcat->cleanVars()) {
+ return false;
+ }
+ foreach ($imgcat->cleanVars as $k => $v) {
+ ${$k} = $v;
+ }
+ if ($imgcat->isNew()) {
+ $imgcat_id = $this->db->genId('imgcat_imgcat_id_seq');
+ $sql = sprintf("INSERT INTO %s (imgcat_id, imgcat_name, imgcat_display, imgcat_weight, imgcat_maxsize, imgcat_maxwidth, imgcat_maxheight, imgcat_type, imgcat_storetype) VALUES (%u, %s, %u, %u, %u, %u, %u, %s, %s)", $this->db->prefix('imagecategory'), $imgcat_id, $this->db->quoteString($imgcat_name), $imgcat_display, $imgcat_weight, $imgcat_maxsize, $imgcat_maxwidth, $imgcat_maxheight, $this->db->quoteString($imgcat_type), $this->db->quoteString($imgcat_storetype));
+ } else {
+ $sql = sprintf("UPDATE %s SET imgcat_name = %s, imgcat_display = %u, imgcat_weight = %u, imgcat_maxsize = %u, imgcat_maxwidth = %u, imgcat_maxheight = %u, imgcat_type = %s WHERE imgcat_id = %u", $this->db->prefix('imagecategory'), $this->db->quoteString($imgcat_name), $imgcat_display, $imgcat_weight, $imgcat_maxsize, $imgcat_maxwidth, $imgcat_maxheight, $this->db->quoteString($imgcat_type), $imgcat_id);
+ }
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ if (empty($imgcat_id)) {
+ $imgcat_id = $this->db->getInsertId();
+ }
+ $imgcat->assignVar('imgcat_id', $imgcat_id);
+ return true;
+ }
+
+ function delete(&$imgcat)
+ {
+ if (strtolower(get_class($imgcat)) != 'xoopsimagecategory') {
+ return false;
+ }
+ $sql = sprintf("DELETE FROM %s WHERE imgcat_id = %u", $this->db->prefix('imagecategory'), $imgcat->getVar('imgcat_id'));
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ return true;
+ }
+
+ function getObjects($criteria = null, $id_as_key = false)
+ {
+ $ret = array();
+ $limit = $start = 0;
+ $sql = 'SELECT DISTINCT c.* FROM '.$this->db->prefix('imagecategory').' c LEFT JOIN '.$this->db->prefix('group_permission')." l ON l.gperm_itemid=c.imgcat_id WHERE (l.gperm_name = 'imgcat_read' OR l.gperm_name = 'imgcat_write')";
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $where = $criteria->render();
+ $sql .= ($where != '') ? ' AND '.$where : '';
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $sql .= ' ORDER BY imgcat_weight, imgcat_id ASC';
+ $result = $this->db->query($sql, $limit, $start);
+ if (!$result) {
+ return $ret;
+ }
+ while ($myrow = $this->db->fetchArray($result)) {
+ $imgcat = new XoopsImagecategory();
+ $imgcat->assignVars($myrow);
+ if (!$id_as_key) {
+ $ret[] =& $imgcat;
+ } else {
+ $ret[$myrow['imgcat_id']] =& $imgcat;
+ }
+ unset($imgcat);
+ }
+ return $ret;
+ }
+
+
+ function getCount($criteria = null)
+ {
+ $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('imagecategory').' i LEFT JOIN '.$this->db->prefix('group_permission')." l ON l.gperm_itemid=i.imgcat_id WHERE (l.gperm_name = 'imgcat_read' OR l.gperm_name = 'imgcat_write')";
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $where = $criteria->render();
+ $sql .= ($where != '') ? ' AND '.$where : '';
+ }
+ if (!$result =& $this->db->query($sql)) {
+ return 0;
+ }
+ list($count) = $this->db->fetchRow($result);
+ return $count;
+ }
+
+ function getList($groups = array(), $perm = 'imgcat_read', $display = null, $storetype = null)
+ {
+ $criteria = new CriteriaCompo();
+ if (is_array($groups) && !empty($groups)) {
+ $criteriaTray = new CriteriaCompo();
+ foreach ($groups as $gid) {
+ $criteriaTray->add(new Criteria('gperm_groupid', $gid), 'OR');
+ }
+ $criteria->add($criteriaTray);
+ if ($perm == 'imgcat_read' || $perm == 'imgcat_write') {
+ $criteria->add(new Criteria('gperm_name', $perm));
+ $criteria->add(new Criteria('gperm_modid', 1));
+ }
+ }
+ if (isset($display)) {
+ $criteria->add(new Criteria('imgcat_display', intval($display)));
+ }
+ if (isset($storetype)) {
+ $criteria->add(new Criteria('imgcat_storetype', $storetype));
+ }
+ $categories =& $this->getObjects($criteria, true);
+ $ret = array();
+ foreach (array_keys($categories) as $i) {
+ $ret[$i] = $categories[$i]->getVar('imgcat_name');
+ }
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/imagecategory.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/imageset.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/imageset.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/imageset.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,207 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+
+class XoopsImageset extends XoopsObject
+{
+
+ function XoopsImageset()
+ {
+ $this->XoopsObject();
+ $this->initVar('imgset_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('imgset_name', XOBJ_DTYPE_TXTBOX, null, true, 50);
+ $this->initVar('imgset_refid', XOBJ_DTYPE_INT, 0, false);
+ }
+}
+
+/**
+* XOOPS imageset handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS imageset class objects.
+*
+*
+* @author Kazumi Ono <onokazu at xoops.org>
+*/
+
+class XoopsImagesetHandler extends XoopsObjectHandler
+{
+
+ function &create($isNew = true)
+ {
+ $imgset = new XoopsImageset();
+ if ($isNew) {
+ $imgset->setNew();
+ }
+ return $imgset;
+ }
+
+ function &get($id)
+ {
+ if (intval($id) > 0) {
+ $sql = 'SELECT * FROM '.$this->db->prefix('imgset').' WHERE imgset_id='.$id;
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ $numrows = $this->db->getRowsNum($result);
+ if ($numrows == 1) {
+ $imgset = new XoopsImageset();
+ $imgset->assignVars($this->db->fetchArray($result));
+ return $imgset;
+ }
+ }
+ return false;
+ }
+
+ function insert(&$imgset)
+ {
+ if (strtolower(get_class($imgset)) != 'xoopsimageset') {
+ return false;
+ }
+ if (!$imgset->isDirty()) {
+ return true;
+ }
+ if (!$imgset->cleanVars()) {
+ return false;
+ }
+ foreach ($imgset->cleanVars as $k => $v) {
+ ${$k} = $v;
+ }
+ if ($imgset->isNew()) {
+ $imgset_id = $this->db->genId('imgset_imgset_id_seq');
+ $sql = sprintf("INSERT INTO %s (imgset_id, imgset_name, imgset_refid) VALUES (%u, %s, %u)", $this->db->prefix('imgset'), $imgset_id, $this->db->quoteString($imgset_name), $imgset_refid);
+ } else {
+ $sql = sprintf("UPDATE %s SET imgset_name = %s, imgset_refid = %u WHERE imgset_id = %u", $this->db->prefix('imgset'), $this->db->quoteString($imgset_name), $imgset_refid, $imgset_id);
+ }
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ if (empty($imgset_id)) {
+ $imgset_id = $this->db->getInsertId();
+ }
+ $imgset->assignVar('imgset_id', $imgset_id);
+ return true;
+ }
+
+ function delete(&$imgset)
+ {
+ if (strtolower(get_class($imgset)) != 'xoopsimageset') {
+ return false;
+ }
+ $sql = sprintf("DELETE FROM %s WHERE imgset_id = %u", $this->db->prefix('imgset'), $imgset->getVar('imgset_id'));
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ $sql = sprintf("DELETE FROM %s WHERE imgset_id = %u", $this->db->prefix('imgset_tplset_link'), $imgset->getVar('imgset_id'));
+ $this->db->query($sql);
+ return true;
+ }
+
+ function getObjects($criteria = null, $id_as_key = false)
+ {
+ $ret = array();
+ $limit = $start = 0;
+ $sql = 'SELECT DISTINCT i.* FROM '.$this->db->prefix('imgset'). ' i LEFT JOIN '.$this->db->prefix('imgset_tplset_link'). ' l ON l.imgset_id=i.imgset_id';
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ if (!$result) {
+ return $ret;
+ }
+ while ($myrow = $this->db->fetchArray($result)) {
+ $imgset = new XoopsImageset();
+ $imgset->assignVars($myrow);
+ if (!$id_as_key) {
+ $ret[] =& $imgset;
+ } else {
+ $ret[$myrow['imgset_id']] =& $imgset;
+ }
+ unset($imgset);
+ }
+ return $ret;
+ }
+
+ function linkThemeset($imgset_id, $tplset_name)
+ {
+ $imgset_id = intval($imgset_id);
+ $tplset_name = trim($tplset_name);
+ if ($imgset_id <= 0 || $tplset_name == '') {
+ return false;
+ }
+ if (!$this->unlinkThemeset($imgset_id, $tplset_name)) {
+ return false;
+ }
+ $sql = sprintf("INSERT INTO %s (imgset_id, tplset_name) VALUES (%u, %s)", $this->db->prefix('imgset_tplset_link'), $imgset_id, $this->db->quoteString($tplset_name));
+ $result = $this->db->query($sql);
+ if (!$result) {
+ return false;
+ }
+ return true;
+ }
+
+ function unlinkThemeset($imgset_id, $tplset_name)
+ {
+ $imgset_id = intval($imgset_id);
+ $tplset_name = trim($tplset_name);
+ if ($imgset_id <= 0 || $tplset_name == '') {
+ return false;
+ }
+ $sql = sprintf("DELETE FROM %s WHERE imgset_id = %u AND tplset_name = %s", $this->db->prefix('imgset_tplset_link'), $imgset_id, $this->db->quoteString($tplset_name));
+ $result = $this->db->query($sql);
+ if (!$result) {
+ return false;
+ }
+ return true;
+ }
+
+ function getList($refid = null, $tplset = null)
+ {
+ $criteria = new CriteriaCompo();
+ if (isset($refid)) {
+ $criteria->add(new Criteria('imgset_refid', intval($refid)));
+ }
+ if (isset($tplset)) {
+ $criteria->add(new Criteria('tplset_name', $tplset));
+ }
+ $imgsets =& $this->getObjects($criteria, true);
+ $ret = array();
+ foreach (array_keys($imgsets) as $i) {
+ $ret[$i] = $imgsets[$i]->getVar('imgset_name');
+ }
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/imageset.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/imagesetimg.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/imagesetimg.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/imagesetimg.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,199 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+
+class XoopsImagesetimg extends XoopsObject
+{
+ function XoopsImagesetimg()
+ {
+ $this->XoopsObject();
+ $this->initVar('imgsetimg_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('imgsetimg_file', XOBJ_DTYPE_OTHER, null, false);
+ $this->initVar('imgsetimg_body', XOBJ_DTYPE_SOURCE, null, false);
+ $this->initVar('imgsetimg_imgset', XOBJ_DTYPE_INT, null, false);
+ }
+}
+
+/**
+* XOOPS imageset image handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS imageset image class objects.
+*
+*
+* @author Kazumi Ono <onokazu at xoops.org>
+*/
+
+class XoopsImagesetimgHandler extends XoopsObjectHandler
+{
+
+ function &create($isNew = true)
+ {
+ $imgsetimg = new XoopsImagesetimg();
+ if ($isNew) {
+ $imgsetimg->setNew();
+ }
+ return $imgsetimg;
+ }
+
+ function &get($id)
+ {
+ $id = intval($id);
+ if ($id > 0) {
+ $sql = 'SELECT * FROM '.$this->db->prefix('imgsetimg').' WHERE imgsetimg_id='.$id;
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ $numrows = $this->db->getRowsNum($result);
+ if ($numrows == 1) {
+ $imgsetimg = new XoopsImagesetimg();
+ $imgsetimg->assignVars($this->db->fetchArray($result));
+ return $imgsetimg;
+ }
+ }
+ return false;
+ }
+
+ function insert(&$imgsetimg)
+ {
+ if (strtolower(get_class($imgsetimg)) != 'xoopsimagesetimg') {
+ return false;
+ }
+ if (!$imgsetimg->isDirty()) {
+ return true;
+ }
+ if (!$imgsetimg->cleanVars()) {
+ return false;
+ }
+ foreach ($imgsetimg->cleanVars as $k => $v) {
+ ${$k} = $v;
+ }
+ if ($imgsetimg->isNew()) {
+ $imgsetimg_id = $this->db->genId('imgsetimg_imgsetimg_id_seq');
+ $sql = sprintf("INSERT INTO %s (imgsetimg_id, imgsetimg_file, imgsetimg_body, imgsetimg_imgset) VALUES (%u, %s, %s, %s)", $this->db->prefix('imgsetimg'), $imgsetimg_id, $this->db->quoteString($imgsetimg_file), $this->db->quoteString($imgsetimg_body), $this->db->quoteString($imgsetimg_imgset));
+ } else {
+ $sql = sprintf("UPDATE %s SET imgsetimg_file = %s, imgsetimg_body = %s, imgsetimg_imgset = %s WHERE imgsetimg_id = %u", $this->db->prefix('imgsetimg'), $this->db->quoteString($imgsetimg_file), $this->db->quoteString($imgsetimg_body), $this->db->quoteString($imgsetimg_imgset), $imgsetimg_id);
+ }
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ if (empty($imgsetimg_id)) {
+ $imgsetimg_id = $this->db->getInsertId();
+ }
+ $imgsetimg->assignVar('imgsetimg_id', $imgsetimg_id);
+ return true;
+ }
+
+ function delete(&$imgsetimg)
+ {
+ if (strtolower(get_class($imgsetimg)) != 'xoopsimagesetimg') {
+ return false;
+ }
+ $sql = sprintf("DELETE FROM %s WHERE imgsetimg_id = %u", $this->db->prefix('imgsetimg'), $imgsetimg->getVar('imgsetimg_id'));
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ return true;
+ }
+
+ function getObjects($criteria = null, $id_as_key = false)
+ {
+ $ret = array();
+ $limit = $start = 0;
+ $sql = 'SELECT DISTINCT i.* FROM '.$this->db->prefix('imgsetimg'). ' i LEFT JOIN '.$this->db->prefix('imgset_tplset_link'). ' l ON l.imgset_id=i.imgsetimg_imgset LEFT JOIN '.$this->db->prefix('imgset').' s ON s.imgset_id=l.imgset_id';
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ $sql .= ' ORDER BY imgsetimg_id '.$criteria->getOrder();
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ if (!$result) {
+ return $ret;
+ }
+ while ($myrow = $this->db->fetchArray($result)) {
+ $imgsetimg = new XoopsImagesetimg();
+ $imgsetimg->assignVars($myrow);
+ if (!$id_as_key) {
+ $ret[] =& $imgsetimg;
+ } else {
+ $ret[$myrow['imgsetimg_id']] =& $imgsetimg;
+ }
+ unset($imgsetimg);
+ }
+ return $ret;
+ }
+
+ function getCount($criteria = null)
+ {
+ $sql = 'SELECT COUNT(i.imgsetimg_id) FROM '.$this->db->prefix('imgsetimg'). ' i LEFT JOIN '.$this->db->prefix('imgset_tplset_link'). ' l ON l.imgset_id=i.imgsetimg_imgset';
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere().' GROUP BY i.imgsetimg_id';
+ }
+ if (!$result =& $this->db->query($sql)) {
+ return 0;
+ }
+ list($count) = $this->db->fetchRow($result);
+ return $count;
+ }
+
+/**
+ * Function-Documentation
+ * @param type $imgset_id documentation
+ * @param type $id_as_key = false documentation
+ * @return type documentation
+ * @author Kazumi Ono <onokazu at xoops.org>
+ **/
+ function getByImageset($imgset_id, $id_as_key = false)
+ {
+ return $this->getObjects(new Criteria('imgsetimg_imgset', intval($imgset_id)), $id_as_key);
+ }
+
+/**
+ * Function-Documentation
+ * @param type $filename documentation
+ * @param type $imgset_id documentation
+ * @return type documentation
+ * @author Kazumi Ono <onokazu at xoops.org>
+ **/
+ function imageExists($filename, $imgset_id)
+ {
+ $criteria = new CriteriaCompo(new Criteria('imgsetimg_file', $filename));
+ $criteria->add(new Criteria('imgsetimg_imgset', intval($imgset_id)));
+ if ($this->getCount($criteria) > 0) {
+ return true;
+ }
+ return false;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/imagesetimg.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/member.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/member.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/member.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,405 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+require_once XOOPS_ROOT_PATH.'/kernel/user.php';
+require_once XOOPS_ROOT_PATH.'/kernel/group.php';
+
+/**
+* XOOPS member handler class.
+* This class provides simple interface (a facade class) for handling groups/users/
+* membership data.
+*
+*
+* @author Kazumi Ono <onokazu at xoops.org>
+* @copyright copyright (c) 2000-2003 XOOPS.org
+* @package kernel
+*/
+
+class XoopsMemberHandler{
+
+ /**#@+
+ * holds reference to group handler(DAO) class
+ * @access private
+ */
+ var $_gHandler;
+
+ /**
+ * holds reference to user handler(DAO) class
+ */
+ var $_uHandler;
+
+ /**
+ * holds reference to membership handler(DAO) class
+ */
+ var $_mHandler;
+
+ /**
+ * holds temporary user objects
+ */
+ var $_members = array();
+ /**#@-*/
+
+ /**
+ * constructor
+ *
+ */
+ function XoopsMemberHandler(&$db)
+ {
+ $this->_gHandler = new XoopsGroupHandler($db);
+ $this->_uHandler = new XoopsUserHandler($db);
+ $this->_mHandler = new XoopsMembershipHandler($db);
+ }
+
+ /**
+ * create a new group
+ *
+ * @return object XoopsGroup reference to the new group
+ */
+ function &createGroup()
+ {
+ $return =& $this->_gHandler->create();
+ return $return;
+ }
+
+ /**
+ * create a new user
+ *
+ * @return object XoopsUser reference to the new user
+ */
+ function &createUser()
+ {
+ $return =& $this->_uHandler->create();
+ return $return;
+ }
+
+ /**
+ * retrieve a group
+ *
+ * @param int $id ID for the group
+ * @return object XoopsGroup reference to the group
+ */
+ function getGroup($id)
+ {
+ return $this->_gHandler->get($id);
+ }
+
+ /**
+ * retrieve a user
+ *
+ * @param int $id ID for the user
+ * @return object XoopsUser reference to the user
+ */
+ function &getUser($id)
+ {
+ if (!isset($this->_members[$id])) {
+ $this->_members[$id] =& $this->_uHandler->get($id);
+ }
+ return $this->_members[$id];
+ }
+
+ /**
+ * delete a group
+ *
+ * @param object $group reference to the group to delete
+ * @return bool FALSE if failed
+ */
+ function deleteGroup(&$group)
+ {
+ $this->_gHandler->delete($group);
+ $this->_mHandler->deleteAll(new Criteria('groupid', $group->getVar('groupid')));
+ return true;
+ }
+
+ /**
+ * delete a user
+ *
+ * @param object $user reference to the user to delete
+ * @return bool FALSE if failed
+ */
+ function deleteUser(&$user)
+ {
+ $this->_uHandler->delete($user);
+ $this->_mHandler->deleteAll(new Criteria('uid', $user->getVar('uid')));
+ return true;
+ }
+
+ /**
+ * insert a group into the database
+ *
+ * @param object $group reference to the group to insert
+ * @return bool TRUE if already in database and unchanged
+ * FALSE on failure
+ */
+ function insertGroup(&$group)
+ {
+ return $this->_gHandler->insert($group);
+ }
+
+ /**
+ * insert a user into the database
+ *
+ * @param object $user reference to the user to insert
+ * @return bool TRUE if already in database and unchanged
+ * FALSE on failure
+ */
+ function insertUser(&$user, $force = false)
+ {
+ return $this->_uHandler->insert($user, $force);
+ }
+
+ /**
+ * retrieve groups from the database
+ *
+ * @param object $criteria {@link CriteriaElement}
+ * @param bool $id_as_key use the group's ID as key for the array?
+ * @return array array of {@link XoopsGroup} objects
+ */
+ function getGroups($criteria = null, $id_as_key = false)
+ {
+ return $this->_gHandler->getObjects($criteria, $id_as_key);
+ }
+
+ /**
+ * retrieve users from the database
+ *
+ * @param object $criteria {@link CriteriaElement}
+ * @param bool $id_as_key use the group's ID as key for the array?
+ * @return array array of {@link XoopsUser} objects
+ */
+ function getUsers($criteria = null, $id_as_key = false)
+ {
+ if (is_null($criteria)) {
+ $criteria = new Criteria('uid', 0, '!=');
+ }
+ return $this->_uHandler->getObjects($criteria, $id_as_key);
+ }
+
+ /**
+ * get a list of groupnames and their IDs
+ *
+ * @param object $criteria {@link CriteriaElement} object
+ * @return array associative array of group-IDs and names
+ */
+ function getGroupList($criteria = null)
+ {
+ return $this->_gHandler->getList($criteria);
+ }
+
+ /**
+ * get a list of usernames and their IDs
+ *
+ * @param object $criteria {@link CriteriaElement} object
+ * @return array associative array of user-IDs and names
+ */
+ function getUserList($criteria = null)
+ {
+ if (is_null($criteria)) {
+ $criteria = new Criteria('uid', 0, '!=');
+ }
+ return $this->_uHandler->getList($criteria);
+ }
+
+ /**
+ * add a user to a group
+ *
+ * @param int $group_id ID of the group
+ * @param int $user_id ID of the user
+ * @return object XoopsMembership
+ */
+ function addUserToGroup($group_id, $user_id)
+ {
+ $mship =& $this->_mHandler->create();
+ $mship->setVar('groupid', $group_id);
+ $mship->setVar('uid', $user_id);
+ return $this->_mHandler->insert($mship);
+ }
+
+ /**
+ * remove a list of users from a group
+ *
+ * @param int $group_id ID of the group
+ * @param array $user_ids array of user-IDs
+ * @return bool success?
+ */
+ function removeUsersFromGroup($group_id, $user_ids = array())
+ {
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('groupid', $group_id));
+ $criteria2 = new CriteriaCompo();
+ foreach ($user_ids as $uid) {
+ $criteria2->add(new Criteria('uid', $uid), 'OR');
+ }
+ $criteria->add($criteria2);
+ return $this->_mHandler->deleteAll($criteria);
+ }
+
+ /**
+ * get a list of users belonging to a group
+ *
+ * @param int $group_id ID of the group
+ * @param bool $asobject return the users as objects?
+ * @param int $limit number of users to return
+ * @param int $start index of the first user to return
+ * @return array Array of {@link XoopsUser} objects (if $asobject is TRUE)
+ * or of associative arrays matching the record structure in the database.
+ */
+ function getUsersByGroup($group_id, $asobject = false, $limit = 0, $start = 0)
+ {
+ $user_ids =& $this->_mHandler->getUsersByGroup($group_id, $limit, $start);
+ if (!$asobject) {
+ return $user_ids;
+ } else {
+ $ret = array();
+ foreach ($user_ids as $u_id) {
+ $user =& $this->getUser($u_id);
+ if (is_object($user)) {
+ $ret[] =& $user;
+ }
+ unset($user);
+ }
+ return $ret;
+ }
+ }
+
+ /**
+ * get a list of groups that a user is member of
+ *
+ * @param int $user_id ID of the user
+ * @param bool $asobject return groups as {@link XoopsGroup} objects or arrays?
+ * @return array array of objects or arrays
+ */
+ function getGroupsByUser($user_id, $asobject = false)
+ {
+ $group_ids =& $this->_mHandler->getGroupsByUser($user_id);
+ if (!$asobject) {
+ return $group_ids;
+ } else {
+ foreach ($group_ids as $g_id) {
+ $ret[] =& $this->getGroup($g_id);
+ }
+ return $ret;
+ }
+ }
+
+ /**
+ * log in a user
+ *
+ * @param string $uname username as entered in the login form
+ * @param string $pwd password entered in the login form
+ * @return object XoopsUser reference to the logged in user. FALSE if failed to log in
+ */
+ function &loginUser($uname, $pwd)
+ {
+ $return =& $this->_uHandler->loginUser($uname, $pwd);
+ return $return;
+ }
+
+ /**
+ * logs in a user with an nd5 encrypted password
+ *
+ * @param string $uname username
+ * @param string $md5pwd password encrypted with md5
+ * @return object XoopsUser reference to the logged in user. FALSE if failed to log in
+ */
+ function &loginUserMd5($uname, $md5pwd)
+ {
+ $return =& $this->_uHandler->loginUser($uname, $md5pwd, true);
+ return $return;
+ }
+
+ /**
+ * count users matching certain conditions
+ *
+ * @param object $criteria {@link CriteriaElement} object
+ * @return int
+ */
+ function getUserCount($criteria = null)
+ {
+ return $this->_uHandler->getCount($criteria);
+ }
+
+ /**
+ * count users belonging to a group
+ *
+ * @param int $group_id ID of the group
+ * @return int
+ */
+ function getUserCountByGroup($group_id)
+ {
+ return $this->_mHandler->getCount(new Criteria('groupid', $group_id));
+ }
+
+ /**
+ * updates a single field in a users record
+ *
+ * @param object $user reference to the {@link XoopsUser} object
+ * @param string $fieldName name of the field to update
+ * @param string $fieldValue updated value for the field
+ * @return bool TRUE if success or unchanged, FALSE on failure
+ */
+ function updateUserByField(&$user, $fieldName, $fieldValue)
+ {
+ return $this->_uHandler->updateUserByField($fieldName, $fieldValue, $user->getVar('uid'));
+ }
+
+ /**
+ * updates a single field in a users record
+ *
+ * @param string $fieldName name of the field to update
+ * @param string $fieldValue updated value for the field
+ * @param object $criteria {@link CriteriaElement} object
+ * @return bool TRUE if success or unchanged, FALSE on failure
+ */
+ function updateUsersByField($fieldName, $fieldValue, $criteria = null)
+ {
+ return $this->_uHandler->updateAll($fieldName, $fieldValue, $criteria);
+ }
+
+ /**
+ * activate a user
+ *
+ * @param object $user reference to the {@link XoopsUser} object
+ * @return bool successful?
+ */
+ function activateUser(&$user)
+ {
+ if ($user->getVar('level') == 1) {
+ return true;
+ }
+ $user->setVar('level', 1);
+ return $this->_uHandler->insert($user, true);
+ }
+
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/member.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/module.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/module.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/module.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,1472 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+
+/**
+ * A Module
+ *
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright (c) 2000-2003 The Xoops Project - www.xoops.org
+ */
+class XoopsModule extends XoopsObject
+{
+ /**
+ * @var string
+ */
+ var $modinfo;
+ /**
+ * @var string
+ */
+ var $adminmenu;
+
+ /**
+ * @var array
+ */
+ var $_msg;
+
+ /**
+ * Constructor
+ */
+ function XoopsModule()
+ {
+ $this->XoopsObject();
+ $this->initVar('mid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, true, 150);
+ $this->initVar('version', XOBJ_DTYPE_INT, 100, false);
+ $this->initVar('last_update', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('weight', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('isactive', XOBJ_DTYPE_INT, 1, false);
+ $this->initVar('dirname', XOBJ_DTYPE_OTHER, null, true);
+ $this->initVar('hasmain', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('hasadmin', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('hassearch', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('hasconfig', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('hascomments', XOBJ_DTYPE_INT, 0, false);
+ // RMV-NOTIFY
+ $this->initVar('hasnotification', XOBJ_DTYPE_INT, 0, false);
+ // Dynamic user profiles - not necessary?
+ //$this->initVar('hasprofile', XOBJ_DTYPE_INT, 0, false);
+ }
+
+ /**
+ * Load module info
+ *
+ * @param string $dirname Directory Name
+ * @param boolean $verbose
+ **/
+ function loadInfoAsVar($dirname, $verbose = true)
+ {
+ if ( !isset($this->modinfo) ) {
+ $this->loadInfo($dirname, $verbose);
+ }
+ $version = intval(100 * ($this->modinfo['version']+0.001));
+ $this->setVar('name', $this->modinfo['name'], true);
+ $this->setVar('version', $version);
+ $this->setVar('dirname', $this->modinfo['dirname'], true);
+ $hasmain = (isset($this->modinfo['hasMain']) && $this->modinfo['hasMain'] == 1) ? 1 : 0;
+ $hasadmin = (isset($this->modinfo['hasAdmin']) && $this->modinfo['hasAdmin'] == 1) ? 1 : 0;
+ $hassearch = (isset($this->modinfo['hasSearch']) && $this->modinfo['hasSearch'] == 1) ? 1 : 0;
+ $hasconfig = ((isset($this->modinfo['config']) && is_array($this->modinfo['config'])) || !empty($this->modinfo['hasComments'])) ? 1 : 0;
+ $hascomments = (isset($this->modinfo['hasComments']) && $this->modinfo['hasComments'] == 1) ? 1 : 0;
+ // RMV-NOTIFY
+ $hasnotification = (isset($this->modinfo['hasNotification']) && $this->modinfo['hasNotification'] == 1) ? 1 : 0;
+ //$hasprofile = (isset($this->modinfo['hasProfile']) && $this->modinfo['hasProfile'] == 1) ? 1 : 0;
+ $this->setVar('hasmain', $hasmain);
+ $this->setVar('hasadmin', $hasadmin);
+ $this->setVar('hassearch', $hassearch);
+ $this->setVar('hasconfig', $hasconfig);
+ $this->setVar('hascomments', $hascomments);
+ // RMV-NOTIFY
+ $this->setVar('hasnotification', $hasnotification);
+ }
+
+ /**
+ * add a message
+ *
+ * @param string $str message to add
+ * @access public
+ */
+ function setMessage($str)
+ {
+ $this->_msg[] = trim($str);
+ }
+
+ /**
+ * return the messages for this object as an array
+ *
+ * @return array an array of messages
+ * @access public
+ */
+ function getMessages()
+ {
+ return $this->_msg;
+ }
+
+ /**
+ * Set module info
+ *
+ * @param string $name
+ * @param mix $value
+ * @return bool
+ **/
+ function &setInfo($name, $value)
+ {
+ if(empty($name)) {
+ $this->modinfo = $value;
+ }else{
+ $this->modinfo[$name] = $value;
+ }
+ return true;
+ }
+
+ /**
+ * Get module info
+ *
+ * @param string $name
+ * @return array|string Array of module information.
+ * If {@link $name} is set, returns a singel module information item as string.
+ **/
+ function &getInfo($name=null)
+ {
+ if ( !isset($this->modinfo) ) {
+ $this->loadInfo($this->getVar('dirname'));
+ }
+ if ( !empty($name) ) {
+ if ( isset($this->modinfo[$name]) ) {
+ return $this->modinfo[$name];
+ }
+ $return = false;
+ return $return;
+ }
+ return $this->modinfo;
+ }
+
+ /**
+ * Get a link to the modules main page
+ *
+ * @return string FALSE on fail
+ */
+ function mainLink()
+ {
+ if ( $this->getVar('hasmain') == 1 ) {
+ $ret = '<a href="'.XOOPS_URL.'/modules/'.$this->getVar('dirname').'/">'.$this->getVar('name').'</a>';
+ return $ret;
+ }
+ return false;
+ }
+
+ /**
+ * Get links to the subpages
+ *
+ * @return string
+ */
+ function subLink()
+ {
+ $ret = array();
+ if ( $this->getInfo('sub') && is_array($this->getInfo('sub')) ) {
+ foreach ( $this->getInfo('sub') as $submenu ) {
+ $ret[] = array('name' => $submenu['name'], 'url' => $submenu['url']);
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * Load the admin menu for the module
+ */
+ function loadAdminMenu() {
+ $adminmenu = array();
+ list( $dirname, $menufile ) = array( $this->getVar('dirname'), $this->getInfo('adminmenu') );
+ if ( !empty( $menufile ) && file_exists( XOOPS_ROOT_PATH . "/modules/$dirname/$menufile" ) ) {
+ include( XOOPS_ROOT_PATH . "/modules/$dirname/$menufile" );
+ }
+ $this->adminmenu = $adminmenu;
+ }
+
+ /**
+ * Get the admin menu for the module
+ *
+ * @return string
+ */
+ function &getAdminMenu()
+ {
+ if ( !isset($this->adminmenu) ) {
+ $this->loadAdminMenu();
+ }
+ return $this->adminmenu;
+ }
+
+ /**
+ * Load the module info for this module
+ *
+ * @param string $dirname Module directory
+ * @param bool $verbose Give an error on fail?
+ */
+ function loadInfo($dirname, $verbose = true) {
+ global $xoopsConfig;
+ xoops_load_lang_file( 'modinfo', $dirname );
+ if (file_exists(XOOPS_ROOT_PATH.'/modules/'.$dirname.'/xoops_version.php')) {
+ include XOOPS_ROOT_PATH.'/modules/'.$dirname.'/xoops_version.php';
+ } else {
+ if (false != $verbose) {
+ echo "Module File for $dirname Not Found!";
+ }
+ return;
+ }
+ $this->modinfo = $modversion;
+ unset($modversion);
+ }
+
+ /**
+ * Search contents within a module
+ *
+ * @param string $term
+ * @param string $andor 'AND' or 'OR'
+ * @param integer $limit
+ * @param integer $offset
+ * @param integer $userid
+ * @return mixed Search result.
+ **/
+ function search($term = '', $andor = 'AND', $limit = 0, $offset = 0, $userid = 0)
+ {
+ if ($this->getVar('hassearch') != 1) {
+ return false;
+ }
+ $search =& $this->getInfo('search');
+ if ($this->getVar('hassearch') != 1 || !isset($search['file']) || !isset($search['func']) || $search['func'] == '' || $search['file'] == '') {
+ return false;
+ }
+ if (file_exists(XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname').'/'.$search['file'])) {
+ include_once XOOPS_ROOT_PATH.'/modules/'.$this->getVar('dirname').'/'.$search['file'];
+ } else {
+ return false;
+ }
+ if (function_exists($search['func'])) {
+ $func = $search['func'];
+ return $func($term, $andor, $limit, $offset, $userid);
+ }
+ return false;
+ }
+
+ /**
+ * check user's access to the module
+ *
+ * @return bool
+ */
+ function checkAccess() {
+ global $xoopsUser, $xoopsOption;
+ $groupperm_handler =& xoops_gethandler('groupperm');
+ $groups = $xoopsUser ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
+ if (file_exists('./xoops_version.php')) {
+ $right = 'module_read';
+ }
+ elseif (file_exists('../xoops_version.php')) {
+ $xoopsOption['pagetype'] = "admin";
+ $right = 'module_admin';
+ }
+ else {
+ return true;
+ }
+ return $groupperm_handler->checkRight($right, $this->getVar( 'mid' ), $groups );
+ }
+
+ /**
+ * load language strings in a module
+ *
+ * @param string $type can be "main", "admin", "blocks" or any other filename located in the module's language folder
+ *
+ * @return void
+ */
+ function loadLanguage($type = "main") {
+ global $xoopsConfig;
+ if ( file_exists(XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/language/".$xoopsConfig['language']."/".$type.".php") ) {
+ include_once XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/language/".$xoopsConfig['language']."/".$type.".php";
+ } else {
+ if ( file_exists(XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/language/english/".$type.".php") ) {
+ include_once XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/language/english/".$type.".php";
+ }
+ }
+ }
+
+ /**
+ * Load error messages
+ *
+ * @return void
+ **/
+ function loadErrorMessages() {
+ global $xoopsConfig;
+ if ( file_exists(XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/language/".$xoopsConfig['language']."/error.php") ) {
+ include_once XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/language/".$xoopsConfig['language']."/error.php";
+ } else {
+ if ( file_exists(XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/language/english/error.php") ) {
+ include_once XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/language/english/error.php";
+ }
+ }
+ }
+
+ /**#@+
+ * For backward compatibility only!
+ * @deprecated
+ */
+ function mid()
+ {
+ return $this->getVar('mid');
+ }
+ function dirname()
+ {
+ return $this->getVar('dirname');
+ }
+ function name()
+ {
+ return $this->getVar('name');
+ }
+ function getByDirName($dirname)
+ {
+ $modhandler =& xoops_gethandler('module');
+ return $modhandler->getByDirname($dirname);
+ }
+ /**#@-*/
+
+ /**
+ * Get the currently accessed page
+ *
+ * @return array
+ */
+ function getCurrentPage() {
+ global $xoopsConfig, $xoopsOption;
+
+ $relative_url = XOOPS_URL;
+ if (preg_match('!^http://!i', $relative_url)) {
+ $uri_parts = parse_url($relative_url);
+ $relative_url = empty($uri_parts['path'])?"":$uri_parts['path'];
+ }
+
+ if ($xoopsOption['pagetype'] == "admin") {
+ if (strpos($_SERVER['REQUEST_URI'], $relative_url."/admin.php")=== 0) {
+ //on admin frontpage
+ $moduleid = 0;
+ $pageid = 2;
+ }
+ else {
+ //no blocks
+ return array();
+ }
+ }
+ elseif ($this->getvar('dirname') != "system") {
+ if (preg_match("/[^\?]*index\.php$/i", $_SERVER['REQUEST_URI']) && $xoopsConfig['startpage'] == $this->getVar('dirname')) {
+ //on top page
+ $moduleid = 0;
+ $pageid = 1;
+ }
+ else {
+ //on module page
+ $moduleid = $this->getVar('mid');
+ $pageid = 0;
+
+ $pages = $this->getInfo('pages');
+ if ($pages == false) {
+ $pages = $this->getInfo('sub');
+ }
+ if (is_array($pages) && $pages != array()) {
+ foreach ($pages as $id => $pageinfo) {
+ if (preg_match("/[^\?]*".preg_quote($pageinfo['url'], '/')."/iU", $_SERVER['REQUEST_URI'])) {
+ $pageid = $id;
+ break;
+ }
+ }
+ }
+ }
+ } else {
+ if (!empty($xoopsOption['show_cblock'])) {
+ //on top page
+ $moduleid = 0;
+ $pageid = 1;
+ }
+ else {
+ //"all pages"-blocks only
+ $moduleid = 0;
+ $pageid = 0;
+ }
+ }
+ return array("mid" => $moduleid, "page" => $pageid);
+ }
+
+ /**
+ * Installs the module
+ *
+ * @param array $admingroups array of group ids to grant module admin privileges after successful installation
+ * @param array $accessgroups array of group ids to grant module access privileges after successful installation
+ *
+ * @return string
+ */
+ function install($admingroups = array(), $accessgroups = array()) {
+ $this->loadInfoAsVar($this->dirname());
+ $this->setVar('weight', 1);
+
+ if (!$this->executeScript('onInstall', 1)) {
+ echo "<p>".sprintf(_MD_AM_FAILINS, "<b>".$this->getVar('name')."</b>")."</p>";
+ foreach ($this->getMessages() as $msg) {
+ echo '<code>'.$msg.'</code><br />';
+ }
+ return;
+ }
+
+ $error = $this->executeSQL();
+ // if no error, save the module info and blocks info associated with it
+ if ($error == false) {
+ $this->insert();
+ // execute module specific install script if any
+ $this->executeScript('onInstall');
+ //@todo: What if it fails? Roll back installation?
+
+ $this->insertGroupPermissions($admingroups, 'admin');
+ $this->insertGroupPermissions($accessgroups, 'access');
+
+ $ret = '<p><code>';
+ foreach ($this->getMessages() as $m) {
+ $ret .= $m.'<br />';
+ }
+ $ret .= '</code><br />'.sprintf(_MD_AM_OKINS, "<b>".$this->getVar('name')."</b>").'</p>';
+ return $ret;
+ } else {
+ $ret = '<p>';
+ $ret .= '<br />'.sprintf(_MD_AM_FAILINS, '<b>'.$this->getVar('dirname').'</b>').' '._MD_AM_ERRORSC;
+ foreach ($this->getErrors() as $er) {
+ $ret .= '<br /> '.$er;
+ }
+ $ret .= '</p>';
+ return $ret;
+ }
+ }
+
+ /**
+ * Updates the module
+ *
+ * @return void
+ */
+ function update() {
+ // Save current version for use in the update function
+ $prev_version = $this->getVar('version');
+ include_once XOOPS_ROOT_PATH.'/class/template.php';
+ xoops_template_clear_module_cache($this->getVar('mid'));
+
+ // we dont want to change the module name set by admin
+ $temp_name = $this->getVar('name');
+ $this->loadInfoAsVar($this->getVar('dirname'));
+ $this->setVar('name', $temp_name);
+
+ // we also don't want to update version until after update process is successfully finished
+ $new_version = $this->getVar('version');
+ $this->setVar('version', $prev_version);
+
+ if (!$this->executeScript('onUpdate', 1)) {
+ echo "<p>".sprintf(_MD_AM_FAILUPD, "<b>".$this->getVar('name')."</b>")."</p>";
+ foreach ($this->getMessages() as $msg) {
+ echo '<code>'.$msg.'</code><br />';
+ }
+ return;
+ }
+
+ echo $this->insert();
+
+ $this->executeScript('onUpdate');
+ //@todo: what if it fails? Roll back update?
+
+ //re-set version to new version while keeping custom name
+ $this->setVar('version', $new_version);
+ $module_handler =& xoops_gethandler('module');
+ $module_handler->insert($this);
+ foreach ($this->getMessages() as $msg) {
+ echo '<code>'.$msg.'</code><br />';
+ }
+ echo "<p>".sprintf(_MD_AM_OKUPD, "<b>".$this->getVar('name')."</b>")."</p>";
+ }
+
+ /**
+ * Updates or inserts the module's data, templates, blocks, configuration categories and items and profile fields
+ *
+ * @return string
+ */
+ function insert() {
+ $this->setVar('last_update', time());
+ $module_handler =& xoops_gethandler('module');
+ if (!$module_handler->insert($this)) {
+ $this->setErrors('Could not insert <b>'.$this->getVar('name').'</b> to database.');
+ $ret = "<p>".sprintf(_MD_AM_FAILINS, "<b>".$this->name()."</b>")." "._MD_AM_ERRORSC."<br />";
+ foreach ( $this->getErrors() as $err ) {
+ $ret .= " - ".$err."<br />";
+ }
+ $ret .= "</p>";
+ return $ret;
+ }
+
+ $this->setMessage('Module data inserted successfully. Module ID: <b>'.$this->getVar('mid').'</b>');
+ $this->insertTemplates();
+
+ include_once XOOPS_ROOT_PATH.'/class/template.php';
+ xoops_template_clear_module_cache($this->getVar('mid'));
+
+ $this->insertBlocks();
+
+ $this->insertConfigCategories();
+ $this->insertConfig();
+
+ $this->insertProfileFields();
+ $ret = "";
+ foreach ($this->getMessages() as $msg) {
+ $ret .= '<code>'.$msg.'</code><br />';
+ }
+ return $ret;
+ }
+
+ /**
+ * Execute module's SQL file - if any
+ *
+ * @return bool
+ */
+ function executeSQL() {
+ $error = false;
+ $sqlfile =& $this->getInfo('sqlfile');
+ if ($sqlfile != false && is_array($sqlfile)) {
+ $reservedTables = array('avatar', 'avatar_users_link', 'block_module_link', 'xoopscomments', 'config', 'configcategory', 'configoption', 'image', 'imagebody', 'imagecategory', 'imgset', 'imgset_tplset_link', 'imgsetimg', 'groups','groups_users_link','group_permission', 'online', 'bannerclient', 'banner', 'bannerfinish', 'ranks', 'session', 'smiles', 'users', 'newblocks', 'modules', 'tplfile', 'tplset', 'tplsource', 'xoopsnotifications', 'banner', 'bannerclient', 'bannerfinish');
+ $sql_file_path = XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/".$sqlfile[XOOPS_DB_TYPE];
+ if (!file_exists($sql_file_path)) {
+ $this->setErrors("SQL file not found at <b>$sql_file_path</b>");
+ $error = true;
+ } else {
+ $this->setMessage("SQL file found at <b>$sql_file_path</b>.<br /> Creating tables...");
+ include_once XOOPS_ROOT_PATH.'/class/database/sqlutility.php';
+ $sql_query = fread(fopen($sql_file_path, 'r'), filesize($sql_file_path));
+ $sql_query = trim($sql_query);
+ SqlUtility::splitMySqlFile($pieces, $sql_query);
+ $created_tables = array();
+ foreach ($pieces as $piece) {
+ // [0] contains the prefixed query
+ // [4] contains unprefixed table name
+ $prefixed_query = SqlUtility::prefixQuery($piece, $GLOBALS['xoopsDB']->prefix());
+ if (!$prefixed_query) {
+ $this->setErrors("<b>$piece</b> is not a valid SQL!");
+ $error = true;
+ break;
+ }
+ // check if the table name is reserved
+ if (!in_array($prefixed_query[4], $reservedTables)) {
+ // not reserved, so try to create one
+ if (!$GLOBALS['xoopsDB']->query($prefixed_query[0])) {
+ $this->setErrors($GLOBALS['xoopsDB']->error());
+ $error = true;
+ break;
+ } else {
+
+ if (!in_array($prefixed_query[4], $created_tables)) {
+ $this->setMessage(' Table <b>'.$GLOBALS['xoopsDB']->prefix($prefixed_query[4]).'</b> created.');
+ $created_tables[] = $prefixed_query[4];
+ } else {
+ $this->setMessage(' Data inserted to table <b>'.$GLOBALS['xoopsDB']->prefix($prefixed_query[4]).'</b>.');
+ }
+ }
+ } else {
+ // the table name is reserved, so halt the installation
+ $this->setErrors('<b>'.$prefixed_query[4]."</b> is a reserved table!");
+ $error = true;
+ break;
+ }
+ }
+ // if there was an error, delete the tables created so far, so the next installation will not fail
+ if ($error == true) {
+ foreach ($created_tables as $ct) {
+ //echo $ct;
+ $GLOBALS['xoopsDB']->query("DROP TABLE ".$GLOBALS['xoopsDB']->prefix($ct));
+ }
+ }
+ }
+ }
+ return $error;
+ }
+
+ /**
+ * Inserts templates into the database
+ *
+ * @return void
+ */
+ function insertTemplates() {
+ $tplfile_handler =& xoops_gethandler('tplfile');
+
+ // Delete existing templates from this module in the default template set
+ $deltpl =& $tplfile_handler->find('default', 'module', $this->getVar('mid'));
+ $delng = array();
+ $existing_templates = array();
+
+ if (is_array($deltpl)) {
+ global $xoopsTpl;
+ if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
+ include_once XOOPS_ROOT_PATH."/class/template.php";
+ $xoopsTpl = new XoopsTpl();
+ }
+
+ // clear cache files
+ $xoopsTpl->clear_cache(null, 'mod_'.$this->getVar('dirname'));
+
+ // delete template file entry in db
+ $dcount = count($deltpl);
+ for ($i = 0; $i < $dcount; $i++) {
+ $existing_templates[] = $deltpl[$i];
+ if (!$tplfile_handler->delete($deltpl[$i])) {
+ $delng[] = $deltpl[$i]->getVar('tpl_file');
+ }
+ }
+ }
+
+ // Insert new templates
+ $templates = $this->getInfo('templates');
+ if ($templates != false) {
+ global $xoopsConfig;
+ $this->setMessage('Updating templates...');
+ foreach ($templates as $tpl) {
+ $tpl['file'] = trim($tpl['file']);
+ if (!in_array($tpl['file'], $delng)) {
+ $new_templates[] = $tpl['file'];
+ $tpldata =& $this->gettemplate($tpl['file']);
+ $tplfile =& $tplfile_handler->create();
+ $tplfile->setVar('tpl_refid', $this->getVar('mid'));
+ $tplfile->setVar('tpl_lastimported', 0);
+ $tplfile->setVar('tpl_lastmodified', time());
+ if (preg_match("/\.css$/i", $tpl['file'])) {
+ $tplfile->setVar('tpl_type', 'css');
+ } else {
+ $tplfile->setVar('tpl_type', 'module');
+ }
+ $tplfile->setVar('tpl_source', $tpldata, true);
+ $tplfile->setVar('tpl_module', $this->getVar('dirname'));
+ $tplfile->setVar('tpl_tplset', 'default');
+ $tplfile->setVar('tpl_file', $tpl['file'], true);
+ $tplfile->setVar('tpl_desc', $tpl['description'], true);
+ if (!$tplfile_handler->insert($tplfile)) {
+ $this->setMessage(' <span style="color:#ff0000;">ERROR: Could not insert template <b>'.$tpl['file'].'</b> to the database.</span>');
+ } else {
+ $newid = $tplfile->getVar('tpl_id');
+ $this->setMessage(' Template <b>'.$tpl['file'].'</b> inserted to the database.');
+ if (isset($xoopsConfig) && isset($xoopsConfig['template_set']) && $xoopsConfig['template_set'] == 'default') {
+ if (!xoops_template_touch($tplfile)) {
+ $this->setMessage(' <span style="color:#ff0000;">ERROR: Could not recompile template <b>'.$tpl['file'].'</b>.</span>');
+ } else {
+ $this->setMessage(' Template <b>'.$tpl['file'].'</b> recompiled.</span>');
+ }
+ }
+ }
+ unset($tpldata);
+ } else {
+ $this->setMessage(' <span style="color:#ff0000;">ERROR: Could not delete old template <b>'.$tpl['file'].'</b>. Aborting update of this file.</span>');
+ }
+ }
+ //delete templates that are removed from the module
+ foreach (array_keys($existing_templates) as $i) {
+ if (!in_array($existing_templates[$i]->getVar('tpl_file'), $new_templates)) {
+ if ($tplfile_handler->delete($existing_templates[$i])) {
+ $this->setMessage(' Template <b>'.$existing_templates[$i]->getVar('tpl_file').'</b> no longer used and removed');
+ }
+ else{
+ $this->setMessage(' <span style="color:#ff0000;">ERROR: Could not delete removed template <b>'.$existing_templates[$i]->getVar('tpl_file').'</b></span>');
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Return the contents of a template file
+ *
+ * @param string $template name of template file
+ * @param bool $block whether the template is a block template - defaults to false = module template
+ *
+ * @return string
+ */
+ function gettemplate($template, $block = false) {
+ global $xoopsConfig;
+ if ($block) {
+ $path = XOOPS_ROOT_PATH.'/modules/'.$this->getVar('dirname').'/templates/blocks/'.$template;
+ } else {
+ $path = XOOPS_ROOT_PATH.'/modules/'.$this->getVar('dirname').'/templates/'.$template;
+ }
+ if (!file_exists($path)) {
+ return false;
+ } else {
+ $lines = file($path);
+ }
+ if (!$lines) {
+ return false;
+ }
+ $ret = '';
+ $count = count($lines);
+ for ($i = 0; $i < $count; $i++) {
+ $ret .= str_replace("\n", "\r\n", str_replace("\r\n", "\n", $lines[$i]));
+ }
+ return $ret;
+ }
+
+ /**
+ * Insert blocks from module into the database
+ *
+ * @return void
+ */
+ function insertBlocks() {
+ global $xoopsConfig, $xoopsUser;
+ $block_handler =& xoops_gethandler('block');
+ $blocks = $this->getInfo('blocks');
+ $this->setMessage('Building blocks...');
+ if ($blocks != false) {
+ $count = count($blocks);
+ $showfuncs = array();
+ $funcfiles = array();
+ foreach (array_keys($blocks) as $i ) {
+ if (isset($blocks[$i]['show_func']) && $blocks[$i]['show_func'] != '' && isset($blocks[$i]['file']) && $blocks[$i]['file'] != '') {
+ $editfunc = isset($blocks[$i]['edit_func']) ? $blocks[$i]['edit_func'] : '';
+ $showfuncs[] = $blocks[$i]['show_func'];
+ $funcfiles[] = $blocks[$i]['file'];
+ $template = '';
+ if ((isset($blocks[$i]['template']) && trim($blocks[$i]['template']) != '')) {
+ $content =& $this->gettemplate($blocks[$i]['template'], true);
+ }
+ if (!isset($content) || !$content) {
+ $content = '';
+ } else {
+ $template = $blocks[$i]['template'];
+ }
+ $options = '';
+ if (!empty($blocks[$i]['options'])) {
+ $options = $blocks[$i]['options'];
+ }
+
+ $myts =& MyTextSanitizer::getInstance();
+
+ $criteria = new CriteriaCompo(new Criteria('mid', $this->getVar('mid')));
+ $criteria->add(new Criteria('show_func', $myts->addSlashes($blocks[$i]['show_func'])));
+ $criteria->add(new Criteria('func_file', $myts->addSlashes($blocks[$i]['file'])));
+ if ((isset($blocks[$i]['template']) && trim($blocks[$i]['template']) != '')) {
+ $criteria->add(new Criteria('template', $myts->addSlashes($blocks[$i]['template'])));
+ }
+ $block = $block_handler->getObjects($criteria);
+ if (isset($block[0])) {
+ $block = $block[0];
+ $this->setMessage("Updating existing block");
+ }
+ else {
+ $this->setMessage("Creating new block");
+ $block =& $block_handler->create();
+ $block->setVar('mid', $this->getVar('mid'));
+ $block->setVar('dirname', $this->getVar('dirname'));
+ $block->setVar('show_func', $blocks[$i]['show_func'], true);
+ $block->setVar('func_file', $blocks[$i]['file'], true);
+ $block->setVar('isactive', 1);
+ }
+
+ $block->setVar('name', $blocks[$i]['name'], true);
+ $block->setVar('edit_func', $editfunc, true);
+ $block->setVar('options', explode('|', $options), true);
+ $block->setVar('template', $template, true);
+ $block->setVar('last_modified', time());
+
+ if (!$block_handler->insert($block)) {
+ $this->setMessage(' ERROR: Could not insert '.$blocks[$i]['name']);
+ } else {
+ $this->setMessage(' Block <b>'.$blocks[$i]['name'].'</b> inserted. Block ID: <b>'.$block->getVar('bid').'</b>');
+ if ($template != '') {
+ //Update or insert template
+ $tplfile_handler =& xoops_gethandler('tplfile');
+ $tplfile =& $tplfile_handler->find('default', 'block', $block->getVar('bid'));
+ if (count($tplfile) == 0) {
+ $tplfile_new =& $tplfile_handler->create();
+ $tplfile_new->setVar('tpl_module', $this->getVar('dirname'));
+ $tplfile_new->setVar('tpl_refid', $block->getVar('bid'));
+ $tplfile_new->setVar('tpl_tplset', 'default');
+ $tplfile_new->setVar('tpl_file', $template, true);
+ $tplfile_new->setVar('tpl_type', 'block');
+ }
+ else {
+ $tplfile_new = $tplfile[0];
+ }
+ $tplfile_new->setVar('tpl_source', $content, true);
+ $tplfile_new->setVar('tpl_desc', $blocks[$i]['description'], true);
+ $tplfile_new->setVar('tpl_lastmodified', time());
+ $tplfile_new->setVar('tpl_lastimported', 0);
+ if (!$tplfile_handler->insert($tplfile_new)) {
+ $this->setMessage(' <span style="color:#ff0000;">ERROR: Could not insert template <b>'.$blocks[$i]['template'].'</b>.</span>');
+ } else {
+ $this->setMessage(' Template <b>'.$blocks[$i]['template'].'</b> inserted.');
+ if (isset($xoopsConfig['template_set']) && $xoopsConfig['template_set'] == 'default') {
+ if (!xoops_template_touch($tplfile_new)) {
+ $this->setMessage(' <span style="color:#ff0000;">ERROR: Could not compile template <b>'.$blocks[$i]['template'].'</b>.</span>');
+ } else {
+ $this->setMessage(' Template <b>'.$blocks[$i]['template'].'</b> compiled.');
+ }
+ }
+
+ }
+ }
+ }
+ $blockids[] = $block->getVar('bid');
+ }
+ }
+ }
+ $block_arr = $block_handler->getByModule($this->getVar('mid'));
+ if (count($block_arr) > 0) {
+ foreach ($block_arr as $block) {
+ if (!in_array($block->getVar('bid'), $blockids) ) {
+ if (!$block_handler->delete($block)) {
+ $this->setMessage(' <span style="color:#ff0000;">ERROR: Could not delete block <b>'.$block->getVar('name').'</b>. Block ID: <b>'.$block->getVar('bid').'</b><br />'.implode('<br />', $block->getErrors()).'</span>');
+ } else {
+ $this->setMessage(' Block <b>'.$block->getVar('name').' deleted. Block ID: <b>'.$block->getVar('bid').'</b>');
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Insert configuration categories
+ *
+ * @return void
+ */
+ function insertConfigCategories() {
+ //If configuration items exist
+ if ($this->getVar('hascomments') != 0 || $this->getVar('hasnotification') != 0 || $this->getInfo('config') != false) {
+ $configcat_handler =& xoops_gethandler('configcategory');
+ $oldcats =& $configcat_handler->getCatByModule($this->getVar('mid'));
+
+ $cats = $this->getInfo('configcat');
+
+ if ($cats != false && count($cats) > 0) {
+ foreach (array_keys($cats) as $i) {
+ $newcats[$cats[$i]['nameid']] = $cats[$i];
+ $newcats[$cats[$i]['nameid']]['order'] = $i;
+ }
+ }
+ if ($this->getVar('hascomments') != 0 || $this->getVar('hasnotification') != 0 || $cats == false) {
+ //make default category - should only be if there are config items without category
+ //it is assumed that if people use configuration categories, they will use configuration categories for ALL items
+ $newcats["xoops_default"] = array('nameid' => 'xoops_default',
+ 'name' => '_MD_AM_MODULEPREF',
+ 'description' => '',
+ 'order' => 0);
+ }
+
+ $old_nameids = array();
+ $configcatcount = count($oldcats);
+ $configcat_delng = array();
+ if ($configcatcount > 0) {
+ $this->setMessage('Updating module config category data...');
+ foreach (array_keys($oldcats) as $i) {
+ $nameid = $oldcats[$i]->getVar('confcat_nameid');
+ if (!in_array($nameid, array_keys($newcats))) {
+ if (!$configcat_handler->delete($oldcats[$i])) {
+ $this->setMessage(' <span style="color:#ff0000;">ERROR: Could not delete config category data from the database. Config category ID: <b>'.$oldcats[$i]->getvar('confcat_id').'</b></span>');
+ } else {
+ $this->setMessage(' Config category data deleted from the database. Config category ID: <b>'.$oldcats[$i]->getVar('confcat_id').'</b>');
+ }
+ }
+ else {
+ if ($newcats[$nameid]['name'] != $oldcats[$i]->getVar('confcat_name') || $newcats[$nameid]['description'] != $oldcats[$i]->getVar('confcat_description') || $newcats[$nameid]['order'] != $oldcats[$i]->getVar('confcat_order')) {
+ $oldid = $oldcats[$i]->getVar('confcat_id');
+ $oldcats[$i]->setVar('confcat_name', $newcats[$nameid]['name']);
+ $oldcats[$i]->setVar('confcat_order', $newcats[$nameid]['order']);
+ $oldcats[$i]->setVar('confcat_description', $newcats[$nameid]['description']);
+ if (!$configcat_handler->insert($oldcats[$i])) {
+ $this->setMessage(' <span style="color:#ff0000;">ERROR: Could not update config category data. Config category ID: <b>'.$oldcats[$i]->getvar('confcat_id').'</b></span>');
+ } else {
+ //update category ID
+ $catcriteria = new CriteriaCompo(new Criteria('confcat_id', $oldid));
+ $catcriteria->add(new Criteria('confcat_modid', $this->getVar('mid')));
+ if ($configcat_handler->updateAll('confcat_id', $newcats[$nameid]['order'], $catcriteria)) {
+ $this->setMessage(' Config category data updated. Config category ID: <b>'.$oldcats[$i]->getVar('confcat_id').'</b>');
+ }
+ else {
+ $this->setMessage(' <span style="color:#ff0000;">ERROR: Could not update config category ID. Config Category: <b>'.$nameid.'</b></span>');
+ }
+ }
+ }
+ }
+ $old_nameids[] = $nameid;
+ }
+ }
+ else {
+
+ }
+ // now insert the new ones
+ if ($newcats != false) {
+ $this->setMessage('Adding module config category data...');
+ foreach ($newcats as $nameid => $configcat) {
+ // only insert ones that do not exist
+ if (!in_array($nameid, $old_nameids)) {
+ $confcatobj =& $configcat_handler->create();
+ $confcatobj->setVar('confcat_id', $configcat['order']); //set order as ID, so it can be used with a getConfigsByCat() call
+ $confcatobj->setVar('confcat_modid', $this->getVar('mid'));
+ $confcatobj->setVar('confcat_name', $configcat['name']);
+ $confcatobj->setVar('confcat_nameid', $configcat['nameid']);
+ $confcatobj->setVar('confcat_description', $configcat['description']);
+ $confcatobj->setVar('confcat_order', $configcat['order']);
+ $confcatop_msgs = '';
+ if (false != $configcat_handler->insert($confcatobj)) {
+ $this->setMessage(' Config category <b>'.$configcat['nameid'].'</b> added to the database.');
+ } else {
+ $this->setMessage(' <span style="color:#ff0000;">ERROR: Could not insert config category <b>'.$configcat['nameid'].'</b> to the database.</span>');
+ }
+ unset($confcatobj);
+ }
+ }
+ unset($newcats);
+ }
+ }
+ }
+
+ /**
+ * Insert configuration items
+ *
+ * @return void
+ */
+ function insertConfig() {
+ $configs = $this->getInfo('config');
+ if ($configs == false) {
+ $configs = array();
+ }
+ if ($this->getVar('hascomments') != 0) {
+ include_once(XOOPS_ROOT_PATH.'/include/comment_constants.php');
+ array_push($configs, array('name' => 'com_rule',
+ 'title' => '_CM_COMRULES',
+ 'description' => '', 'formtype' =>
+ 'select', 'valuetype' => 'int',
+ 'default' => 1,
+ 'options' => array('_CM_COMNOCOM' => XOOPS_COMMENT_APPROVENONE,
+ '_CM_COMAPPROVEALL' => XOOPS_COMMENT_APPROVEALL,
+ '_CM_COMAPPROVEUSER' => XOOPS_COMMENT_APPROVEUSER,
+ '_CM_COMAPPROVEADMIN' => XOOPS_COMMENT_APPROVEADMIN)));
+ array_push($configs, array('name' => 'com_anonpost',
+ 'title' => '_CM_COMANONPOST',
+ 'description' => '',
+ 'formtype' => 'yesno',
+ 'valuetype' => 'int',
+ 'default' => 0));
+ }
+ // RMV-NOTIFY
+ if ($this->getVar('hasnotification') != 0) {
+ if (empty($configs)) {
+ $configs = array();
+ }
+ // Main notification options
+ include_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
+ include_once XOOPS_ROOT_PATH . '/include/notification_functions.php';
+ $options = array();
+ $options['_NOT_CONFIG_DISABLE'] = XOOPS_NOTIFICATION_DISABLE;
+ $options['_NOT_CONFIG_ENABLEBLOCK'] = XOOPS_NOTIFICATION_ENABLEBLOCK;
+ $options['_NOT_CONFIG_ENABLEINLINE'] = XOOPS_NOTIFICATION_ENABLEINLINE;
+ $options['_NOT_CONFIG_ENABLEBOTH'] = XOOPS_NOTIFICATION_ENABLEBOTH;
+
+ $configs[] = array ('name' => 'notification_enabled', 'title' => '_NOT_CONFIG_ENABLE', 'description' => '_NOT_CONFIG_ENABLEDSC', 'formtype' => 'select', 'valuetype' => 'int', 'default' => XOOPS_NOTIFICATION_ENABLEBOTH, 'options' => $options);
+ // Event-specific notification options
+ // FIXME: doesn't work when update module... can't read back the array of options properly... " changing to "
+ $options = array();
+ $categories = notificationCategoryInfo('',$this->getVar('mid'));
+ foreach ($categories as $category) {
+ $events = notificationEvents ($category['name'], false, $this->getVar('mid'));
+ foreach ($events as $event) {
+ if (!empty($event['invisible'])) {
+ continue;
+ }
+ $option_name = $category['title'] . ' : ' . $event['title'];
+ $option_value = $category['name'] . '-' . $event['name'];
+ $options[$option_name] = $option_value;
+ }
+ }
+ $configs[] = array ('name' => 'notification_events',
+ 'title' => '_NOT_CONFIG_EVENTS',
+ 'description' => '_NOT_CONFIG_EVENTSDSC',
+ 'formtype' => 'select_multi',
+ 'valuetype' => 'array',
+ 'default' => array_values($options),
+ 'options' => $options);
+ }
+
+ if ($configs != false) {
+ $confcat_handler =& xoops_gethandler('configcategory');
+ /* @var $confcat_handler XoopsConfigCategoryHandler */
+
+ $confcats = $confcat_handler->getCatByModule($this->getVar('mid'));
+ if (count($confcats) > 0) {
+ foreach (array_keys($confcats) as $i) {
+ //get categories by confcat_nameid
+ $cats[$confcats[$i]->getVar('confcat_nameid')] = $confcats[$i]->getVar('confcat_id');
+ }
+ }
+ $this->setMessage('Adding module config data...');
+ $config_handler =& xoops_gethandler('config');
+ $configcriteria = new Criteria('conf_modid', $this->getVar('mid'));
+ $old_configs =& $config_handler->getConfigs($configcriteria, false, true);
+ unset($configcriteria);
+
+ foreach ($configs as $config) {
+ $configs_name[] = $config["name"];
+ }
+
+ foreach (array_keys($old_configs) as $i) {
+ if(!in_array($old_configs[$i]->getVar('conf_name'), $configs_name)){
+ $config_handler->deleteConfig($old_configs[$i]);
+ continue;
+ }
+ $conf_arr[$old_configs[$i]->getVar('conf_name')] =& $old_configs[$i];
+ }
+
+ $order = 0;
+ foreach ($configs as $config) {
+ if (isset($conf_arr[$config['name']])) {
+ $confobj =& $conf_arr[$config['name']];
+ }
+ else {
+ $confobj =& $config_handler->createConfig();
+ }
+ $confcat_nameid = isset($config['category']) ? $config['category'] : 'xoops_default';
+ $confobj->setVar('conf_modid', $this->getVar('mid'));
+ $confobj->setVar('conf_catid', $cats[$confcat_nameid]);
+ $confobj->setVar('conf_name', $config['name']);
+ $confobj->setVar('conf_title', $config['title'], true);
+ $confobj->setVar('conf_desc', $config['description'], true);
+ $confobj->setVar('conf_formtype', $config['formtype']);
+ $confobj->setVar('conf_valuetype', $config['valuetype']);
+ //$confobj->setVar('conf_value', $config['default'], true);
+ $confobj->setVar('conf_order', $order);
+ if ($confobj->isNew()) {
+ // Only set configuration value to default on new configs
+ $confobj->setConfValueForInput($config['default'], true);
+ }
+ $confop_msgs = '';
+ if (!isset($config['options']) || !is_array($config['options'])) {
+ $config['options'] = array();
+ }
+ $options =& $confobj->getConfOptions();
+ if (count($options) > 0) {
+ foreach (array_keys($options) as $i) {
+ $existing_options[$options[$i]->getVar('confop_name')] = $options[$i]->getVar('confop_value');
+ }
+ $newoptions = xoops_array_diff_assoc($config['options'], $existing_options);
+ $removedoptions = xoops_array_diff_assoc($existing_options, $config['options']);
+ unset($existing_options);
+ }
+ else {
+ $newoptions = $config['options'];
+ $removedoptions = array();
+ }
+ //clear config options from config items
+ $confobj->clearConfOptions();
+ if (count($newoptions) > 0) {
+ foreach ($newoptions as $key => $value) {
+ $confop =& $config_handler->createConfigOption();
+ $confop->setVar('confop_name', $key, true);
+ $confop->setVar('confop_value', $value, true);
+ $confobj->setConfOptions($confop);
+ $confop_msgs .= '<br /> Config option added. Name: <b>'.$key.'</b> Value: <b>'.$value.'</b>';
+ unset($confop);
+ }
+ }
+ if (count($removedoptions) > 0) {
+ foreach ($removedoptions as $key => $value) {
+ $deletecriteria = new CriteriaCompo(new Criteria('confop_name', $key));
+ $deletecriteria->add(new Criteria('confop_value', $value));
+ $deletecriteria->add(new Criteria('conf_id', $confobj->getVar('conf_id')));
+ $config_handler->deleteConfigOption($deletecriteria);
+ unset($deletecriteria);
+ $confop_msgs .= '<br /> Config option removed. Name: <b>'.$key.'</b> Value: <b>'.$value.'</b>';
+ }
+ }
+ $order++;
+ if ($config_handler->insertConfig($confobj) != false) {
+ $this->setMessage(' Config <b>'.$config['name'].'</b> added to the database.'.$confop_msgs);
+ } else {
+ $this->setMessage(' <span style="color:#ff0000;">ERROR: Could not insert config <b>'.$config['name'].'</b> to the database.</span>');
+ }
+ unset($confobj);
+ }
+ unset($configs);
+ }
+ }
+
+ /**
+ * Insert or update profile fields
+ *
+ * @return void
+ */
+ function insertProfileFields() {
+ // Add profile fields
+ if ($this->getInfo('hasProfile') != 0) {
+ $this->setMessage('Adding user profile fields...');
+ $profile_handler =& xoops_gethandler('profile');
+ $profile_info = $this->getInfo('profile');
+ $fields = isset($profile_info['field']) ? $profile_info['field'] : array();
+
+ $existing_fields = $profile_handler->loadFields();
+ $existing_fields_arr = array();
+ if (count($existing_fields) > 0) {
+ foreach (array_keys($existing_fields) as $i) {
+ if ($existing_fields[$i]->getVar('field_moduleid') == $this->getVar('mid')) {
+ $existing_fields_arr[$existing_fields[$i]->getVar('field_name')] = $existing_fields[$i];
+ }
+ }
+ }
+
+ $fieldnames = array();
+ if (count($fields) > 0) {
+ foreach (array_keys($fields) as $i) {
+ if (!isset($fields[$i]['name']) || !isset($fields[$i]['valuetype'])) {
+ $this->setMessage(' <span style="color:#ff0000;">ERROR: Malformed profile field <b>Name or Valuetype unspecified #'.$i.'</b></span>');
+ continue;
+ }
+ $fieldnames[] = $fields[$i]['name'];
+ // Only add new fields - don't overwrite existing to avoid overwriting customisations
+ if (!in_array($fields[$i]['name'], array_keys($existing_fields_arr))) {
+ $this->setMessage($profile_handler->saveField($fields[$i], $this->getVar('mid'), $i));
+ }
+ else {
+ $this->setMessage(' NOTICE: <b>'.$fields[$i]['name'].' exists - skipped</b>');
+ }
+ }
+ }
+
+// if (count($existing_fields) > 0) {
+// $removed_fields = array_diff(array_keys($existing_fields_arr), $fieldnames);
+// if (count($removed_fields) > 0) {
+// foreach ($removed_fields as $fieldname) {
+// if ($profile_handler->deleteField($existing_fields_arr[$fieldname])) {
+// $this->setMessage(' Field <b>'.$existing_fields_arr[$fieldname]->getVar('field_name').'</b> removed from the database');
+// }
+// else {
+// $this->setMessage(' <span style="color:#ff0000;">ERROR: Could not remove field <b>'.$existing_fields_arr[$fieldname]->getVar('field_name').'</b> from the database. '.implode(' ', $existing_fields_arr[$fieldname]->getErrors()).'</span>');
+// }
+// }
+// }
+// }
+
+ unset($profile_handler);
+ unset($profile_info);
+ unset($fields);
+ unset($fieldnames);
+ unset($existing_fields);
+ unset($existing_fields_arr);
+ }
+ else {
+ echo "No Profile fields found";
+ }
+ }
+
+ /**
+ * Execute module script
+ *
+ * @param string $type Type of script to run - onUpdate, onInstall or onUninstall
+ * @param int $state 1 = pre-process script, 2 = post-process script
+ *
+ * @return bool
+ */
+ function executeScript($type, $state = 2) {
+ $state = $state == 1 ? "pre_" : "";
+ // execute module specific script if any
+ $script = $this->getInfo($type);
+ if (false != $script && trim($script) != '') {
+ switch ($type) {
+ case "onInstall":
+ $functype = "install";
+ break;
+
+ default:
+ case "onUpdate":
+ $functype = "update";
+ break;
+
+ case "onUninstall":
+ $functype = "uninstall";
+ break;
+ }
+
+ include_once XOOPS_ROOT_PATH.'/modules/'.$this->getVar('dirname').'/'.trim($script);
+ if (function_exists('xoops_module_'.$state.$functype.'_'.$this->getVar('dirname'))) {
+ $func = 'xoops_module_'.$state.$functype.'_'.$this->getVar('dirname');
+ if (!$func($this, $this->getVar('version'))) { //need to send version number to onUpdate function
+ $this->setMessage('Failed to execute '.$func.'<br />'.implode('<br />', $this->getErrors()));
+ return false;
+ } else {
+ $this->setMessage('<b>'.$func.'</b> executed successfully.');
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * @param array $groups array of group ids to add permission to
+ * @param string $type either "admin" or "access" for which permission to grant
+ *
+ * @return bool
+ */
+ function insertGroupPermissions($groups, $type) {
+ if (count($groups) > 0) {
+ $ret = true;
+ $gperm_name = $type == "admin" ? "module_admin" : "module_read";
+ $groupperm_handler =& xoops_gethandler('groupperm');
+ foreach ($groups as $groupid) {
+ if (!$groupperm_handler->addRight($gperm_name, $this->getVar('mid'), $groupid)) {
+ $ret = false;
+ }
+ }
+ return $ret;
+ }
+ return false;
+ }
+}
+
+
+/**
+ * XOOPS module handler class.
+ *
+ * This class is responsible for providing data access mechanisms to the data source
+ * of XOOPS module class objects.
+ *
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright (c) 2000-2003 The Xoops Project - www.xoops.org
+ */
+class XoopsModuleHandler extends XoopsPersistableObjectHandler
+{
+ /**
+ * holds an array of cached module references, indexed by module id
+ *
+ * @var array
+ * @access private
+ */
+ var $_cachedModule_mid = array();
+
+ /**
+ * holds an array of cached module references, indexed by module dirname
+ *
+ * @var array
+ * @access private
+ */
+ var $_cachedModule_dirname = array();
+
+ function XoopsModuleHandler(&$db) {
+ $this->XoopsPersistableObjectHandler($db, 'modules', 'XoopsModule', 'mid', 'name');
+ }
+
+ /**
+ * Load a module from the database
+ *
+ * @param int $id ID of the module
+ *
+ * @return object FALSE on fail
+ */
+ function &get($id)
+ {
+ static $_cachedModule_dirname;
+ static $_cachedModule_mid;
+ $id = intval($id);
+ if ($id > 0) {
+ if (!empty($_cachedModule_mid[$id])) {
+ return $_cachedModule_mid[$id];
+ } else {
+ $sql = 'SELECT * FROM '.$this->db->prefix('modules').' WHERE mid = '.$id;
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ $numrows = $this->db->getRowsNum($result);
+ if ($numrows == 1) {
+ $module = new XoopsModule();
+ $myrow = $this->db->fetchArray($result);
+ $module->assignVars($myrow);
+ $_cachedModule_mid[$id] =& $module;
+ $_cachedModule_dirname[$module->getVar('dirname')] =& $module;
+ return $module;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Load a module by its dirname
+ *
+ * @param string $dirname
+ *
+ * @return object FALSE on fail
+ */
+ function &getByDirname($dirname)
+ {
+ static $_cachedModule_mid;
+ static $_cachedModule_dirname;
+ if (!empty($_cachedModule_dirname[$dirname])) {
+ return $_cachedModule_dirname[$dirname];
+ } else {
+ $sql = "SELECT * FROM ".$this->db->prefix('modules')." WHERE dirname = '".trim($dirname)."'";
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ $numrows = $this->db->getRowsNum($result);
+ if ($numrows == 1) {
+ $module =& new XoopsModule();
+ $myrow = $this->db->fetchArray($result);
+ $module->assignVars($myrow);
+ $_cachedModule_dirname[$dirname] =& $module;
+ $_cachedModule_mid[$module->getVar('mid')] =& $module;
+ return $module;
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Write a module to the database
+ *
+ * @param object &$module reference to a {@link XoopsModule}
+ * @return bool
+ **/
+ function insert(&$module)
+ {
+ if (!parent::insert($module)) {
+ return false;
+ }
+ if (!empty($this->_cachedModule_dirname[$module->getVar('dirname')])) {
+ unset ($this->_cachedModule_dirname[$module->getVar('dirname')]);
+ }
+ if (!empty($this->_cachedModule_mid[$module->getVar('mid')])) {
+ unset ($this->_cachedModule_mid[$module->getVar('mid')]);
+ }
+ return true;
+ }
+
+ /**
+ * Delete a module from the database
+ *
+ * @param object &$module
+ * @return bool
+ **/
+ function delete(&$module)
+ {
+ if (strtolower(get_class($module)) != 'xoopsmodule') {
+ return false;
+ }
+ $sql = sprintf("DELETE FROM %s WHERE mid = %u", $this->db->prefix('modules'), $module->getVar('mid'));
+ if ( !$result = $this->db->query($sql) ) {
+ return false;
+ }
+ // delete admin permissions assigned for this module
+ $sql = sprintf("DELETE FROM %s WHERE gperm_name = 'module_admin' AND gperm_itemid = %u", $this->db->prefix('group_permission'), $module->getVar('mid'));
+ $this->db->query($sql);
+ // delete read permissions assigned for this module
+ $sql = sprintf("DELETE FROM %s WHERE gperm_name = 'module_read' AND gperm_itemid = %u", $this->db->prefix('group_permission'), $module->getVar('mid'));
+ $this->db->query($sql);
+
+ $sql = sprintf("SELECT block_id FROM %s WHERE module_id = %u", $this->db->prefix('block_module_link'), $module->getVar('mid'));
+ if ($result = $this->db->query($sql)) {
+ $block_id_arr = array();
+ while ($myrow = $this->db->fetchArray($result))
+ {
+ array_push($block_id_arr, $myrow['block_id']);
+ }
+ }
+ // loop through block_id_arr
+ if (isset($block_id_arr)) {
+ foreach ($block_id_arr as $i) {
+ $sql = sprintf("SELECT block_id FROM %s WHERE module_id != %u AND block_id = %u", $this->db->prefix('block_module_link'), $module->getVar('mid'), $i);
+ if ($result2 = $this->db->query($sql)) {
+ if (0 < $this->db->getRowsNum($result2)) {
+ // this block has other entries, so delete the entry for this module
+ $sql = sprintf("DELETE FROM %s WHERE (module_id = %u) AND (block_id = %u)", $this->db->prefix('block_module_link'), $module->getVar('mid'), $i);
+ $this->db->query($sql);
+ } else {
+ // this block doesnt have other entries, so disable the block and let it show on top page only. otherwise, this block will not display anymore on block admin page!
+ $sql = sprintf("UPDATE %s SET visible = 0 WHERE bid = %u", $this->db->prefix('newblocks'), $i);
+ $this->db->query($sql);
+ $sql = sprintf("UPDATE %s SET module_id = -1 WHERE module_id = %u", $this->db->prefix('block_module_link'), $module->getVar('mid'));
+ $this->db->query($sql);
+ }
+ }
+ }
+ }
+
+ if (!empty($this->_cachedModule_dirname[$module->getVar('dirname')])) {
+ unset ($this->_cachedModule_dirname[$module->getVar('dirname')]);
+ }
+ if (!empty($this->_cachedModule_mid[$module->getVar('mid')])) {
+ unset ($this->_cachedModule_mid[$module->getVar('mid')]);
+ }
+ return true;
+ }
+
+ /**
+ * returns an array of module names
+ *
+ * @param bool $criteria
+ * @param boolean $dirname_as_key
+ * if true, array keys will be module directory names
+ * if false, array keys will be module id
+ * @return array
+ **/
+ function getList($criteria = null, $dirname_as_key = false)
+ {
+ $ret = array();
+ $modules = $this->getObjects($criteria, true);
+ foreach (array_keys($modules) as $i) {
+ if (!$dirname_as_key) {
+ $ret[$i] =& $modules[$i]->getVar('name');
+ } else {
+ $ret[$modules[$i]->getVar('dirname')] =& $modules[$i]->getVar('name');
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * loads the {@link XoopsModule} object from requested url
+ *
+ * @return object
+ */
+ function loadModule() {
+ $url_arr = explode('/',strstr($_SERVER['REQUEST_URI'],'/modules/'));
+ if (isset($url_arr[2])) {
+ $xoopsModule =& $this->getByDirname($url_arr[2]);
+ }
+ else {
+ $xoopsModule =& $this->getByDirname('system');
+ }
+ unset($url_arr);
+ return $xoopsModule;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/module.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/notification.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/notification.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/notification.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,616 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+// RMV-NOTIFY
+include_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
+include_once XOOPS_ROOT_PATH . '/include/notification_functions.php';
+
+/**
+ *
+ *
+ * @package kernel
+ * @subpackage notification
+ *
+ * @author Michael van Dam <mvandam at caltech.edu>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * A Notification
+ *
+ * @package kernel
+ * @subpackage notification
+ *
+ * @author Michael van Dam <mvandam at caltech.edu>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsNotification extends XoopsObject
+{
+
+ /**
+ * Constructor
+ **/
+ function XoopsNotification()
+ {
+ $this->XoopsObject();
+ $this->initVar('not_id', XOBJ_DTYPE_INT, NULL, false);
+ $this->initVar('not_modid', XOBJ_DTYPE_INT, NULL, false);
+ $this->initVar('not_category', XOBJ_DTYPE_TXTBOX, null, false, 30);
+ $this->initVar('not_itemid', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('not_event', XOBJ_DTYPE_TXTBOX, null, false, 30);
+ $this->initVar('not_uid', XOBJ_DTYPE_INT, 0, true);
+ $this->initVar('not_mode', XOBJ_DTYPE_INT, 0, false);
+ }
+
+// FIXME:???
+// To send email to multiple users simultaneously, we would need to move
+// the notify functionality to the handler class. BUT, some of the tags
+// are user-dependent, so every email msg will be unique. (Unless maybe use
+// smarty for email templates in the future.) Also we would have to keep
+// track if each user wanted email or PM.
+
+ /**
+ * Send a notification message to the user
+ *
+ * @param string $template_dir Template directory
+ * @param string $template Template name
+ * @param string $subject Subject line for notification message
+ * @param array $tags Array of substitutions for template variables
+ *
+ * @return bool true if success, false if error
+ **/
+ function notifyUser($template_dir, $template, $subject, $tags)
+ {
+ // Check the user's notification preference.
+
+ $member_handler =& xoops_gethandler('member');
+ $user =& $member_handler->getUser($this->getVar('not_uid'));
+ if (!is_object($user)) {
+ return true;
+ }
+ $method = $user->getVar('notify_method');
+
+ $xoopsMailer =& getMailer();
+ include_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
+ switch($method) {
+ case XOOPS_NOTIFICATION_METHOD_PM:
+ $xoopsMailer->usePM();
+ $config_handler =& xoops_gethandler('config');
+ $xoopsMailerConfig =& $config_handler->getConfigsByCat(XOOPS_CONF_MAILER);
+ $xoopsMailer->setFromUser($member_handler->getUser($xoopsMailerConfig['fromuid']));
+ foreach ($tags as $k=>$v) {
+ $xoopsMailer->assign($k, $v);
+ }
+ break;
+ case XOOPS_NOTIFICATION_METHOD_EMAIL:
+ $xoopsMailer->useMail();
+ foreach ($tags as $k=>$v) {
+ $xoopsMailer->assign($k, preg_replace("/&/i", '&', $v));
+ }
+ break;
+ default:
+ return true; // report error in user's profile??
+ break;
+ }
+
+ // Set up the mailer
+ $xoopsMailer->setTemplateDir($template_dir);
+ $xoopsMailer->setTemplate($template);
+ $xoopsMailer->setToUsers($user);
+ //global $xoopsConfig;
+ //$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
+ //$xoopsMailer->setFromName($xoopsConfig['sitename']);
+ $xoopsMailer->setSubject($subject);
+ $success = $xoopsMailer->send();
+
+ // If send-once-then-delete, delete notification
+ // If send-once-then-wait, disable notification
+
+ include_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
+ $notification_handler =& xoops_gethandler('notification');
+
+ if ($this->getVar('not_mode') == XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE) {
+ $notification_handler->delete($this);
+ return $success;
+ }
+
+ if ($this->getVar('not_mode') == XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT) {
+ $this->setVar('not_mode', XOOPS_NOTIFICATION_MODE_WAITFORLOGIN);
+ $notification_handler->insert($this);
+ }
+ return $success;
+
+ }
+
+}
+
+/**
+ * XOOPS notification handler class.
+ *
+ * This class is responsible for providing data access mechanisms to the data source
+ * of XOOPS notification class objects.
+ *
+ *
+ * @package kernel
+ * @subpackage notification
+ *
+ * @author Michael van Dam <mvandam at caltech.edu>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsNotificationHandler extends XoopsPersistableObjectHandler
+{
+
+ function XoopsNotificationHandler(&$db) {
+ $this->XoopsPersistableObjectHandler($db, 'xoopsnotifications', 'XoopsNotification', 'not_id');
+ }
+
+ // TODO: rename this...
+ // Also, should we have get by module, get by category, etc...??
+
+ function &getNotification ($module_id, $category, $item_id, $event, $user_id)
+ {
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('not_modid', intval($module_id)));
+ $criteria->add(new Criteria('not_category', $category));
+ $criteria->add(new Criteria('not_itemid', intval($item_id)));
+ $criteria->add(new Criteria('not_event', $event));
+ $criteria->add(new Criteria('not_uid', intval($user_id)));
+ $objects = $this->getObjects($criteria);
+ if (count($objects) == 1) {
+ return $objects[0];
+ }
+ return false;
+ }
+
+ /**
+ * Determine if a user is subscribed to a particular event in
+ * a particular module.
+ *
+ * @param string $category Category of notification event
+ * @param int $item_id Item ID of notification event
+ * @param string $event Event
+ * @param int $module_id ID of module (default current module)
+ * @param int $user_id ID of user (default current user)
+ * return int 0 if not subscribe; non-zero if subscribed
+ */
+
+ function isSubscribed ($category, $item_id, $event, $module_id, $user_id)
+ {
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('not_modid', intval($module_id)));
+ $criteria->add(new Criteria('not_category', $category));
+ $criteria->add(new Criteria('not_itemid', intval($item_id)));
+ $criteria->add(new Criteria('not_event', $event));
+ $criteria->add(new Criteria('not_uid', intval($user_id)));
+ return $this->getCount($criteria);
+
+ }
+
+
+ // TODO: how about a function to subscribe a whole group of users???
+ // e.g. if we want to add all moderators to be notified of subscription
+ // of new threads...
+
+ /**
+ * Subscribe for notification for an event(s)
+ *
+ * @param string $category category of notification
+ * @param int $item_id ID of the item
+ * @param mixed $events event string or array of events
+ * @param int $mode force a particular notification mode
+ * (e.g. once_only) (default to current user preference)
+ * @param int $module_id ID of the module (default to current module)
+ * @param int $user_id ID of the user (default to current user)
+ **/
+ function subscribe ($category, $item_id, $events, $mode=null, $module_id=null, $user_id=null)
+ {
+ if (!isset($user_id)) {
+ global $xoopsUser;
+ if (empty($xoopsUser)) {
+ return false; // anonymous cannot subscribe
+ } else {
+ $user_id = $xoopsUser->getVar('uid');
+ }
+ }
+
+ if (!isset($module_id)) {
+ global $xoopsModule;
+ $module_id = $xoopsModule->getVar('mid');
+ }
+
+ if (!isset($mode)) {
+ $user = new XoopsUser($user_id);
+ $mode = $user->getVar('notify_mode');
+ }
+
+ if (!is_array($events)) $events = array($events);
+ foreach ($events as $event) {
+ if ($notification =& $this->getNotification($module_id, $category, $item_id, $event, $user_id)) {
+ if ($notification->getVar('not_mode') != $mode) {
+ $this->updateByField($notification, 'not_mode', $mode);
+ }
+ } else {
+ $notification =& $this->create();
+ $notification->setVar('not_modid', $module_id);
+ $notification->setVar('not_category', $category);
+ $notification->setVar('not_itemid', $item_id);
+ $notification->setVar('not_uid', $user_id);
+ $notification->setVar('not_event', $event);
+ $notification->setVar('not_mode', $mode);
+ $this->insert($notification);
+ }
+ }
+ }
+
+
+// TODO: this will be to provide a list of everything a particular
+// user has subscribed to... e.g. for on the 'Profile' page, similar
+// to how we see the various posts etc. that the user has made.
+// We may also want to have a function where we can specify module id
+ /**
+ * Get a list of notifications by user ID
+ *
+ * @param int $user_id ID of the user
+ *
+ * @return array Array of {@link XoopsNotification} objects
+ **/
+ function &getByUser ($user_id)
+ {
+ $criteria = new Criteria ('not_uid', $user_id);
+ return $this->getObjects($criteria, true);
+ }
+
+ // TODO: rename this??
+ /**
+ * Get a list of notification events for the current item/mod/user
+ *
+ **/
+ function &getSubscribedEvents ($category, $item_id, $module_id, $user_id)
+ {
+ $criteria = new CriteriaCompo();
+ $criteria->add (new Criteria('not_modid', $module_id));
+ $criteria->add (new Criteria('not_category', $category));
+ if ($item_id) {
+ $criteria->add (new Criteria('not_itemid', $item_id));
+ }
+ $criteria->add (new Criteria('not_uid', $user_id));
+ $results = $this->getObjects($criteria, true);
+ $ret = array();
+ foreach (array_keys($results) as $i) {
+ $ret[] = $results[$i]->getVar('not_event');
+ }
+ return $ret;
+ }
+
+// TODO: is this a useful function?? (Copied from comment_handler)
+ /**
+ * Retrieve items by their ID
+ *
+ * @param int $module_id Module ID
+ * @param int $item_id Item ID
+ * @param string $order Sort order
+ *
+ * @return array Array of {@link XoopsNotification} objects
+ **/
+ function &getByItemId($module_id, $item_id, $order = null, $status = null)
+ {
+ $criteria = new CriteriaCompo(new Criteria('com_modid', intval($module_id)));
+ $criteria->add(new Criteria('com_itemid', intval($item_id)));
+ if (isset($status)) {
+ $criteria->add(new Criteria('com_status', intval($status)));
+ }
+ if (isset($order)) {
+ $criteria->setOrder($order);
+ }
+ return $this->getObjects($criteria);
+ }
+
+
+ /**
+ * Send notifications to users
+ *
+ * @param string $category notification category
+ * @param int $item_id ID of the item
+ * @param string $event notification event
+ * @param array $extra_tags array of substitutions for template to be
+ * merged with the one from function..
+ * @param array $user_list only notify the selected users
+ * @param int $module_id ID of the module
+ * @param int $omit_user_id ID of the user to omit from notifications. (default to current user). set to 0 for all users to receive notification.
+ **/
+ // TODO:(?) - pass in an event LIST. This will help to avoid
+ // problem of sending people multiple emails for similar events.
+ // BUT, then we need an array of mail templates, etc... Unless
+ // mail templates can include logic in the future, then we can
+ // tailor the mail so it makes sense for any of the possible
+ // (or combination of) events.
+
+ function triggerEvents ($category, $item_id, $events, $extra_tags=array(), $user_list=array(), $module_id=null, $omit_user_id=null)
+ {
+ if (!is_array($events)) {
+ $events = array($events);
+ }
+ foreach ($events as $event) {
+ $this->triggerEvent($category, $item_id, $event, $extra_tags, $user_list, $module_id, $omit_user_id);
+ }
+ }
+
+ function triggerEvent ($category, $item_id, $event, $extra_tags=array(), $user_list=array(), $module_id=null, $omit_user_id=null)
+ {
+
+ if (!isset($module_id)) {
+ global $xoopsModule;
+ $module =& $xoopsModule;
+ $module_id = !empty($xoopsModule) ? $xoopsModule->getVar('mid') : 0;
+ } else {
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->get($module_id);
+ }
+
+ // Check if event is enabled
+ $config_handler =& xoops_gethandler('config');
+ $mod_config =& $config_handler->getConfigsByCat(0,$module->getVar('mid'));
+ if (empty($mod_config['notification_enabled'])) {
+ return false;
+ }
+ $category_info =& notificationCategoryInfo ($category, $module_id);
+ $event_info =& notificationEventInfo ($category, $event, $module_id);
+ if (!in_array(notificationGenerateConfig($category_info,$event_info,'option_name'),$mod_config['notification_events']) && empty($event_info['invisible'])) {
+ return false;
+ }
+
+ if (!isset($omit_user_id)) {
+ global $xoopsUser;
+ if (!empty($xoopsUser)) {
+ $omit_user_id = $xoopsUser->getVar('uid');
+ } else {
+ $omit_user_id = 0;
+ }
+ }
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('not_modid', intval($module_id)));
+ $criteria->add(new Criteria('not_category', $category));
+ $criteria->add(new Criteria('not_itemid', intval($item_id)));
+ $criteria->add(new Criteria('not_event', $event));
+ $mode_criteria = new CriteriaCompo();
+ $mode_criteria->add (new Criteria('not_mode', XOOPS_NOTIFICATION_MODE_SENDALWAYS), 'OR');
+ $mode_criteria->add (new Criteria('not_mode', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE), 'OR');
+ $mode_criteria->add (new Criteria('not_mode', XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT), 'OR');
+ $criteria->add($mode_criteria);
+ if (!empty($user_list)) {
+ $user_criteria = new CriteriaCompo();
+ foreach ($user_list as $user) {
+ $user_criteria->add (new Criteria('not_uid', $user), 'OR');
+ }
+ $criteria->add($user_criteria);
+ }
+ $notifications =& $this->getObjects($criteria);
+ if (empty($notifications)) {
+ return;
+ }
+
+ // Add some tag substitutions here
+
+ $not_config = $module->getInfo('notification');
+ $tags = array();
+ if (!empty($not_config)) {
+ if (!empty($not_config['tags_file'])) {
+ $tags_file = XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname') . '/' . $not_config['tags_file'];
+ if (file_exists($tags_file)) {
+ include_once $tags_file;
+ if (!empty($not_config['tags_func'])) {
+ $tags_func = $not_config['tags_func'];
+ if (function_exists($tags_func)) {
+ $tags = $tags_func($category, intval($item_id), $event);
+ }
+ }
+ }
+ }
+ // RMV-NEW
+ if (!empty($not_config['lookup_file'])) {
+ $lookup_file = XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname') . '/' . $not_config['lookup_file'];
+ if (file_exists($lookup_file)) {
+ include_once $lookup_file;
+ if (!empty($not_config['lookup_func'])) {
+ $lookup_func = $not_config['lookup_func'];
+ if (function_exists($lookup_func)) {
+ $item_info = $lookup_func($category, intval($item_id));
+ }
+ }
+ }
+ }
+ }
+ $tags['X_ITEM_NAME'] = !empty($item_info['name']) ? $item_info['name'] : '[' . _NOT_ITEMNAMENOTAVAILABLE . ']';
+ $tags['X_ITEM_URL'] = !empty($item_info['url']) ? $item_info['url'] : '[' . _NOT_ITEMURLNOTAVAILABLE . ']';
+ $tags['X_ITEM_TYPE'] = !empty($category_info['item_name']) ? $category_info['title'] : '[' . _NOT_ITEMTYPENOTAVAILABLE . ']';
+ $tags['X_MODULE'] = $module->getVar('name');
+ $tags['X_MODULE_URL'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/';
+ $tags['X_NOTIFY_CATEGORY'] = $category;
+ $tags['X_NOTIFY_EVENT'] = $event;
+
+ $template_dir = $event_info['mail_template_dir'];
+ $template = $event_info['mail_template'] . '.tpl';
+ $subject = $event_info['mail_subject'];
+
+ foreach ($notifications as $notification) {
+ if (empty($omit_user_id) || $notification->getVar('not_uid') != $omit_user_id) {
+ // user-specific tags
+ //$tags['X_UNSUBSCRIBE_URL'] = 'TODO';
+ // TODO: don't show unsubscribe link if it is 'one-time' ??
+ $tags['X_UNSUBSCRIBE_URL'] = XOOPS_URL . '/notifications.php';
+ $tags = array_merge ($tags, $extra_tags);
+
+ $notification->notifyUser($template_dir, $template, $subject, $tags);
+ }
+ }
+ }
+
+
+ /**
+ * Delete all notifications for one user
+ *
+ * @param int $user_id ID of the user
+ * @return bool
+ **/
+ function unsubscribeByUser ($user_id)
+ {
+ $criteria = new Criteria('not_uid', intval($user_id));
+ return $this->deleteAll($criteria);
+ }
+
+
+// TODO: allow these to use current module, etc...
+
+ /**
+ * Unsubscribe notifications for an event(s).
+ *
+ * @param string $category category of the events
+ * @param int $item_id ID of the item
+ * @param mixed $events event string or array of events
+ * @param int $module_id ID of the module (default current module)
+ * @param int $user_id UID of the user (default current user)
+ *
+ * @return bool
+ **/
+
+ function unsubscribe ($category, $item_id, $events, $module_id=null, $user_id=null)
+ {
+ if (!isset($user_id)) {
+ global $xoopsUser;
+ if (empty($xoopsUser)) {
+ return false; // anonymous cannot subscribe
+ } else {
+ $user_id = $xoopsUser->getVar('uid');
+ }
+ }
+
+ if (!isset($module_id)) {
+ global $xoopsModule;
+ $module_id = $xoopsModule->getVar('mid');
+ }
+
+ $criteria = new CriteriaCompo();
+ $criteria->add (new Criteria('not_modid', intval($module_id)));
+ $criteria->add (new Criteria('not_category', $category));
+ $criteria->add (new Criteria('not_itemid', intval($item_id)));
+ $criteria->add (new Criteria('not_uid', intval($user_id)));
+ if (!is_array($events)) {
+ $events = array($events);
+ }
+ $event_criteria = new CriteriaCompo();
+ foreach ($events as $event) {
+ $event_criteria->add (new Criteria('not_event', $event), 'OR');
+ }
+ $criteria->add($event_criteria);
+ return $this->deleteAll($criteria);
+ }
+
+
+ // TODO: When 'update' a module, may need to switch around some
+ // notification classes/IDs... or delete the ones that no longer
+ // exist.
+
+ /**
+ * Delete all notifications for a particular module
+ *
+ * @param int $module_id ID of the module
+ * @return bool
+ **/
+ function unsubscribeByModule ($module_id)
+ {
+ $criteria = new Criteria('not_modid', intval($module_id));
+ return $this->deleteAll($criteria);
+ }
+
+
+ /**
+ * Delete all subscriptions for a particular item.
+ *
+ * @param int $module_id ID of the module to which item belongs
+ * @param string $category Notification category of the item
+ * @param int $item_id ID of the item
+ *
+ * @return bool
+ **/
+ function unsubscribeByItem ($module_id, $category, $item_id)
+ {
+ $criteria = new CriteriaCompo();
+ $criteria->add (new Criteria('not_modid', intval($module_id)));
+ $criteria->add (new Criteria('not_category', $category));
+ $criteria->add (new Criteria('not_itemid', intval($item_id)));
+ return $this->deleteAll($criteria);
+ }
+
+
+ /**
+ * Perform notification maintenance activites at login time.
+ * In particular, any notifications for the newly logged-in
+ * user with mode XOOPS_NOTIFICATION_MODE_WAITFORLOGIN are
+ * switched to mode XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT.
+ *
+ * @param int $user_id ID of the user being logged in
+ **/
+ function doLoginMaintenance ($user_id)
+ {
+ $criteria = new CriteriaCompo();
+ $criteria->add (new Criteria('not_uid', intval($user_id)));
+ $criteria->add (new Criteria('not_mode', XOOPS_NOTIFICATION_MODE_WAITFORLOGIN));
+
+ $notifications = $this->getObjects($criteria, true);
+ foreach ($notifications as $n) {
+ $n->setVar('not_mode', XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT);
+ $this->insert($n);
+ }
+ }
+
+
+ /**
+ * Update
+ *
+ * @param object &$notification {@link XoopsNotification} object
+ * @param string $field_name Name of the field
+ * @param mixed $field_value Value to write
+ *
+ * @return bool
+ **/
+ function updateByField(&$notification, $field_name, $field_value)
+ {
+ $notification->unsetNew();
+ $notification->setVar($field_name, $field_value);
+ return $this->insert($notification);
+ }
+
+
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/notification.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/object.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/object.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/object.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,1111 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+/**
+ * @package kernel
+ * @copyright copyright © 2000 XOOPS.org
+ */
+
+/**#@+
+* Xoops object datatype
+*
+**/
+define('XOBJ_DTYPE_TXTBOX', 1);
+define('XOBJ_DTYPE_TXTAREA', 2);
+define('XOBJ_DTYPE_INT', 3);
+define('XOBJ_DTYPE_URL', 4);
+define('XOBJ_DTYPE_EMAIL', 5);
+define('XOBJ_DTYPE_ARRAY', 6);
+define('XOBJ_DTYPE_OTHER', 7);
+define('XOBJ_DTYPE_SOURCE', 8);
+define('XOBJ_DTYPE_STIME', 9);
+define('XOBJ_DTYPE_MTIME', 10);
+define('XOBJ_DTYPE_LTIME', 11);
+/**#@-*/
+
+//include_once "xoopspluginloader.php";
+
+/**
+ * Base class for all objects in the Xoops kernel (and beyond)
+ *
+ * @author Kazumi Ono (AKA onokazu)
+ * @copyright copyright © 2000 XOOPS.org
+ * @package kernel
+ **/
+class XoopsObject
+{
+
+ /**
+ * holds all variables(properties) of an object
+ *
+ * @var array
+ * @access protected
+ **/
+ var $vars = array();
+
+ /**
+ * variables cleaned for store in DB
+ *
+ * @var array
+ * @access protected
+ */
+ var $cleanVars = array();
+
+ /**
+ * is it a newly created object?
+ *
+ * @var bool
+ * @access private
+ */
+ var $_isNew = false;
+
+ /**
+ * has any of the values been modified?
+ *
+ * @var bool
+ * @access private
+ */
+ var $_isDirty = false;
+
+ /**
+ * errors
+ *
+ * @var array
+ * @access private
+ */
+ var $_errors = array();
+
+ /**
+ * additional filters registered dynamically by a child class object
+ *
+ * @access private
+ */
+ var $_filters = array();
+
+ /**
+ * constructor
+ *
+ * normally, this is called from child classes only
+ * @access public
+ */
+ function XoopsObject()
+ {
+ }
+
+ /**#@+
+ * used for new/clone objects
+ *
+ * @access public
+ */
+ function setNew()
+ {
+ $this->_isNew = true;
+ }
+ function unsetNew()
+ {
+ $this->_isNew = false;
+ }
+ function isNew()
+ {
+ return $this->_isNew;
+ }
+ /**#@-*/
+
+ /**#@+
+ * mark modified objects as dirty
+ *
+ * used for modified objects only
+ * @access public
+ */
+ function setDirty()
+ {
+ $this->_isDirty = true;
+ }
+ function unsetDirty()
+ {
+ $this->_isDirty = false;
+ }
+ function isDirty()
+ {
+ return $this->_isDirty;
+ }
+ /**#@-*/
+
+ /**
+ * initialize variables for the object
+ *
+ * @access public
+ * @param string $key
+ * @param int $data_type set to one of XOBJ_DTYPE_XXX constants (set to XOBJ_DTYPE_OTHER if no data type ckecking nor text sanitizing is required)
+ * @param mixed
+ * @param bool $required require html form input?
+ * @param int $maxlength for XOBJ_DTYPE_TXTBOX type only
+ * @param string $option does this data have any select options?
+ */
+ function initVar($key, $data_type, $value = null, $required = false, $maxlength = null, $options = '')
+ {
+ $this->vars[$key] = array('value' => $value, 'required' => $required, 'data_type' => $data_type, 'maxlength' => $maxlength, 'changed' => false, 'options' => $options);
+ }
+
+ /**
+ * assign a value to a variable
+ *
+ * @access public
+ * @param string $key name of the variable to assign
+ * @param mixed $value value to assign
+ */
+ function assignVar($key, $value)
+ {
+ if (isset($value) && isset($this->vars[$key])) {
+ $this->vars[$key]['value'] =& $value;
+ }
+ }
+
+ /**
+ * assign values to multiple variables in a batch
+ *
+ * @access private
+ * @param array $var_array associative array of values to assign
+ */
+ function assignVars($var_arr)
+ {
+ foreach ($var_arr as $key => $value) {
+ $this->assignVar($key, $value);
+ }
+ }
+
+ /**
+ * assign a value to a variable
+ *
+ * @access public
+ * @param string $key name of the variable to assign
+ * @param mixed $value value to assign
+ * @param bool $not_gpc
+ */
+ function setVar($key, $value, $not_gpc = false)
+ {
+ if (!empty($key) && isset($value) && isset($this->vars[$key])) {
+ $this->vars[$key]['value'] =& $value;
+ $this->vars[$key]['not_gpc'] = $not_gpc;
+ $this->vars[$key]['changed'] = true;
+ $this->setDirty();
+ }
+ }
+
+ /**
+ * assign values to multiple variables in a batch
+ *
+ * @access private
+ * @param array $var_arr associative array of values to assign
+ * @param bool $not_gpc
+ */
+ function setVars($var_arr, $not_gpc = false)
+ {
+ foreach ($var_arr as $key => $value) {
+ $this->setVar($key, $value, $not_gpc);
+ }
+ }
+
+ /**
+ * Assign values to multiple variables in a batch
+ *
+ * Meant for a CGI contenxt:
+ * - prefixed CGI args are considered save
+ * - avoids polluting of namespace with CGI args
+ *
+ * @access private
+ * @param array $var_arr associative array of values to assign
+ * @param string $pref prefix (only keys starting with the prefix will be set)
+ */
+ function setFormVars($var_arr=null, $pref='xo_', $not_gpc=false) {
+ $len = strlen($pref);
+ foreach ($var_arr as $key => $value) {
+ if ($pref == substr($key,0,$len)) {
+ $this->setVar(substr($key,$len), $value, $not_gpc);
+ }
+ }
+ }
+
+
+ /**
+ * returns all variables for the object
+ *
+ * @access public
+ * @return array associative array of key->value pairs
+ */
+ function &getVars()
+ {
+ return $this->vars;
+ }
+
+ /**
+ * returns a specific variable for the object in a proper format
+ *
+ * @access public
+ * @param string $key key of the object's variable to be returned
+ * @param string $format format to use for the output
+ * @return mixed formatted value of the variable
+ */
+ function getVar($key, $format = 's')
+ {
+ $ret = $this->vars[$key]['value'];
+ switch ($this->vars[$key]['data_type']) {
+
+ case XOBJ_DTYPE_TXTBOX:
+ switch (strtolower($format)) {
+ case 's':
+ case 'show':
+ case 'e':
+ case 'edit':
+ $ts =& MyTextSanitizer::getInstance();
+ return $ts->htmlSpecialChars($ret);
+ break 1;
+ case 'p':
+ case 'preview':
+ case 'f':
+ case 'formpreview':
+ $ts =& MyTextSanitizer::getInstance();
+ return $ts->htmlSpecialChars($ts->stripSlashesGPC($ret));
+ break 1;
+ case 'n':
+ case 'none':
+ default:
+ break 1;
+ }
+ break;
+ case XOBJ_DTYPE_TXTAREA:
+ switch (strtolower($format)) {
+ case 's':
+ case 'show':
+ $ts =& MyTextSanitizer::getInstance();
+ $html = !empty($this->vars['dohtml']['value']) ? 1 : 0;
+ $xcode = (!isset($this->vars['doxcode']['value']) || $this->vars['doxcode']['value'] == 1) ? 1 : 0;
+ $smiley = (!isset($this->vars['dosmiley']['value']) || $this->vars['dosmiley']['value'] == 1) ? 1 : 0;
+ $image = (!isset($this->vars['doimage']['value']) || $this->vars['doimage']['value'] == 1) ? 1 : 0;
+ $br = (!isset($this->vars['dobr']['value']) || $this->vars['dobr']['value'] == 1) ? 1 : 0;
+ return $ts->displayTarea($ret, $html, $smiley, $xcode, $image, $br);
+ break 1;
+ case 'e':
+ case 'edit':
+ return htmlspecialchars($ret, ENT_QUOTES);
+ break 1;
+ case 'p':
+ case 'preview':
+ $ts =& MyTextSanitizer::getInstance();
+ $html = !empty($this->vars['dohtml']['value']) ? 1 : 0;
+ $xcode = (!isset($this->vars['doxcode']['value']) || $this->vars['doxcode']['value'] == 1) ? 1 : 0;
+ $smiley = (!isset($this->vars['dosmiley']['value']) || $this->vars['dosmiley']['value'] == 1) ? 1 : 0;
+ $image = (!isset($this->vars['doimage']['value']) || $this->vars['doimage']['value'] == 1) ? 1 : 0;
+ $br = (!isset($this->vars['dobr']['value']) || $this->vars['dobr']['value'] == 1) ? 1 : 0;
+ return $ts->previewTarea($ret, $html, $smiley, $xcode, $image, $br);
+ break 1;
+ case 'f':
+ case 'formpreview':
+ $ts =& MyTextSanitizer::getInstance();
+ return htmlspecialchars($ts->stripSlashesGPC($ret), ENT_QUOTES);
+ break 1;
+ case 'n':
+ case 'none':
+ default:
+ break 1;
+ }
+ break;
+ case XOBJ_DTYPE_ARRAY:
+ if (!is_array($ret)) {
+ if ($ret != "") {
+ $ret = unserialize($ret);
+ }
+ $ret = is_array($ret)?$ret:array();
+ }
+ break;
+ case XOBJ_DTYPE_SOURCE:
+ switch (strtolower($format)) {
+ case 's':
+ case 'show':
+ break 1;
+ case 'e':
+ case 'edit':
+ return htmlspecialchars($ret, ENT_QUOTES);
+ break 1;
+ case 'p':
+ case 'preview':
+ $ts =& MyTextSanitizer::getInstance();
+ return $ts->stripSlashesGPC($ret);
+ break 1;
+ case 'f':
+ case 'formpreview':
+ $ts =& MyTextSanitizer::getInstance();
+ return htmlspecialchars($ts->stripSlashesGPC($ret), ENT_QUOTES);
+ break 1;
+ case 'n':
+ case 'none':
+ default:
+ break 1;
+ }
+ break;
+ default:
+ if ($this->vars[$key]['options'] != '' && $ret != '') {
+ switch (strtolower($format)) {
+ case 's':
+ case 'show':
+ $selected = explode('|', $ret);
+ $options = explode('|', $this->vars[$key]['options']);
+ $i = 1;
+ $ret = array();
+ foreach ($options as $op) {
+ if (in_array($i, $selected)) {
+ $ret[] = $op;
+ }
+ $i++;
+ }
+ return implode(', ', $ret);
+ case 'e':
+ case 'edit':
+ $ret = explode('|', $ret);
+ break 1;
+ default:
+ break 1;
+ }
+
+ }
+ break;
+ }
+ return $ret;
+ }
+
+ /**
+ * clean values of all variables of the object for storage.
+ * also add slashes whereever needed
+ *
+ * @return bool true if successful
+ * @access public
+ */
+ function cleanVars()
+ {
+ if ( file_exists(XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php") ) {
+ include_once XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php";
+ } else {
+ include_once XOOPS_ROOT_PATH."/language/english/error.php";
+ }
+ $ts =& MyTextSanitizer::getInstance();
+ foreach ($this->vars as $k => $v) {
+ $cleanv = $v['value'];
+ if (!$v['changed']) {
+ } else {
+ $cleanv = is_string($cleanv) ? trim($cleanv) : $cleanv;
+ switch ($v['data_type']) {
+ case XOBJ_DTYPE_TXTBOX:
+ if ($v['required'] && $cleanv != '0' && $cleanv == '') {
+ $this->setErrors(sprintf(_ER_OB_ISREQUIRED, $k));
+ continue;
+ }
+ if (isset($v['maxlength']) && $v['maxlength'] > 0 && strlen($cleanv) > intval($v['maxlength'])) {
+ $this->setErrors(sprintf(_ER_OB_MUSTBESHORTER, $k, intval($v['maxlength'])));
+ continue;
+ }
+ if (!$v['not_gpc']) {
+ $cleanv = $ts->stripSlashesGPC($ts->censorString($cleanv));
+ } else {
+ $cleanv = $ts->censorString($cleanv);
+ }
+ break;
+ case XOBJ_DTYPE_TXTAREA:
+ if ($v['required'] && $cleanv != '0' && $cleanv == '') {
+ $this->setErrors(sprintf(_ER_OB_ISREQUIRED, $k));
+ continue;
+ }
+ if (isset($v['maxlength']) && $v['maxlength'] > 0 && strlen($cleanv) > intval($v['maxlength'])) {
+ $this->setErrors(sprintf(_ER_OB_MUSTBESHORTER, $k, intval($v['maxlength'])));
+ continue;
+ }
+ if (!$v['not_gpc']) {
+ $cleanv = $ts->stripSlashesGPC($ts->censorString($cleanv));
+ } else {
+ $cleanv = $ts->censorString($cleanv);
+ }
+ break;
+ case XOBJ_DTYPE_SOURCE:
+ if (!$v['not_gpc']) {
+ $cleanv = $ts->stripSlashesGPC($cleanv);
+ } else {
+ $cleanv = $cleanv;
+ }
+ break;
+ case XOBJ_DTYPE_INT:
+ $cleanv = intval($cleanv);
+ break;
+ case XOBJ_DTYPE_EMAIL:
+ if ($v['required'] && $cleanv == '') {
+ $this->setErrors(sprintf(_ER_OB_ISREQUIRED, $k));
+ continue;
+ }
+ if ($cleanv != '' && !preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$/i",$cleanv)) {
+ $this->setErrors(_ER_OB_INVALIDEMAIL);
+ continue;
+ }
+ if (!$v['not_gpc']) {
+ $cleanv = $ts->stripSlashesGPC($cleanv);
+ }
+ break;
+ case XOBJ_DTYPE_URL:
+ if ($v['required'] && $cleanv == '') {
+ $this->setErrors(sprintf(_ER_OB_ISREQUIRED, $k));
+ continue;
+ }
+ if ($cleanv != '' && !preg_match("/^http[s]*:\/\//i", $cleanv)) {
+ $cleanv = 'http://' . $cleanv;
+ }
+ if (!$v['not_gpc']) {
+ $cleanv =& $ts->stripSlashesGPC($cleanv);
+ }
+ break;
+ case XOBJ_DTYPE_ARRAY:
+ if (!$v['not_gpc']) {
+ $cleanv = array_map(array($ts, 'stripSlashesGPC'), $cleanv);
+ }
+ $cleanv = is_array($cleanv)?serialize($cleanv):serialize(array());
+
+ break;
+ case XOBJ_DTYPE_STIME:
+ case XOBJ_DTYPE_MTIME:
+ case XOBJ_DTYPE_LTIME:
+ $cleanv = !is_string($cleanv) ? intval($cleanv) : strtotime($cleanv);
+ break;
+ default:
+ break;
+ }
+ }
+ $this->cleanVars[$k] =& $cleanv;
+ unset($cleanv);
+ }
+ if (count($this->_errors) > 0) {
+ return false;
+ }
+ $this->unsetDirty();
+ return true;
+ }
+
+ /**
+ * dynamically register additional filter for the object
+ *
+ * @param string $filtername name of the filter
+ * @access public
+ */
+ function registerFilter($filtername)
+ {
+ $this->_filters[] = $filtername;
+ }
+
+ /**
+ * load all additional filters that have been registered to the object
+ *
+ * @access private
+ */
+ function _loadFilters()
+ {
+ //include_once XOOPS_ROOT_PATH.'/class/filters/filter.php';
+ //foreach ($this->_filters as $f) {
+ // include_once XOOPS_ROOT_PATH.'/class/filters/'.strtolower($f).'php';
+ //}
+ }
+
+ /**
+ * create a clone(copy) of the current object
+ *
+ * @access public
+ * @return object clone
+ */
+ function &xoopsClone()
+ {
+ $class = get_class($this);
+ $clone = new $class();
+ foreach ($this->vars as $k => $v) {
+ $clone->assignVar($k, $v['value']);
+ }
+ // need this to notify the handler class that this is a newly created object
+ $clone->setNew();
+ return $clone;
+ }
+
+ /**
+ * add an error
+ *
+ * @param string $value error to add
+ * @access public
+ */
+ function setErrors($err_str)
+ {
+ $this->_errors[] = trim($err_str);
+ }
+
+ /**
+ * return the errors for this object as an array
+ *
+ * @return array an array of errors
+ * @access public
+ */
+ function getErrors()
+ {
+ return $this->_errors;
+ }
+
+ /**
+ * return the errors for this object as html
+ *
+ * @return string html listing the errors
+ * @access public
+ */
+ function getHtmlErrors()
+ {
+ if ( file_exists(XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php") ) {
+ include_once XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php";
+ } else {
+ include_once XOOPS_ROOT_PATH."/language/english/error.php";
+ }
+ $ret = '<h4>'._ERRORS.'</h4>';
+ if (!empty($this->_errors)) {
+ foreach ($this->_errors as $error) {
+ $ret .= $error.'<br />';
+ }
+ } else {
+ $ret .= _NONE.'<br />';
+ }
+ return $ret;
+ }
+
+ /**
+ * Returns an array representation of the object
+ *
+ * @return array
+ */
+ function toArray() {
+ $ret = array();
+ $vars = $this->getVars();
+ foreach (array_keys($vars) as $i) {
+ $ret[$i] = $this->getVar($i);
+ }
+ return $ret;
+ }
+}
+
+/**
+* XOOPS object handler class.
+* This class is an abstract class of handler classes that are responsible for providing
+* data access mechanisms to the data source of its corresponsing data objects
+* @package kernel
+* @abstract
+*
+* @author Kazumi Ono <onokazu at xoops.org>
+* @copyright copyright © 2000 The XOOPS Project
+*/
+class XoopsObjectHandler
+{
+
+ /**
+ * holds referenced to {@link XoopsDatabase} class object
+ *
+ * @var object
+ * @see XoopsDatabase
+ * @access protected
+ */
+ var $db;
+
+ //
+ /**
+ * called from child classes only
+ *
+ * @param object $db reference to the {@link XoopsDatabase} object
+ * @access protected
+ */
+ function XoopsObjectHandler(&$db)
+ {
+ $this->db =& $db;
+ }
+
+ /**
+ * creates a new object
+ *
+ * @abstract
+ */
+ function &create()
+ {
+ }
+
+ /**
+ * gets a value object
+ *
+ * @param int $int_id
+ * @abstract
+ */
+ function &get($int_id)
+ {
+ }
+
+ /**
+ * insert/update object
+ *
+ * @param object $object
+ * @abstract
+ */
+ function insert(&$object)
+ {
+ }
+
+ /**
+ * delete obejct from database
+ *
+ * @param object $object
+ * @abstract
+ */
+ function delete(&$object)
+ {
+ }
+
+}
+
+/**
+* Persistable Object Handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of derived class objects.
+*
+* @author Jan Keller Pedersen <mithrandir at xoops.org> - IDG Danmark A/S <www.idg.dk>
+* @copyright copyright (c) 2000-2004 XOOPS.org
+* @package Kernel
+*/
+
+class XoopsPersistableObjectHandler extends XoopsObjectHandler {
+
+ /**#@+
+ * Information about the class, the handler is managing
+ *
+ * @var string
+ */
+ var $table;
+ var $keyName;
+ var $className;
+ var $identifierName;
+ /**#@-*/
+
+ /**
+ * Constructor - called from child classes
+ * @param object $db {@link XoopsDatabase} object
+ * @param string $tablename Name of database table
+ * @param string $classname Name of Class, this handler is managing
+ * @param string $keyname Name of the property, holding the key
+ *
+ * @return void
+ */
+ function XoopsPersistableObjectHandler(&$db, $tablename, $classname, $keyname, $idenfierName = false) {
+ $this->XoopsObjectHandler($db);
+ $this->table = $db->prefix($tablename);
+ $this->keyName = $keyname;
+ $this->className = $classname;
+ if ($idenfierName != false) {
+ $this->identifierName = $idenfierName;
+ }
+ }
+
+ /**
+ * create a new user
+ *
+ * @param bool $isNew Flag the new objects as "new"?
+ *
+ * @return object
+ */
+ function &create($isNew = true) {
+ $obj =& new $this->className();
+ if ($isNew === true) {
+ $obj->setNew();
+ }
+ return $obj;
+ }
+
+ /**
+ * retrieve an object
+ *
+ * @param mixed $id ID of the object - or array of ids for joint keys. Joint keys MUST be given in the same order as in the constructor
+ * @param bool $as_object whether to return an object or an array
+ * @return mixed reference to the object, FALSE if failed
+ */
+ function &get($id, $as_object = true) {
+ if (is_array($this->keyName)) {
+ $criteria = new CriteriaCompo();
+ for ($i = 0; $i < count($this->keyName); $i++) {
+ $criteria->add(new Criteria($this->keyName[$i], intval($id[$i])));
+ }
+ }
+ else {
+ $criteria = new Criteria($this->keyName, intval($id));
+ }
+ $criteria->setLimit(1);
+ $obj_array = $this->getObjects($criteria, false, $as_object);
+ if (count($obj_array) != 1) {
+ return $this->create();
+ }
+ return $obj_array[0];
+ }
+
+ /**
+ * retrieve objects from the database
+ *
+ * @param object $criteria {@link CriteriaElement} conditions to be met
+ * @param bool $id_as_key use the ID as key for the array?
+ * @param bool $as_object return an array of objects?
+ *
+ * @return array
+ */
+ function getObjects($criteria = null, $id_as_key = false, $as_object = true)
+ {
+ $ret = array();
+ $limit = $start = 0;
+ $sql = 'SELECT * FROM '.$this->table;
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ if ($criteria->getSort() != '') {
+ $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
+ }
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ if (!$result) {
+ return $ret;
+ }
+
+ return $this->convertResultSet($result, $id_as_key, $as_object);
+ }
+
+ /**
+ * Convert a database resultset to a returnable array
+ *
+ * @param object $result database resultset
+ * @param bool $id_as_key - should NOT be used with joint keys
+ * @param bool $as_object
+ *
+ * @return array
+ */
+ function convertResultSet($result, $id_as_key = false, $as_object = true) {
+ $ret = array();
+ while ($myrow = $this->db->fetchArray($result)) {
+ $obj =& $this->create(false);
+ $obj->assignVars($myrow);
+ if (!$id_as_key) {
+ if ($as_object) {
+ $ret[] =& $obj;
+ }
+ else {
+ $row = array();
+ $vars = $obj->getVars();
+ foreach (array_keys($vars) as $i) {
+ $row[$i] = $obj->getVar($i);
+ }
+ $ret[] = $row;
+ }
+ } else {
+ if ($as_object) {
+ $ret[$myrow[$this->keyName]] =& $obj;
+ }
+ else {
+ $row = array();
+ $vars = $obj->getVars();
+ foreach (array_keys($vars) as $i) {
+ $row[$i] = $obj->getVar($i);
+ }
+ $ret[$myrow[$this->keyName]] = $row;
+ }
+ }
+ unset($obj);
+ }
+
+ return $ret;
+ }
+
+ /**
+ * Retrieve a list of objects as arrays - DON'T USE WITH JOINT KEYS
+ *
+ * @param object $criteria {@link CriteriaElement} conditions to be met
+ * @param int $limit Max number of objects to fetch
+ * @param int $start Which record to start at
+ *
+ * @return array
+ */
+ function getList($criteria = null, $limit = 0, $start = 0) {
+ $ret = array();
+ if ($criteria == null) {
+ $criteria = new CriteriaCompo();
+ }
+
+ if ($criteria->getSort() == '') {
+ $criteria->setSort($this->identifierName);
+ }
+
+ $sql = 'SELECT '.$this->keyName;
+ if(!empty($this->identifierName)){
+ $sql .= ', '.$this->identifierName;
+ }
+ $sql .= ' FROM '.$this->table;
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ if ($criteria->getSort() != '') {
+ $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
+ }
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ if (!$result) {
+ return $ret;
+ }
+
+ $myts =& MyTextSanitizer::getInstance();
+ while ($myrow = $this->db->fetchArray($result)) {
+ //identifiers should be textboxes, so sanitize them like that
+ $ret[$myrow[$this->keyName]] = empty($this->identifierName)?1:$myts->htmlSpecialChars($myrow[$this->identifierName]);
+ }
+ return $ret;
+ }
+
+ /**
+
+ * count objects matching a condition
+ *
+ * @param object $criteria {@link CriteriaElement} to match
+ * @return int count of objects
+ */
+ function getCount($criteria = null)
+ {
+ $field = "";
+ $groupby = false;
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ if ($criteria->groupby != "") {
+ $groupby = true;
+ $field = $criteria->groupby.", "; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
+ }
+ }
+ $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table;
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ if ($criteria->groupby != "") {
+ $sql .= $criteria->getGroupby();
+ }
+ }
+ $result = $this->db->query($sql);
+ if (!$result) {
+ return 0;
+ }
+ if ($groupby == false) {
+ list($count) = $this->db->fetchRow($result);
+ return $count;
+ }
+ else {
+ $ret = array();
+ while (list($id, $count) = $this->db->fetchRow($result)) {
+ $ret[$id] = $count;
+ }
+ return $ret;
+ }
+ }
+
+ /**
+ * delete an object from the database
+ *
+ * @param object $obj reference to the object to delete
+ * @param bool $force
+ * @return bool FALSE if failed.
+ */
+ function delete(&$obj, $force = false)
+ {
+ if (is_array($this->keyName)) {
+ $clause = array();
+ for ($i = 0; $i < count($this->keyName); $i++) {
+ $clause[] = $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]);
+ }
+ $whereclause = implode(" AND ", $clause);
+ }
+ else {
+ $whereclause = $this->keyName." = ".$obj->getVar($this->keyName);
+ }
+ $sql = "DELETE FROM ".$this->table." WHERE ".$whereclause;
+ if (false != $force) {
+ $result = $this->db->queryF($sql);
+ } else {
+ $result = $this->db->query($sql);
+ }
+ if (!$result) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * insert a new object in the database
+ *
+ * @param object $obj reference to the object
+ * @param bool $force whether to force the query execution despite security settings
+ * @param bool $checkObject check if the object is dirty and clean the attributes
+ * @return bool FALSE if failed, TRUE if already present and unchanged or successful
+ */
+
+ function insert(&$obj, $force = false, $checkObject = true)
+ {
+ if ($checkObject != false) {
+ if (!is_object($obj)) {
+ var_dump($obj);
+ return false;
+ }
+ /**
+ * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5
+ */
+ if (!is_a($obj, $this->className)) {
+ $obj->setErrors(get_class($obj)." Differs from ".$this->className);
+ return false;
+ }
+ if (!$obj->isDirty()) {
+ $obj->setErrors("Not dirty"); //will usually not be outputted as errors are not displayed when the method returns true, but it can be helpful when troubleshooting code - Mith
+ return true;
+ }
+ }
+ if (!$obj->cleanVars()) {
+ return false;
+ }
+
+ foreach ($obj->cleanVars as $k => $v) {
+ if ($obj->vars[$k]['data_type'] == XOBJ_DTYPE_INT) {
+ $cleanvars[$k] = intval($v);
+ } elseif ( is_array( $v ) ) {
+ $cleanvars[ $k ] = $this->db->quoteString( implode( ',', $v ) );
+ } else {
+ $cleanvars[$k] = $this->db->quoteString($v);
+ }
+ }
+ if ($obj->isNew()) {
+ if (!is_array($this->keyName)) {
+ if ($cleanvars[$this->keyName] < 1) {
+ $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq');
+ }
+ }
+ $sql = "INSERT INTO ".$this->table." (".implode(',', array_keys($cleanvars)).") VALUES (".implode(',', array_values($cleanvars)) .")";
+ } else {
+ $sql = "UPDATE ".$this->table." SET";
+ foreach ($cleanvars as $key => $value) {
+ if ((!is_array($this->keyName) && $key == $this->keyName) || (is_array($this->keyName) && in_array($key, $this->keyName))) {
+ continue;
+ }
+ if (isset($notfirst) ) {
+ $sql .= ",";
+ }
+ $sql .= " ".$key." = ".$value;
+ $notfirst = true;
+ }
+ if (is_array($this->keyName)) {
+ $whereclause = "";
+ for ($i = 0; $i < count($this->keyName); $i++) {
+ if ($i > 0) {
+ $whereclause .= " AND ";
+ }
+ $whereclause .= $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]);
+ }
+ }
+ else {
+ $whereclause = $this->keyName." = ".$obj->getVar($this->keyName);
+ }
+ $sql .= " WHERE ".$whereclause;
+ }
+ if (false != $force) {
+ $result = $this->db->queryF($sql);
+ } else {
+ $result = $this->db->query($sql);
+ }
+ if (!$result) {
+ return false;
+ }
+ if ($obj->isNew() && !is_array($this->keyName)) {
+ $obj->assignVar($this->keyName, $this->db->getInsertId());
+ }
+ return true;
+ }
+
+ /**
+ * Change a value for objects with a certain criteria
+ *
+ * @param string $fieldname Name of the field
+ * @param string $fieldvalue Value to write
+ * @param object $criteria {@link CriteriaElement}
+ *
+ * @return bool
+ **/
+ function updateAll($fieldname, $fieldvalue, $criteria = null, $force = false)
+ {
+ $set_clause = $fieldname . ' = ';
+ if ( is_numeric( $fieldvalue ) ) {
+ $set_clause .= $fieldvalue;
+ } elseif ( is_array( $fieldvalue ) ) {
+ $set_clause .= $this->db->quoteString( implode( ',', $fieldvalue ) );
+ } else {
+ $set_clause .= $this->db->quoteString( $fieldvalue );
+ }
+ $sql = 'UPDATE '.$this->table.' SET '.$set_clause;
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ }
+ if (false != $force) {
+ $result = $this->db->queryF($sql);
+ } else {
+ $result = $this->db->query($sql);
+ }
+ if (!$result) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * delete all objects meeting the conditions
+ *
+ * @param object $criteria {@link CriteriaElement} with conditions to meet
+ * @return bool
+ */
+
+ function deleteAll($criteria = null)
+ {
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql = 'DELETE FROM '.$this->table;
+ $sql .= ' '.$criteria->renderWhere();
+ if (!$this->db->query($sql)) {
+ return false;
+ }
+ $rows = $this->db->getAffectedRows();
+ return $rows > 0 ? $rows : true;
+ }
+ return false;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/object.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/online.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/online.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/online.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,175 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+/**
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+/**
+ * A handler for "Who is Online?" information
+ *
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsOnlineHandler
+{
+
+ /**
+ * Database connection
+ *
+ * @var object
+ * @access private
+ */
+ var $db;
+
+ /**
+ * Constructor
+ *
+ * @param object &$db {@link XoopsHandlerFactory}
+ */
+ function XoopsOnlineHandler(&$db)
+ {
+ $this->db =& $db;
+ }
+
+ /**
+ * Write online information to the database
+ *
+ * @param int $uid UID of the active user
+ * @param string $uname Username
+ * @param string $timestamp
+ * @param string $module Current module
+ * @param string $ip User's IP adress
+ *
+ * @return bool TRUE on success
+ */
+ function write($uid, $uname, $time, $module, $ip)
+ {
+ $uid = intval($uid);
+ if ($uid > 0) {
+ $sql = "SELECT COUNT(*) FROM ".$this->db->prefix('online')." WHERE online_uid=".$uid;
+ } else {
+ $sql = "SELECT COUNT(*) FROM ".$this->db->prefix('online')." WHERE online_uid=".$uid." AND online_ip='".$ip."'";
+ }
+ list($count) = $this->db->fetchRow($this->db->queryF($sql));
+ if ( $count > 0 ) {
+ $sql = "UPDATE ".$this->db->prefix('online')." SET online_updated=".$time.", online_module = ".$module." WHERE online_uid = ".$uid;
+ if ($uid == 0) {
+ $sql .= " AND online_ip='".$ip."'";
+ }
+ } else {
+ $sql = sprintf("INSERT INTO %s (online_uid, online_uname, online_updated, online_ip, online_module) VALUES (%u, %s, %u, %s, %u)", $this->db->prefix('online'), $uid, $this->db->quoteString($uname), $time, $this->db->quoteString($ip), $module);
+ }
+ if (!$this->db->queryF($sql)) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Delete online information for a user
+ *
+ * @param int $uid UID
+ *
+ * @return bool TRUE on success
+ */
+ function destroy($uid)
+ {
+ $sql = sprintf("DELETE FROM %s WHERE online_uid = %u", $this->db->prefix('online'), $uid);
+ if (!$result = $this->db->queryF($sql)) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Garbage Collection
+ *
+ * Delete all online information that has not been updated for a certain time
+ *
+ * @param int $expire Expiration time in seconds
+ */
+ function gc($expire)
+ {
+ $sql = sprintf("DELETE FROM %s WHERE online_updated < %u", $this->db->prefix('online'), time() - intval($expire));
+ $this->db->queryF($sql);
+ }
+
+ /**
+ * Get an array of online information
+ *
+ * @param object $criteria {@link CriteriaElement}
+ * @return array Array of associative arrays of online information
+ */
+ function getAll($criteria = null)
+ {
+ $ret = array();
+ $limit = $start = 0;
+ $sql = 'SELECT * FROM '.$this->db->prefix('online');
+ if (is_object($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $result =& $this->db->query($sql, $limit, $start);
+ if (!$result) {
+ return false;
+ }
+ while ($myrow = $this->db->fetchArray($result)) {
+ $ret[] =& $myrow;
+ unset($myrow);
+ }
+ return $ret;
+ }
+
+ /**
+ * Count the number of online users
+ *
+ * @param object $criteria {@link CriteriaElement}
+ */
+ function getCount($criteria = null)
+ {
+ $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('online');
+ if (is_object($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ }
+ if (!$result =& $this->db->query($sql)) {
+ return false;
+ }
+ list($ret) = $this->db->fetchRow($result);
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/online.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/privmessage.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/privmessage.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/privmessage.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,238 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * {description}
+ *
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 The XOOPS Project (http://www.xoops.org)
+ *
+ * @version $Revision$ - $Date$
+ */
+class XoopsPrivmessage extends XoopsObject
+{
+
+/**
+ * constructor
+ **/
+ function XoopsPrivmessage()
+ {
+ $this->XoopsObject();
+ $this->initVar('msg_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('msg_image', XOBJ_DTYPE_OTHER, 'icon1.gif', false, 100);
+ $this->initVar('subject', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('from_userid', XOBJ_DTYPE_INT, null, true);
+ $this->initVar('to_userid', XOBJ_DTYPE_INT, null, true);
+ $this->initVar('msg_time', XOBJ_DTYPE_OTHER, null, false);
+ $this->initVar('msg_text', XOBJ_DTYPE_TXTAREA, null, true);
+ $this->initVar('read_msg', XOBJ_DTYPE_INT, 0, false);
+ }
+}
+
+/**
+ * XOOPS private message handler class.
+ *
+ * This class is responsible for providing data access mechanisms to the data source
+ * of XOOPS private message class objects.
+ *
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 The XOOPS Project (http://www.xoops.org)
+ *
+ * @version $Revision$ - $Date$
+ */
+class XoopsPrivmessageHandler extends XoopsObjectHandler
+{
+
+/**
+ * Create a new {@link XoopsPrivmessage} object
+ * @param bool $isNew Flag as "new"?
+ * @return object
+ **/
+ function &create($isNew = true)
+ {
+ $pm =& new XoopsPrivmessage();
+ if ($isNew) {
+ $pm->setNew();
+ }
+ return $pm;
+ }
+
+/**
+ * Load a {@link XoopsPrivmessage} object
+ * @param int $id ID of the message
+ * @return object
+ **/
+ function &get($id)
+ {
+ $id = intval($id);
+ if ($id > 0) {
+ $sql = 'SELECT * FROM '.$this->db->prefix('priv_msgs').' WHERE msg_id='.$id;
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ $numrows = $this->db->getRowsNum($result);
+ if ($numrows == 1) {
+ $pm = new XoopsPrivmessage();
+ $pm->assignVars($this->db->fetchArray($result));
+ return $pm;
+ }
+ }
+ return false;
+ }
+
+/**
+ * Insert a message in the database
+ * @param object $pm {@link XoopsPrivmessage} object
+ * @return bool
+ **/
+ function insert(&$pm)
+ {
+ if (strtolower(get_class($pm)) != 'xoopsprivmessage') {
+ return false;
+ }
+ if (!$pm->isDirty()) {
+ return true;
+ }
+ if (!$pm->cleanVars()) {
+ return false;
+ }
+ foreach ($pm->cleanVars as $k => $v) {
+ ${$k} = $v;
+ }
+ if ($pm->isNew()) {
+ $msg_id = $this->db->genId('priv_msgs_msg_id_seq');
+ $sql = sprintf("INSERT INTO %s (msg_id, msg_image, subject, from_userid, to_userid, msg_time, msg_text, read_msg) VALUES (%u, %s, %s, %u, %u, %u, %s, %u)", $this->db->prefix('priv_msgs'), $msg_id, $this->db->quoteString($msg_image), $this->db->quoteString($subject), $from_userid, $to_userid, time(), $this->db->quoteString($msg_text), 0);
+ } else {
+ $sql = sprintf("UPDATE %s SET msg_image = %s, subject = %s, from_userid = %u, to_userid = %u, msg_text = %s, read_msg = %u WHERE msg_id = %u", $this->db->prefix('priv_msgs'), $this->db->quoteString($msg_image), $this->db->quoteString($subject), $from_userid, $to_userid, $this->db->quoteString($msg_text), $read_msg, $msg_id);
+ }
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ if (empty($msg_id)) {
+ $msg_id = $this->db->getInsertId();
+ }
+ $pm->assignVar('msg_id', $msg_id);
+ return true;
+ }
+
+/**
+ * Delete from the database
+ * @param object $pm {@link XoopsPrivmessage} object
+ * @return bool
+ **/
+ function delete(&$pm)
+ {
+ if (strtolower(get_class($pm)) != 'xoopsprivmessage') {
+ return false;
+ }
+ if (!$result = $this->db->query(sprintf("DELETE FROM %s WHERE msg_id = %u", $this->db->prefix('priv_msgs'), $pm->getVar('msg_id')))) {
+ return false;
+ }
+ return true;
+ }
+
+/**
+ * Load messages from the database
+ * @param object $criteria {@link CriteriaElement} object
+ * @param bool $id_as_key use ID as key into the array?
+ * @return array Array of {@link XoopsPrivmessage} objects
+ **/
+ function getObjects($criteria = null, $id_as_key = false)
+ {
+ $ret = array();
+ $limit = $start = 0;
+ $sql = 'SELECT * FROM '.$this->db->prefix('priv_msgs');
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ $sort = !in_array($criteria->getSort(), array('msg_id', 'msg_time', 'from_userid')) ? 'msg_id' : $criteria->getSort();
+ $sql .= ' ORDER BY '.$sort.' '.$criteria->getOrder();
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ if (!$result) {
+ return $ret;
+ }
+ while ($myrow = $this->db->fetchArray($result)) {
+ $pm =& new XoopsPrivmessage();
+ $pm->assignVars($myrow);
+ if (!$id_as_key) {
+ $ret[] =& $pm;
+ } else {
+ $ret[$myrow['msg_id']] =& $pm;
+ }
+ unset($pm);
+ }
+ return $ret;
+ }
+
+/**
+ * Count message
+ * @param object $criteria = null {@link CriteriaElement} object
+ * @return int
+ **/
+ function getCount($criteria = null)
+ {
+ $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('priv_msgs');
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ }
+ if (!$result = $this->db->query($sql)) {
+ return 0;
+ }
+ list($count) = $this->db->fetchRow($result);
+ return $count;
+ }
+
+/**
+ * Mark a message as read
+ * @param object $pm {@link XoopsPrivmessage} object
+ * @return bool
+ **/
+ function setRead(&$pm)
+ {
+ if (strtolower(get_class($pm)) != 'xoopsprivmessage') {
+ return false;
+ }
+ $sql = sprintf("UPDATE %s SET read_msg = 1 WHERE msg_id = %u", $this->db->prefix('priv_msgs'), $pm->getVar('msg_id'));
+ if (!$this->db->queryF($sql)) {
+ return false;
+ }
+ return true;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/privmessage.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/profile.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/profile.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/profile.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,206 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: XOOPS Foundation //
+// URL: http://www.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+
+/**
+ * @package kernel
+ * @copyright copyright © 2000 XOOPS.org
+ */
+class XoopsProfile extends XoopsObject {
+ function XoopsProfile() {
+ $this->initVar('profileid', XOBJ_DTYPE_INT, null, true);
+ }
+
+ /**
+ * Initiate variables
+ * @param array $fields field information array of {@link XoopsProfileField} objects
+ */
+ function init($fields) {
+ if (is_array($fields) && count($fields) > 0) {
+ foreach (array_keys($fields) as $key) {
+ $this->initVar($key, $fields[$key]->getVar('field_valuetype'), $fields[$key]->getVar('field_default', 'n'), $fields[$key]->getVar('field_required'), $fields[$key]->getVar('field_maxlength'));
+ }
+ }
+ }
+}
+/**
+ * @package kernel
+ * @copyright copyright © 2000 XOOPS.org
+ */
+class XoopsProfileHandler extends XoopsPersistableObjectHandler {
+ /**
+ * holds reference to {@link XoopsProfileFieldHandler} object
+ */
+ var $_fHandler;
+
+ /**
+ * Array of {@link XoopsProfileField} objects
+ * @var array
+ */
+ var $_fields = array();
+
+ function XoopsProfileHandler(&$db) {
+ $this->XoopsPersistableObjectHandler($db, 'user_profile', "XoopsProfile", "profileid");
+ $this->_fHandler =& xoops_gethandler('ProfileField');
+ }
+
+ /**
+ * Create new {@link XoopsProfileField} object
+ *
+ * @param bool $isNew
+ *
+ * @return object
+ */
+ function &createField($isNew = true) {
+ $return =& $this->_fHandler->create($isNew);
+ return $return;
+ }
+
+ /**
+ * Load field information
+ *
+ * @return array
+ */
+ function loadFields() {
+ if (count($this->_fields) == 0) {
+ $this->_fields =& $this->_fHandler->loadFields();
+ }
+ return $this->_fields;
+ }
+
+ /**
+ * Fetch fields
+ *
+ * @param object $criteria {@link CriteriaElement} object
+ * @param bool $id_as_key return array with field IDs as key?
+ * @param bool $as_object return array of objects?
+ *
+ * @return array
+ **/
+ function getFields($criteria, $id_as_key = true, $as_object = true) {
+ return $this->_fHandler->getObjects($criteria, $id_as_key, $as_object);
+ }
+
+ /**
+ * Insert a field in the database
+ *
+ * @param object $field
+ * @param bool $force
+ *
+ * @return bool
+ */
+ function insertField(&$field, $force = false) {
+ return $this->_fHandler->insert($field, $force);
+ }
+
+ /**
+ * Delete a field from the database
+ *
+ * @param object $field
+ * @param bool $force
+ *
+ * @return bool
+ */
+ function deleteField(&$field, $force = false) {
+ return $this->_fHandler->delete($field, $force);
+ }
+
+ /**
+ * Save a new field in the database
+ *
+ * @param array $vars array of variables, taken from $module->loadInfo('profile')['field']
+ * @param int $categoryid ID of the category to add it to
+ * @param int $type valuetype of the field
+ * @param int $moduleid ID of the module, this field belongs to
+ * @param int $weight
+ *
+ * @return string
+ **/
+ function saveField($vars, $moduleid, $weight = 0) {
+ $field =& $this->createField();
+ $field->setVar('field_name', $vars['name']);
+ $field->setVar('field_moduleid', $moduleid);
+ $field->setVar('field_valuetype', $vars['valuetype']);
+ $field->setVar('field_type', $vars['type']);
+ $field->setVar('field_weight', $weight);
+ if (isset($vars['title'])) {
+ $field->setVar('field_title', $vars['title']);
+ }
+ if (isset($vars['description'])) {
+ $field->setVar('field_description', $vars['description']);
+ }
+ if (isset($vars['required'])) {
+ $field->setVar('field_required', $vars['required']); //0 = no, 1 = yes
+ }
+ if (isset($vars['maxlength'])) {
+ $field->setVar('field_maxlength', $vars['maxlength']);
+ }
+ if (isset($vars['default'])) {
+ $field->setVar('field_default', $vars['default']);
+ }
+ if (isset($vars['notnull'])) {
+ $field->setVar('field_notnull', $vars['notnull']);
+ }
+ if (isset($vars['show'])) {
+ $field->setVar('field_show', $vars['show']);
+ }
+ if (isset($vars['edit'])) {
+ $field->setVar('field_edit', $vars['edit']);
+ }
+ if (isset($vars['config'])) {
+ $field->setVar('field_config', $vars['config']);
+ }
+ if (isset($vars['options'])) {
+ $field->setVar('field_options', $vars['options']);
+ }
+ else {
+ $field->setVar('field_options', array());
+ }
+ if ($this->insertField($field)) {
+ $msg = ' Field <b>'.$vars['name'].'</b> added to the database';
+ }
+ else {
+ $msg = ' <span style="color:#ff0000;">ERROR: Could not insert field <b>'.$vars['name'].'</b> into the database. '.implode(' ', $field->getErrors()).$this->db->error().'</span>';
+ }
+ unset($field);
+ return $msg;
+ }
+
+ /**
+ * Update cached storage of profile field information
+ *
+ * @return bool
+ **/
+ function updateCache() {
+ return $this->_fHandler->updateCache();
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/profile.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/profilefield.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/profilefield.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/profilefield.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,519 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: XOOPS Foundation //
+// URL: http://www.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+/**
+ * @package kernel
+ * @copyright copyright © 2000 XOOPS.org
+ */
+class XoopsProfileField extends XoopsObject {
+ function XoopsProfileField() {
+ $this->initVar('fieldid', XOBJ_DTYPE_INT, null, true);
+ $this->initVar('field_type', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('field_valuetype', XOBJ_DTYPE_INT, null, true);
+ $this->initVar('field_name', XOBJ_DTYPE_TXTBOX, null, true);
+ $this->initVar('field_title', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('field_description', XOBJ_DTYPE_TXTAREA);
+ $this->initVar('field_required', XOBJ_DTYPE_INT, 0); //0 = no, 1 = yes
+ $this->initVar('field_maxlength', XOBJ_DTYPE_INT, 0);
+ $this->initVar('field_default', XOBJ_DTYPE_TXTAREA, "");
+ $this->initVar('field_moduleid', XOBJ_DTYPE_INT, 1);
+ $this->initVar('field_notnull', XOBJ_DTYPE_INT, 1);
+ $this->initVar('field_edit', XOBJ_DTYPE_INT, 0);
+ $this->initVar('field_show', XOBJ_DTYPE_INT, 0);
+ $this->initVar('field_config', XOBJ_DTYPE_INT, 0);
+ $this->initVar('field_options', XOBJ_DTYPE_ARRAY);
+ $this->initVar('field_register', XOBJ_DTYPE_INT, 0);
+ }
+
+ /**
+ * Returns a {@link XoopsFormElement} for editing the value of this field
+ *
+ * @param object $user {@link XoopsUser} object to edit the value of
+ *
+ * @return object
+ **/
+ function getEditElement(&$user) {
+ $value = $user->getVar($this->getVar('field_name'), 'e');
+ $caption = $this->getVar('field_title');
+ $caption = defined($caption) ? constant($caption) : $caption;
+ $name = $this->getVar('field_name', 'e');
+ $options = $this->getVar('field_options');
+ asort($options);
+ foreach(array_keys($options) as $key){
+ $optval = defined($options[$key]) ? constant($options[$key]) : $options[$key];
+ $optkey = defined($key) ? constant($key) : $key;
+ unset($options[$key]);
+ $options[$optkey] = $optval;
+ }
+ include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
+ switch ($this->getVar('field_type')) {
+ default:
+ case "autotext":
+ //autotext is not for editing
+ $element = new XoopsFormLabel($caption, $this->getOutputValue($user));
+ break;
+
+ case "textbox":
+ $element = new XoopsFormText($caption, $name, 35, $this->getVar('field_maxlength'), $value);
+ break;
+
+ case "textarea":
+ $element = new XoopsFormTextArea($caption, $name, $value, 10, 50);
+ break;
+
+ case "dhtml":
+ $element = new XoopsFormDhtmlTextArea($caption, $name, $value, 10, 50);
+ break;
+
+ case "select":
+ $element = new XoopsFormSelect($caption, $name, $value);
+ $element->addOptionArray($options);
+ break;
+
+ case "select_multi":
+ $element = new XoopsFormSelect($caption, $name, $value, 5, true);
+ $element->addOptionArray($options);
+ break;
+
+ case "radio":
+ $element = new XoopsFormRadio($caption, $name, $value);
+ $element->addOptionArray($options);
+ break;
+
+ case "checkbox":
+ $element = new XoopsFormCheckBox($caption, $name, $value);
+ $element->addOptionArray($options);
+ break;
+
+ case "yesno":
+ $element = new XoopsFormRadioYN($caption, $name, $value);
+ break;
+
+ case "group":
+ $element = new XoopsFormSelectGroup($caption, $name, true, $value);
+ break;
+
+ case "group_multi":
+ $element = new XoopsFormSelectGroup($caption, $name, true, $value, 5, true);
+ break;
+
+ case "language":
+ $element = new XoopsFormSelectLang($caption, $name, $value);
+ break;
+
+ case "date":
+ $element = new XoopsFormTextDateSelect($caption, $name, 15, $value);
+ break;
+
+// case "longdate":
+// $element = new XoopsFormTextDateSelect($caption, $name, 15, str_replace("-", "/", $value));
+// break;
+
+ case "datetime":
+ $element = new XoopsFormDatetime($caption, $name, 15, $value);
+ break;
+
+ case "list":
+ $element = new XoopsFormSelectList($caption, $name, $value, 1, $options[0]);
+ break;
+
+ case "timezone":
+ $element = new XoopsFormSelectTimezone($caption, $name, $value);
+ break;
+
+ case 'theme':
+ $element = new XoopsFormSelect($caption, $name, $value);
+ $element->addOption("0", _SITEDEFAULT);
+ $handle = opendir(XOOPS_THEME_PATH.'/');
+ $dirlist = array();
+ while (false !== ($file = readdir($handle))) {
+ if (is_dir(XOOPS_THEME_PATH.'/'.$file) && !preg_match("/^[.]{1,2}$/",$file) && strtolower($file) != 'cvs') {
+ if (file_exists(XOOPS_THEME_PATH."/".$file."/theme.html") && in_array($file, $GLOBALS['xoopsConfig']['theme_set_allowed'])) {
+ $dirlist[$file]=$file;
+ }
+ }
+ }
+ closedir($handle);
+ if (!empty($dirlist)) {
+ asort($dirlist);
+ $element->addOptionArray($dirlist);
+ }
+ break;
+ }
+ if ($this->getVar('field_description') != "") {
+ $element->setDescription($this->getVar('field_description'));
+ }
+ return $element;
+ }
+
+ /**
+ * Returns a value for output of this field
+ *
+ * @param object $user {@link XoopsUser} object to edit the value of
+ *
+ * @return mixed
+ **/
+ function getOutputValue(&$user) {
+ $value = $user->getVar($this->getVar('field_name'));
+ switch ($this->getVar('field_type')) {
+ default:
+ case "textbox":
+ case "textarea":
+ case "dhtml":
+ case "yesno":
+ case "timezone":
+ case 'theme':
+ case "language":
+ case "list":
+ return $value;
+ break;
+
+ case "select":
+ case "radio":
+ $options = $this->getVar('field_options');
+ return isset($options[$value]) ? htmlspecialchars($options[$value]) : "";
+ break;
+
+ case "select_multi":
+ case "checkbox":
+ $options = $this->getVar('field_options');
+ $ret = array();
+ if (count($options) > 0) {
+ foreach (array_keys($options) as $key) {
+ if (in_array($key, $value)) {
+ $ret[$key] = htmlspecialchars($options[$key]);
+ }
+ }
+ }
+ return $ret;
+ break;
+
+ case "group":
+ //change to retrieve groups and return name of group
+ return $value;
+ break;
+
+ case "group_multi":
+ //change to retrieve groups and return array of group names
+ break;
+
+// case "longdate":
+// //return YYYY/MM/DD format - not optimal as it is not using local date format, but how do we do that
+// //when we cannot convert it to a UNIX timestamp?
+// return str_replace("-", "/", $value);
+
+ case "date":
+ if ($value > 0) {
+ return formatTimestamp($value, 's');
+ }
+ return "";
+ break;
+
+ case "datetime":
+ if ($value > 0) {
+ return formatTimestamp($value, 'm');
+ }
+ return "";
+ break;
+
+ case "autotext":
+ $value = $user->getVar($this->getVar('field_name'), 'n'); //autotext can have HTML in it
+ $value = str_replace("{X_UID}", $user->getVar("uid"), $value );
+ $value = str_replace("{X_URL}", XOOPS_URL, $value );
+ $value = str_replace("{X_UNAME}", $user->getVar("uname"), $value );
+ return $value;
+ break;
+ }
+ }
+
+ /**
+ * Returns a value ready to be saved in the database
+ *
+ * @param mixed $value Value to format
+ *
+ * @return mixed
+ */
+ function getValueForSave($value) {
+ switch ($this->getVar('field_type')) {
+ default:
+ case "textbox":
+ case "textarea":
+ case "dhtml":
+ case "yesno":
+ case "timezone":
+ case 'theme':
+ case "language":
+ case "list":
+ case "select":
+ case "radio":
+ case "select_multi":
+ case "checkbox":
+ case "group":
+ case "group_multi":
+// case "longdate":
+ return $value;
+
+ case "date":
+ if ($value != "") {
+ return strtotime($value);
+ }
+ return $value;
+ break;
+
+ case "datetime":
+ if ($value != "") {
+ return strtotime($value['date']) + $value['time'];
+ }
+ return $value;
+ break;
+ }
+ }
+}
+
+/**
+ * @package kernel
+ * @copyright copyright © 2000 XOOPS.org
+ */
+class XoopsProfileFieldHandler extends XoopsPersistableObjectHandler {
+ function XoopsProfileFieldHandler(&$db) {
+ $this->XoopsPersistableObjectHandler($db, 'user_profile_field', "XoopsProfileField", "fieldid", 'field_title');
+ }
+
+ /**
+ * Read field information from cached storage
+ *
+ * @param bool $force_update read fields from database and not cached storage
+ *
+ * @return array
+ */
+ function loadFields($force_update = false) {
+ static $fields = array();
+ if (!empty($force_update) || count($fields) == 0) {
+ if (!empty($force_update) || !file_exists(XOOPS_CACHE_PATH."/profilefields.tmp")) {
+ $this->updateCache();
+ }
+ $s = implode("", @file(XOOPS_CACHE_PATH."/profilefields.tmp"));
+ $fields = unserialize($s);
+ }
+ return $fields;
+ }
+
+ /**
+ * save a profile field in the database
+ *
+ * @param object $obj reference to the object
+ * @param bool $force whether to force the query execution despite security settings
+ * @param bool $checkObject check if the object is dirty and clean the attributes
+ * @return bool FALSE if failed, TRUE if already present and unchanged or successful
+ */
+ function insert(&$obj, $force = false) {
+ $profile_handler =& xoops_gethandler('profile');
+ if ($obj->isNew()) {
+ //add column to table
+ $changetype = "ADD";
+ }
+ else {
+ //update column information
+ $changetype = "CHANGE ".$obj->getVar('field_name', 'n');
+ }
+ $obj->cleanVars();
+ $defaultstring = "";
+ switch ($obj->getVar('field_type')) {
+ case "datetime":
+ case "date":
+ $obj->setVar('field_valuetype', XOBJ_DTYPE_INT);
+ $obj->setVar('field_maxlength', 10);
+ break;
+
+// case "longdate":
+// $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX);
+// break;
+ case "yesno":
+ $obj->setVar('field_valuetype', XOBJ_DTYPE_INT);
+ $obj->setVar('field_maxlength', 1);
+ break;
+
+ case "textbox":
+ if($obj->getVar('field_valuetype')!=XOBJ_DTYPE_INT){
+ $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX);
+ }
+ break;
+
+ case "autotext":
+ if($obj->getVar('field_valuetype')!=XOBJ_DTYPE_INT){
+ $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTAREA);
+ }
+ break;
+
+ case "group_multi":
+ case "select_multi":
+ case "checkbox":
+ $obj->setVar('field_valuetype', XOBJ_DTYPE_ARRAY);
+ break;
+ case "language":
+ case "timezone":
+ case "theme":
+ $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX);
+ break;
+
+ case "dhtml":
+ case "textarea":
+ $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTAREA);
+ break;
+ }
+
+ if ($obj->getVar('field_valuetype') == "") {
+ $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX);
+ }
+
+ //set type
+ switch ($obj->getVar('field_valuetype')) {
+ default:
+ case XOBJ_DTYPE_ARRAY:
+ case XOBJ_DTYPE_EMAIL:
+ case XOBJ_DTYPE_TXTBOX:
+ case XOBJ_DTYPE_URL:
+ $type = "varchar";
+ // varchars must have a maxlength
+ if (!($obj->getVar('field_maxlength') > 0)) {
+ //so set it to max if maxlength is not set - or should it fail?
+ $obj->setVar('field_maxlength', 255);
+ }
+ if ($obj->getVar('field_default')) {
+ $defaultstring = " DEFAULT ".$this->db->quoteString($obj->cleanVars['field_default']);
+ }
+ break;
+
+ case XOBJ_DTYPE_INT:
+ $type = "int";
+ if ($obj->getVar('field_default')) {
+ $defaultstring = " DEFAULT ".$this->db->quoteString($obj->cleanVars['field_default']);
+ }
+ break;
+
+ case XOBJ_DTYPE_OTHER:
+ case XOBJ_DTYPE_TXTAREA:
+ $type = "text";
+ break;
+ }
+ $maxlengthstring = $obj->getVar('field_maxlength') > 0 ? "(".$obj->getVar('field_maxlength').")" : "";
+
+ $notnullstring = " NOT NULL";
+
+ $sql = "ALTER TABLE ".$profile_handler->table." ".$changetype." ".$obj->cleanVars['field_name']." ".$type.$maxlengthstring.$notnullstring.$defaultstring;
+ if ($this->db->query($sql)) {
+ //change this to also update the cached field information storage
+ $obj->setDirty();
+ if (!parent::insert($obj, $force)) {
+ return false;
+ }
+ if ($obj->getVar('field_show') || $obj->getVar('field_edit')) {
+ $module_handler =& xoops_gethandler('module');
+ $profile_module =& $module_handler->getByDirname('profile');
+ if (is_object($profile_module)) {
+ // Add group permissions
+ $groupperm_handler =& xoops_gethandler('groupperm');
+ if ($obj->getVar('field_show')) {
+ $groupperm_handler->addRight('profile_show', $obj->getVar('fieldid'), XOOPS_GROUP_USERS, $profile_module->getVar('mid'));
+ }
+ if ($obj->getVar('field_edit')) {
+ $groupperm_handler->addRight('profile_edit', $obj->getVar('fieldid'), XOOPS_GROUP_USERS, $profile_module->getVar('mid'));
+ }
+
+ }
+ }
+
+ //Update cached field information storage:
+ $this->updateCache();
+
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * delete a profile field from the database
+ *
+ * @param object $obj reference to the object to delete
+ * @param bool $force
+ * @return bool FALSE if failed.
+ **/
+ function delete(&$obj, $force = false) {
+ $profile_handler =& xoops_gethandler('profile');
+ // remove column from table
+ $sql = "ALTER TABLE ".$profile_handler->table." DROP ".$obj->getVar('field_name', 'n')."";
+ if ($this->db->query($sql)) {
+ //change this to update the cached field information storage
+ if (!parent::delete($obj, $force)) {
+ return false;
+ }
+
+ //Update cached field information storage:
+ $this->updateCache();
+
+ if ($obj->getVar('field_show') || $obj->getVar('field_edit')) {
+ $module_handler =& xoops_gethandler('module');
+ $profile_module =& $module_handler->getByDirname('profile');
+ if (is_object($profile_module)) {
+ // Remove group permissions
+ $groupperm_handler =& xoops_gethandler('groupperm');
+ $criteria = new CriteriaCompo(new Criteria('gperm_modid', $profile_module->getVar('mid')));
+ $criteria->add(new Criteria('gperm_itemid', $obj->getVar('fieldid')));
+ $criteria->add(new Criteria('gperm_name', "('profile_edit', 'profile_show', 'profile_visible', 'profile_search')", "IN"));
+ return $groupperm_handler->deleteAll($criteria);
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Update cached storage of profile field information
+ *
+ * @return bool
+ **/
+ function updateCache() {
+ $criteria = new Criteria('fieldid', 0, "!=");
+ $criteria->setSort('field_weight');
+ $field_objs =& $this->getObjects(null);
+ foreach (array_keys($field_objs) as $i) {
+ $fields[$field_objs[$i]->getVar('field_name')] = $field_objs[$i];
+ }
+ $s = serialize($fields);
+ $fp = fopen(XOOPS_CACHE_PATH."/profilefields.tmp", "w");
+ if (!fputs($fp, $s)) {
+ fclose($fp);
+ return false;
+ }
+ fclose($fp);
+ return true;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/profilefield.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/rank.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/rank.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/rank.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,57 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: D.J. (AKA phppp) //
+// URL: http://www.xoops.org //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+/**
+ * @package kernel
+ *
+ * @author D.J.
+ * @copyright copyright (c) 2000-2005 XOOPS.org
+ */
+
+class XoopsRank extends XoopsObject
+{
+ function XoopsRank()
+ {
+ $this->XoopsObject();
+ $this->initVar('rank_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('rank_title', XOBJ_DTYPE_TXTBOX, null, false);
+ $this->initVar('rank_min', XOBJ_DTYPE_INT, 0);
+ $this->initVar('rank_max', XOBJ_DTYPE_INT, 0);
+ $this->initVar('rank_special', XOBJ_DTYPE_INT, 0);
+ $this->initVar('rank_image', XOBJ_DTYPE_TXTBOX, "");
+ }
+}
+class XoopsRankHandler extends XoopsPersistableObjectHandler
+{
+ function XoopsRankHandler(&$db) {
+ $this->XoopsPersistableObjectHandler($db, 'ranks', 'XoopsRank', 'rank_id', 'rank_title');
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/rank.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/session.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/session.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/session.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,158 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+/**
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+
+
+/**
+ * Handler for a session
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ */
+class XoopsSessionHandler
+{
+
+ /**
+ * Database connection
+ *
+ * @var object
+ * @access private
+ */
+ var $db;
+
+ /**
+ * Constructor
+ *
+ * @param object &$mf reference to a XoopsManagerFactory
+ *
+ */
+ function XoopsSessionHandler(&$db)
+ {
+ $this->db =& $db;
+ }
+
+ /**
+ * Open a session
+ *
+ * @param string $save_path
+ * @param string $session_name
+ *
+ * @return bool
+ */
+ function open($save_path, $session_name)
+ {
+ return true;
+ }
+
+ /**
+ * Close a session
+ *
+ * @return bool
+ */
+ function close()
+ {
+ return true;
+ }
+
+ /**
+ * Read a session from the database
+ *
+ * @param string &sess_id ID of the session
+ *
+ * @return array Session data
+ */
+ function read($sess_id)
+ {
+ $sql = sprintf('SELECT sess_data FROM %s WHERE sess_id = %s', $this->db->prefix('session'), $this->db->quoteString($sess_id));
+ if (false != $result = $this->db->query($sql)) {
+ if (list($sess_data) = $this->db->fetchRow($result)) {
+ return $sess_data;
+ }
+ }
+ return '';
+ }
+
+ /**
+ * Write a session to the database
+ *
+ * @param string $sess_id
+ * @param string $sess_data
+ *
+ * @return bool
+ **/
+ function write($sess_id, $sess_data)
+ {
+ $sess_id = $this->db->quoteString($sess_id);
+ $sql = sprintf('UPDATE %s SET sess_updated = %u, sess_data = %s WHERE sess_id = %s', $this->db->prefix('session'), time(), $this->db->quoteString($sess_data), $sess_id);
+ $this->db->queryF($sql);
+ if ($this->db->getAffectedRows() != 1) {
+ $sql = sprintf('INSERT INTO %s (sess_id, sess_updated, sess_ip, sess_data) VALUES (%s, %u, %s, %s)', $this->db->prefix('session'), $sess_id, time(), $this->db->quoteString($_SERVER['REMOTE_ADDR']), $this->db->quoteString($sess_data));
+ return $this->db->queryF($sql);
+ }
+ return true;
+ }
+
+ /**
+ * Destroy a session
+ *
+ * @param string $sess_id
+ *
+ * @return bool
+ **/
+ function destroy($sess_id)
+ {
+ $sql = sprintf('DELETE FROM %s WHERE sess_id = %s', $this->db->prefix('session'), $this->db->quoteString($sess_id));
+ if ( !$result = $this->db->queryF($sql) ) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Garbage Collector
+ *
+ * @param int $expire Time in seconds until a session expires
+ * @return bool
+ **/
+ function gc($expire)
+ {
+ $mintime = time() - intval($expire);
+ $sql = sprintf('DELETE FROM %s WHERE sess_updated < %u', $this->db->prefix('session'), $mintime);
+ return $this->db->queryF($sql);
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/session.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/tplfile.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/tplfile.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/tplfile.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,313 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+class XoopsTplfile extends XoopsObject
+{
+
+ function XoopsTplfile()
+ {
+ $this->XoopsObject();
+ $this->initVar('tpl_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('tpl_refid', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('tpl_tplset', XOBJ_DTYPE_OTHER, null, false);
+ $this->initVar('tpl_file', XOBJ_DTYPE_TXTBOX, null, true, 100);
+ $this->initVar('tpl_desc', XOBJ_DTYPE_TXTBOX, null, false, 100);
+ $this->initVar('tpl_lastmodified', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('tpl_lastimported', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('tpl_module', XOBJ_DTYPE_OTHER, null, false);
+ $this->initVar('tpl_type', XOBJ_DTYPE_OTHER, null, false);
+ $this->initVar('tpl_source', XOBJ_DTYPE_SOURCE, null, false);
+ }
+
+ function &getSource()
+ {
+ return $this->getVar('tpl_source');
+ }
+
+ function getLastModified()
+ {
+ return $this->getVar('tpl_lastmodified');
+ }
+}
+
+/**
+* XOOPS template file handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS template file class objects.
+*
+*
+* @author Kazumi Ono <onokazu at xoops.org>
+*/
+
+class XoopsTplfileHandler extends XoopsObjectHandler
+{
+
+ function &create($isNew = true)
+ {
+ $tplfile =& new XoopsTplfile();
+ if ($isNew) {
+ $tplfile->setNew();
+ }
+ return $tplfile;
+ }
+
+ function &get($id, $getsource = false)
+ {
+ $id = intval($id);
+ if ($id > 0) {
+ if (!$getsource) {
+ $sql = 'SELECT * FROM '.$this->db->prefix('tplfile').' WHERE tpl_id='.$id;
+ } else {
+ $sql = 'SELECT f.*, s.tpl_source FROM '.$this->db->prefix('tplfile').' f LEFT JOIN '.$this->db->prefix('tplsource').' s ON s.tpl_id=f.tpl_id WHERE f.tpl_id='.$id;
+ }
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ $numrows = $this->db->getRowsNum($result);
+ if ($numrows == 1) {
+ $tplfile = new XoopsTplfile();
+ $tplfile->assignVars($this->db->fetchArray($result));
+ return $tplfile;
+ }
+ }
+ return false;
+ }
+
+ function loadSource(&$tplfile)
+ {
+ if (strtolower(get_class($tplfile)) != 'xoopstplfile') {
+ return false;
+ }
+ if (!$tplfile->getVar('tpl_source')) {
+ $sql = 'SELECT tpl_source FROM '.$this->db->prefix('tplsource').' WHERE tpl_id='.$tplfile->getVar('tpl_id');
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ $myrow = $this->db->fetchArray($result);
+ $tplfile->assignVar('tpl_source', $myrow['tpl_source']);
+ }
+ return true;
+ }
+
+ function insert(&$tplfile)
+ {
+ if (strtolower(get_class($tplfile)) != 'xoopstplfile') {
+ return false;
+ }
+ if (!$tplfile->isDirty()) {
+ return true;
+ }
+ if (!$tplfile->cleanVars()) {
+ return false;
+ }
+ foreach ($tplfile->cleanVars as $k => $v) {
+ ${$k} = $v;
+ }
+ if ($tplfile->isNew()) {
+ $tpl_id = $this->db->genId('tpltpl_file_id_seq');
+ $sql = sprintf("INSERT INTO %s (tpl_id, tpl_module, tpl_refid, tpl_tplset, tpl_file, tpl_desc, tpl_lastmodified, tpl_lastimported, tpl_type) VALUES (%u, %s, %u, %s, %s, %s, %u, %u, %s)", $this->db->prefix('tplfile'), $tpl_id, $this->db->quoteString($tpl_module), $tpl_refid, $this->db->quoteString($tpl_tplset), $this->db->quoteString($tpl_file), $this->db->quoteString($tpl_desc), $tpl_lastmodified, $tpl_lastimported, $this->db->quoteString($tpl_type));
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ if (empty($tpl_id)) {
+ $tpl_id = $this->db->getInsertId();
+ }
+ if (isset($tpl_source) && $tpl_source != '') {
+ $sql = sprintf("INSERT INTO %s (tpl_id, tpl_source) VALUES (%u, %s)", $this->db->prefix('tplsource'), $tpl_id, $this->db->quoteString($tpl_source));
+ if (!$result = $this->db->query($sql)) {
+ $this->db->query(sprintf("DELETE FROM %s WHERE tpl_id = %u", $this->db->prefix('tplfile'), $tpl_id));
+ return false;
+ }
+ }
+ $tplfile->assignVar('tpl_id', $tpl_id);
+ } else {
+ $sql = sprintf("UPDATE %s SET tpl_tplset = %s, tpl_file = %s, tpl_desc = %s, tpl_lastimported = %u, tpl_lastmodified = %u WHERE tpl_id = %u", $this->db->prefix('tplfile'), $this->db->quoteString($tpl_tplset), $this->db->quoteString($tpl_file), $this->db->quoteString($tpl_desc), $tpl_lastimported, $tpl_lastmodified, $tpl_id);
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ if (isset($tpl_source) && $tpl_source != '') {
+ $sql = sprintf("UPDATE %s SET tpl_source = %s WHERE tpl_id = %u", $this->db->prefix('tplsource'), $this->db->quoteString($tpl_source), $tpl_id);
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ function forceUpdate(&$tplfile)
+ {
+ if (strtolower(get_class($tplfile)) != 'xoopstplfile') {
+ return false;
+ }
+ if (!$tplfile->isDirty()) {
+ return true;
+ }
+ if (!$tplfile->cleanVars()) {
+ return false;
+ }
+ foreach ($tplfile->cleanVars as $k => $v) {
+ ${$k} = $v;
+ }
+ if (!$tplfile->isNew()) {
+ $sql = sprintf("UPDATE %s SET tpl_tplset = %s, tpl_file = %s, tpl_desc = %s, tpl_lastimported = %u, tpl_lastmodified = %u WHERE tpl_id = %u", $this->db->prefix('tplfile'), $this->db->quoteString($tpl_tplset), $this->db->quoteString($tpl_file), $this->db->quoteString($tpl_desc), $tpl_lastimported, $tpl_lastmodified, $tpl_id);
+ if (!$result = $this->db->queryF($sql)) {
+ return false;
+ }
+ if (isset($tpl_source) && $tpl_source != '') {
+ $sql = sprintf("UPDATE %s SET tpl_source = %s WHERE tpl_id = %u", $this->db->prefix('tplsource'), $this->db->quoteString($tpl_source), $tpl_id);
+ if (!$result = $this->db->queryF($sql)) {
+ return false;
+ }
+ }
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ function delete(&$tplfile)
+ {
+ if (strtolower(get_class($tplfile)) != 'xoopstplfile') {
+ return false;
+ }
+ $id = $tplfile->getVar('tpl_id');
+ $sql = sprintf("DELETE FROM %s WHERE tpl_id = %u", $this->db->prefix('tplfile'), $id);
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ $sql = sprintf("DELETE FROM %s WHERE tpl_id = %u", $this->db->prefix('tplsource'), $id);
+ $this->db->query($sql);
+ return true;
+ }
+
+ function getObjects($criteria = null, $getsource = false, $id_as_key = false)
+ {
+ $ret = array();
+ $limit = $start = 0;
+ if ($getsource) {
+ $sql = 'SELECT f.*, s.tpl_source FROM '.$this->db->prefix('tplfile').' f LEFT JOIN '.$this->db->prefix('tplsource').' s ON s.tpl_id=f.tpl_id';
+ } else {
+ $sql = 'SELECT * FROM '.$this->db->prefix('tplfile');
+ }
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere().' ORDER BY tpl_refid';
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ if (!$result) {
+ return $ret;
+ }
+ while ($myrow = $this->db->fetchArray($result)) {
+ $tplfile =& new XoopsTplfile();
+ $tplfile->assignVars($myrow);
+ if (!$id_as_key) {
+ $ret[] =& $tplfile;
+ } else {
+ $ret[$myrow['tpl_id']] =& $tplfile;
+ }
+ unset($tplfile);
+ }
+ return $ret;
+ }
+
+ function getCount($criteria = null)
+ {
+ $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('tplfile');
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ }
+ if (!$result =& $this->db->query($sql)) {
+ return 0;
+ }
+ list($count) = $this->db->fetchRow($result);
+ return $count;
+ }
+
+ function getModuleTplCount($tplset)
+ {
+ $ret = array();
+ $sql = "SELECT tpl_module, COUNT(tpl_id) AS count FROM ".$this->db->prefix('tplfile')." WHERE tpl_tplset='".$tplset."' GROUP BY tpl_module";
+ $result = $this->db->query($sql);
+ if (!$result) {
+ return $ret;
+ }
+ while ($myrow = $this->db->fetchArray($result)) {
+ if ($myrow['tpl_module'] != '') {
+ $ret[$myrow['tpl_module']] = $myrow['count'];
+ }
+ }
+ return $ret;
+ }
+
+ function find($tplset = null, $type = null, $refid = null, $module = null, $file = null, $getsource = false)
+ {
+ $criteria = new CriteriaCompo();
+ if (isset($tplset)) {
+ $criteria->add(new Criteria('tpl_tplset', $tplset));
+ }
+ if (isset($module)) {
+ $criteria->add(new Criteria('tpl_module', $module));
+ }
+ if (isset($refid)) {
+ $criteria->add(new Criteria('tpl_refid', $refid));
+ }
+ if (isset($file)) {
+ $criteria->add(new Criteria('tpl_file', $file));
+ }
+ if (isset($type)) {
+ if (is_array($type)) {
+ $criteria2 = new CriteriaCompo();
+ foreach ($type as $t) {
+ $criteria2->add(new Criteria('tpl_type', $t), 'OR');
+ }
+ $criteria->add($criteria2);
+ } else {
+ $criteria->add(new Criteria('tpl_type', $type));
+ }
+ }
+ return $this->getObjects($criteria, $getsource, false);
+ }
+
+ function templateExists($tplname, $tplset_name)
+ {
+ $criteria = new CriteriaCompo(new Criteria('tpl_file', trim($tplname)));
+ $criteria->add(new Criteria('tpl_tplset', trim($tplset_name)));
+ if ($this->getCount($criteria) > 0) {
+ return true;
+ }
+ return false;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/tplfile.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/tplset.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/tplset.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/tplset.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,198 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+class XoopsTplset extends XoopsObject
+{
+
+ function XoopsTplset()
+ {
+ $this->XoopsObject();
+ $this->initVar('tplset_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('tplset_name', XOBJ_DTYPE_OTHER, null, false);
+ $this->initVar('tplset_desc', XOBJ_DTYPE_TXTBOX, "", false, 255);
+ $this->initVar('tplset_credits', XOBJ_DTYPE_TXTAREA, "", false);
+ $this->initVar('tplset_created', XOBJ_DTYPE_INT, 0, false);
+ }
+}
+
+/**
+* XOOPS tplset handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS tplset class objects.
+*
+*
+* @author Kazumi Ono <onokazu at xoops.org>
+*/
+
+class XoopsTplsetHandler extends XoopsObjectHandler
+{
+
+ function &create($isNew = true)
+ {
+ $tplset =& new XoopsTplset();
+ if ($isNew) {
+ $tplset->setNew();
+ }
+ return $tplset;
+ }
+
+ function &get($id)
+ {
+ $id = intval($id);
+ $return = false;
+ if ($id > 0) {
+ $sql = 'SELECT * FROM '.$this->db->prefix('tplset').' WHERE tplset_id='.$id;
+ if ( $result = $this->db->query($sql) ) {
+ $numrows = $this->db->getRowsNum($result);
+ if ($numrows == 1) {
+ $return =& new XoopsTplset();
+ $return->assignVars( $this->db->fetchArray($result) );
+ }
+ }
+ }
+ return $return;
+ }
+
+ function &getByName($tplset_name)
+ {
+ $tplset_name = trim($tplset_name);
+ $return = false;
+ if ($tplset_name != '') {
+ $sql = 'SELECT * FROM '.$this->db->prefix('tplset').' WHERE tplset_name='.$this->db->quoteString($tplset_name);
+ if ( $result = $this->db->query($sql) ) {
+ $numrows = $this->db->getRowsNum($result);
+ if ($numrows == 1) {
+ $return =& new XoopsTplset();
+ $return->assignVars($this->db->fetchArray($result));
+ }
+ }
+ }
+ return $return;
+ }
+
+ function insert(&$tplset)
+ {
+ if (strtolower(get_class($tplset)) != 'xoopstplset') {
+ return false;
+ }
+ if (!$tplset->isDirty()) {
+ return true;
+ }
+ if (!$tplset->cleanVars()) {
+ return false;
+ }
+ foreach ($tplset->cleanVars as $k => $v) {
+ ${$k} = $v;
+ }
+ if ($tplset->isNew()) {
+ $tplset_id = $this->db->genId('tplset_tplset_id_seq');
+ $sql = sprintf("INSERT INTO %s (tplset_id, tplset_name, tplset_desc, tplset_credits, tplset_created) VALUES (%u, %s, %s, %s, %u)", $this->db->prefix('tplset'), $tplset_id, $this->db->quoteString($tplset_name), $this->db->quoteString($tplset_desc), $this->db->quoteString($tplset_credits), $tplset_created);
+ } else {
+ $sql = sprintf("UPDATE %s SET tplset_name = %s, tplset_desc = %s, tplset_credits = %s, tplset_created = %u WHERE tplset_id = %u", $this->db->prefix('tplset'), $this->db->quoteString($tplset_name), $this->db->quoteString($tplset_desc), $this->db->quoteString($tplset_credits), $tplset_created, $tplset_id);
+ }
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ if (empty($tplset_id)) {
+ $tplset_id = $this->db->getInsertId();
+ }
+ $tplset->assignVar('tplset_id', $tplset_id);
+ return true;
+ }
+
+ function delete(&$tplset)
+ {
+ if (strtolower(get_class($tplset)) != 'xoopstplset') {
+ return false;
+ }
+ $sql = sprintf("DELETE FROM %s WHERE tplset_id = %u", $this->db->prefix('tplset'), $tplset->getVar('tplset_id'));
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ $sql = sprintf("DELETE FROM %s WHERE tplset_name = %s", $this->db->prefix('imgset_tplset_link'), $this->db->quoteString($tplset->getVar('tplset_name')));
+ $this->db->query($sql);
+ return true;
+ }
+
+ function getObjects($criteria = null, $id_as_key = false)
+ {
+ $ret = array();
+ $limit = $start = 0;
+ $sql = 'SELECT * FROM '.$this->db->prefix('tplset');
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere().' ORDER BY tplset_id';
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ if (!$result) {
+ return $ret;
+ }
+ while ($myrow = $this->db->fetchArray($result)) {
+ $tplset = new XoopsTplset();
+ $tplset->assignVars($myrow);
+ if (!$id_as_key) {
+ $ret[] =& $tplset;
+ } else {
+ $ret[$myrow['tplset_id']] =& $tplset;
+ }
+ unset($tplset);
+ }
+ return $ret;
+ }
+
+
+ function getCount($criteria = null)
+ {
+ $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('tplset');
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ }
+ if (!$result =& $this->db->query($sql)) {
+ return 0;
+ }
+ list($count) = $this->db->fetchRow($result);
+ return $count;
+ }
+
+ function getList($criteria = null)
+ {
+ $ret = array();
+ $tplsets =& $this->getObjects($criteria, true);
+ foreach (array_keys($tplsets) as $i) {
+ $ret[$tplsets[$i]->getVar('tplset_name')] = $tplsets[$i]->getVar('tplset_name');
+ }
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/tplset.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/kernel/user.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/kernel/user.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/kernel/user.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,813 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for users
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ * @package kernel
+ */
+class XoopsUser extends XoopsObject
+{
+
+ /**
+ * Array of groups that user belongs to
+ * @var array
+ * @access private
+ */
+ var $_groups = array();
+ /**
+ * @var bool is the user admin?
+ * @access private
+ */
+ var $_isAdmin = null;
+ /**
+ * @var string user's rank
+ * @access private
+ */
+ var $_rank = null;
+ /**
+ * @var bool is the user online?
+ * @access private
+ */
+ var $_isOnline = null;
+
+ /**
+ * @var object reference to a {@link XoopsProfile} object
+ * @access private
+ */
+ var $_profile;
+
+ /**
+ * constructor
+ * @param array $id Array of key-value-pairs to be assigned to the user. (for backward compatibility only)
+ * @param int $id ID of the user to be loaded from the database.
+ */
+ function XoopsUser($id = null)
+ {
+ $this->initVar('uid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('loginname', XOBJ_DTYPE_TXTBOX, null, true, 25);
+ $this->initVar('uname', XOBJ_DTYPE_TXTBOX, null, true, 55);
+ $this->initVar('name', XOBJ_DTYPE_TXTBOX, "", false, 75);
+ $this->initVar('email', XOBJ_DTYPE_TXTBOX, null, true, 60);
+ $this->initVar('pass', XOBJ_DTYPE_TXTBOX, null, false, 32);
+ $this->initVar('rank', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('level', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('user_avatar', XOBJ_DTYPE_TXTBOX, "blank.gif", false, 30);
+ // for backward compatibility
+ if (!is_null($id)) {
+ if (is_array($id)) {
+ $this->assignVars($id);
+ } else {
+ $member_handler =& xoops_gethandler('member');
+ $user =& $member_handler->getUser($id);
+ foreach ($user->vars as $k => $v) {
+ $this->assignVar($k, $v['value']);
+ }
+ $this->_profile =& $user->getProfile();
+ }
+ }
+ else {
+ $profile_handler =& xoops_gethandler('profile');
+ $this->_profile =& $profile_handler->create();
+ $this->_profile->setNew();
+ $this->_profile->init($profile_handler->loadFields());
+ }
+ }
+
+ /**
+ * Assign values to attributes
+ *
+ * @param array $vars key => value pair array of values
+ *
+ * @return void
+ **/
+ function assignVars($vars) {
+ $uservars = array_keys($this->getVars());
+ foreach ($vars as $key => $value) {
+ if (in_array($key, $uservars)) {
+ $this->assignVar($key, $value);
+ }
+ /*
+ * Dynamic user profiles - Mith
+ */
+ else {
+ $this->_profile->assignVar($key, $value);
+ }
+ /*
+ * Dynamic user profiles end
+ */
+ }
+ }
+
+ /**
+ * Get user profile
+ *
+ * @return object
+ */
+ function getProfile() {
+ return $this->_profile;
+ }
+
+ /**
+ * returns a specific variable for the object in a proper format
+ *
+ * @access public
+ * @param string $key key of the object's variable to be returned
+ * @param string $format format to use for the output
+ * @return mixed formatted value of the variable
+ */
+ function getVar($key, $format = "s") {
+ $uservars = array_keys($this->getVars());
+ if (!in_array($key, $uservars)) {
+ return $this->_profile->getVar($key, $format);
+ }
+ return parent::getVar($key, $format);
+ }
+
+ /**
+ * assign a value to a variable
+ *
+ * @access public
+ * @param string $key name of the variable to assign
+ * @param mixed $value value to assign
+ * @param bool $not_gpc
+ */
+ function setVar($key, $value, $not_gpc = false) {
+ $uservars = array_keys($this->getVars());
+ if (!in_array($key, $uservars)) {
+ return $this->_profile->setVar($key, $value, $not_gpc);
+ }
+ return parent::setVar($key, $value, $not_gpc);
+ }
+
+
+ /**
+ * check if the user is a guest user
+ *
+ * @return bool returns false
+ *
+ */
+ function isGuest()
+ {
+ return false;
+ }
+
+
+ /**
+ * Updated by Catzwolf 11 Jan 2004
+ * find the username for a given ID
+ *
+ * @param int $userid ID of the user to find
+ * @param int $usereal switch for usename or realname
+ * @return string name of the user. name for "anonymous" if not found.
+ */
+ function getUnameFromId( $userid, $usereal = 0 )
+ {
+ $userid = intval($userid);
+ $usereal = intval($usereal);
+ if ($userid > 0) {
+ $member_handler =& xoops_gethandler('member');
+ $user =& $member_handler->getUser($userid);
+ if (is_object($user)) {
+ $ts =& MyTextSanitizer::getInstance();
+ if ( $usereal ) {
+ return $ts->htmlSpecialChars($user->getVar('name'));
+ } else {
+ return $ts->htmlSpecialChars($user->getVar('uname'));
+ }
+ }
+ }
+ return $GLOBALS['xoopsConfig']['anonymous'];
+ }
+ /**
+ * increase the number of posts for the user
+ *
+ * @deprecated
+ */
+ function incrementPost(){
+ $member_handler =& xoops_gethandler('member');
+ return $member_handler->updateUserByField($this, 'posts', $this->getVar('posts') + 1);
+ }
+ /**
+ * set the groups for the user
+ *
+ * @param array $groupsArr Array of groups that user belongs to
+ */
+ function setGroups($groupsArr)
+ {
+ if (is_array($groupsArr)) {
+ $this->_groups =& $groupsArr;
+ }
+ }
+ /**
+ * get the groups that the user belongs to
+ *
+ * @return array array of groups
+ */
+ function &getGroups()
+ {
+ if (empty($this->_groups)) {
+ $member_handler =& xoops_gethandler('member');
+ $this->_groups = $member_handler->getGroupsByUser($this->getVar('uid'));
+ }
+ return $this->_groups;
+ }
+ /**
+ * alias for {@link getGroups()}
+ * @see getGroups()
+ * @return array array of groups
+ * @deprecated
+ */
+ function &groups()
+ {
+ $return =& $this->getGroups();
+ return $return;
+ }
+ /**
+ * Is the user admin ?
+ *
+ * This method will return true if this user has admin rights for the specified module.<br />
+ * - If you don't specify any module ID, the current module will be checked.<br />
+ * - If you set the module_id to -1, it will return true if the user has admin rights for at least one module
+ *
+ * @param int $module_id check if user is admin of this module
+ * @return bool is the user admin of that module?
+ */
+ function isAdmin( $module_id = null ) {
+ if ( is_null( $module_id ) ) {
+ $module_id = isset($GLOBALS['xoopsModule']) ? $GLOBALS['xoopsModule']->getVar( 'mid', 'n' ) : 1;
+ } elseif ( intval($module_id) < 1 ) {
+ $module_id = 0;
+ }
+ if (is_null($this->_isAdmin) || !isset($this->_isAdmin[$module_id])) {
+ $moduleperm_handler =& xoops_gethandler('groupperm');
+ $groups = $this->getGroups();
+ if (count($groups) > 0 ) {
+ $this->_isAdmin[$module_id] = $moduleperm_handler->checkRight('module_admin', $module_id, $groups);
+ }
+ }
+ return $this->_isAdmin[$module_id];
+ }
+ /**
+ * get the user's rank
+ * @return array array of rank ID and title
+ */
+ function rank()
+ {
+ if (!isset($this->_rank)) {
+ $this->_rank = xoops_getrank($this->getVar('rank'), $this->getVar('posts'));
+ }
+ return $this->_rank;
+ }
+ /**
+ * is the user activated?
+ * @return bool
+ */
+ function isActive()
+ {
+ return ($this->getVar('level') > 0);
+ }
+
+ /**
+ * is the user disabled?
+ * @return bool
+ */
+ function isDisabled()
+ {
+ return ($this->getVar('level') == -1);
+ }
+
+ /**
+ * is the user currently logged in?
+ * @return bool
+ */
+ function isOnline()
+ {
+ if (!isset($this->_isOnline)) {
+ $onlinehandler =& xoops_gethandler('online');
+ $this->_isOnline = ($onlinehandler->getCount(new Criteria('online_uid', $this->getVar('uid'))) > 0) ? true : false;
+ }
+ return $this->_isOnline;
+ }
+ /**#@+
+ * specialized wrapper for {@link XoopsObject::getVar()}
+ *
+ * kept for compatibility reasons.
+ *
+ * @see XoopsObject::getVar()
+ * @deprecated
+ */
+ /**
+ * get the users UID
+ * @return int
+ */
+ function uid()
+ {
+ return $this->getVar("uid");
+ }
+
+ /**
+ * get the users name
+ * @param string $format format for the output, see {@link XoopsObject::getVar()}
+ * @return string
+ */
+ function name($format="S")
+ {
+ return $this->getVar("name", $format);
+ }
+
+ /**
+ * get the user's uname
+ * @param string $format format for the output, see {@link XoopsObject::getVar()}
+ * @return string
+ */
+ function uname($format="S")
+ {
+ return $this->getVar("uname", $format);
+ }
+
+ /**
+ * get the user's email
+ *
+ * @param string $format format for the output, see {@link XoopsObject::getVar()}
+ * @return string
+ */
+ function email($format="S")
+ {
+ return $this->getVar("email", $format);
+ }
+
+ function url($format="S")
+ {
+ return $this->getVar("url", $format);
+ }
+
+ function user_avatar($format="S")
+ {
+ return $this->getVar("user_avatar");
+ }
+
+ function user_regdate()
+ {
+ return $this->getVar("user_regdate");
+ }
+
+ function user_icq($format="S")
+ {
+ return $this->getVar("user_icq", $format);
+ }
+
+ function user_from($format="S")
+ {
+ return $this->getVar("user_from", $format);
+ }
+ function user_sig($format="S")
+ {
+ return $this->getVar("user_sig", $format);
+ }
+
+ function user_viewemail()
+ {
+ return $this->getVar("user_viewemail");
+ }
+
+ function actkey()
+ {
+ return $this->getVar("actkey");
+ }
+
+ function user_aim($format="S")
+ {
+ return $this->getVar("user_aim", $format);
+ }
+
+ function user_yim($format="S")
+ {
+ return $this->getVar("user_yim", $format);
+ }
+
+ function user_msnm($format="S")
+ {
+ return $this->getVar("user_msnm", $format);
+ }
+
+ function pass()
+ {
+ return $this->getVar("pass");
+ }
+
+ function posts()
+ {
+ return $this->getVar("posts");
+ }
+
+ function attachsig()
+ {
+ return $this->getVar("attachsig");
+ }
+
+ function level()
+ {
+ return $this->getVar("level");
+ }
+
+ function theme()
+ {
+ return $this->getVar("theme");
+ }
+
+ function timezone()
+ {
+ return $this->getVar("timezone_offset");
+ }
+
+ function umode()
+ {
+ return $this->getVar("umode");
+ }
+
+ function uorder()
+ {
+ return $this->getVar("uorder");
+ }
+
+ // RMV-NOTIFY
+ function notify_method()
+ {
+ return $this->getVar("notify_method");
+ }
+
+ function notify_mode()
+ {
+ return $this->getVar("notify_mode");
+ }
+
+ function user_occ($format="S")
+ {
+ return $this->getVar("user_occ", $format);
+ }
+
+ function bio($format="S")
+ {
+ return $this->getVar("bio", $format);
+ }
+
+ function user_intrest($format="S")
+ {
+ return $this->getVar("user_intrest", $format);
+ }
+
+ function last_login()
+ {
+ return $this->getVar("last_login");
+ }
+ /**#@-*/
+}
+
+/**
+ * Class that represents a guest user
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ * @package kernel
+ */
+class XoopsGuestUser extends XoopsUser
+{
+ /**
+ * check if the user is a guest user
+ *
+ * @return bool returns true
+ *
+ */
+ function isGuest()
+ {
+ return true;
+ }
+}
+
+
+/**
+* XOOPS user handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Kazumi Ono <onokazu at xoops.org>
+* @copyright copyright (c) 2000-2003 XOOPS.org
+* @package kernel
+*/
+class XoopsUserHandler extends XoopsPersistableObjectHandler
+{
+ /**
+ * Reference to the {@link XoopsProfileHandler} instance
+ */
+ var $_pHandler;
+ /**
+ * Constructor
+ **/
+ function XoopsUserHandler(&$db) {
+ $this->XoopsPersistableObjectHandler($db, 'users', 'XoopsUser', 'uid', 'uname');
+ $this->_pHandler =& xoops_gethandler('profile');
+ }
+
+ /**
+ * insert a new user in the database
+ *
+ * @param object $user reference to the {@link XoopsUser} object
+ * @param bool $force
+ * @return bool FALSE if failed, TRUE if already present and unchanged or successful
+ */
+ function insert(&$user, $force = false)
+ {
+ if (!parent::insert($user, $force)) {
+ return false;
+ }
+ $profile = $user->getProfile();
+ $profile->setVar('profileid', $user->getVar('uid'));
+
+ // save profile
+ if (!$this->_pHandler->insert($profile, $force)) {
+ foreach ($profile->getErrors() as $error) {
+ $user->setErrors($error);
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * delete a user from the database
+ *
+ * @param object $user reference to the user to delete
+ * @param bool $force
+ * @return bool FALSE if failed.
+ */
+ function delete(&$user, $force = false)
+ {
+
+ if (!parent::delete($user, $force)) {
+ return false;
+ }
+ // delete user profile
+ $profile =& $user->getProfile();
+ return $this->_pHandler->delete($profile, $force);
+ }
+
+ /**
+ * retrieve users from the database
+ *
+ * @param object $criteria {@link CriteriaElement} conditions to be met
+ * @param bool $id_as_key use the UID as key for the array?
+ * @param bool $as_object return array of objects or array of arrays?
+ * @return array array of {@link XoopsUser} objects
+ */
+ function getObjects($criteria = null, $id_as_key = false, $as_object = true)
+ {
+ if (is_null($criteria)) {
+ $criteria = new Criteria('uid', 0, '!=');
+ }
+ $ret = array();
+ $limit = $start = 0;
+ $sql = 'SELECT * FROM '.$this->db->prefix('users').' u, '.$this->_pHandler->table.' p WHERE u.'.$this->keyName.' = p.'.$this->_pHandler->keyName;
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $clause = $criteria->render();
+ if ($clause != "") {
+ $sql .= ' AND '.$clause;
+ }
+ if ($criteria->getSort() != '') {
+ $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
+ }
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ if (!$result) {
+ return $ret;
+ }
+ return $this->convertResultSet($result, $id_as_key, $as_object);
+ }
+
+ /**
+ * Convert a database resultset to a returnable array
+ *
+ * @param object $result database resultset
+ * @param bool $id_as_key
+ * @param bool $as_object
+ *
+ * @return array
+ */
+ function convertResultSet($result, $id_as_key = false, $as_object = true) {
+ $ret = array();
+ $fields = $this->_pHandler->loadFields();
+ while ($myrow = $this->db->fetchArray($result)) {
+ $obj =& $this->create(false);
+ $obj->_profile =& $this->_pHandler->create(false);
+ $obj->_profile->init($fields);
+ $obj->assignVars($myrow);
+ if (!$id_as_key) {
+ if ($as_object) {
+ $ret[] =& $obj;
+ }
+ else {
+ $ret[] = $obj->toArray();
+ }
+ } else {
+ if ($as_object) {
+ $ret[$myrow[$this->keyName]] =& $obj;
+ }
+ else {
+ $ret[$myrow[$this->keyName]] = $obj->toArray();
+ }
+ }
+ unset($obj);
+ }
+
+ return $ret;
+ }
+
+ /**
+ * count users matching a condition
+ *
+ * @param object $criteria {@link CriteriaElement} to match
+ * @return int count of users
+ */
+ function getCount($criteria = null)
+ {
+ $profile_handler =& xoops_gethandler('profile');
+ $sql = 'SELECT COUNT(*) FROM '.$this->table.' u, '.$profile_handler->table.' p WHERE u.'.$this->keyName.' = p.'.$this->_pHandler->keyName;
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $clause = $criteria->render();
+ if ($clause != "") {
+ $sql .= ' AND '.$clause;
+ }
+ }
+ $result = $this->db->query($sql);
+ if (!$result) {
+ return 0;
+ }
+ list($count) = $this->db->fetchRow($result);
+ return $count;
+ }
+
+ /**
+ * get a list of usernames and their IDs
+ *
+ * @param object $criteria {@link CriteriaElement} object
+ * @return array associative array of user-IDs and names
+ */
+ function getList($criteria = null, $limit = 0, $start = 0) {
+ $ret = array();
+ $profile_handler =& xoops_gethandler('profile');
+ $sql = 'SELECT '.$this->keyName.', '.$this->identifierName.' FROM '.$this->table.' u, '.$profile_handler->table.' p WHERE u.'.$this->keyName.' = p.'.$this->_pHandler->keyName;
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $clause = $criteria->render();
+ if ($clause != "") {
+ $sql .= ' AND '.$clause;
+ }
+ if ($criteria->getSort() != '') {
+ $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
+ }
+ else {
+ $sql .= ' ORDER BY '.$this->identifierName;
+ }
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ if (!$result) {
+ return $ret;
+ }
+
+ $myts =& MyTextSanitizer::getInstance();
+ while ($myrow = $this->db->fetchArray($result)) {
+ //identifiers should be textboxes, so sanitize them like that
+ $ret[$myrow[$this->keyName]] = $myts->htmlSpecialChars($myrow[$this->identifierName]);
+ }
+ return $ret;
+ }
+
+ /**
+ * delete users matching a set of conditions
+ *
+ * @param object $criteria {@link CriteriaElement}
+ * @return bool FALSE if deletion failed
+ */
+ function deleteAll($criteria = null)
+ {
+ $users = $this->getList($criteria);
+ $newcriteria = new Criteria('uid', "(".implode(',', array_keys($users)).")", "IN");
+ if (parent::deleteAll($newcriteria)) {
+ unset($newcriteria);
+ $newcriteria = new Criteria('profileid', "(".implode(',', array_keys($users)).")", "IN");
+ return $this->_pHandler->deleteAll($newcriteria);
+ }
+ return false;
+ }
+
+ /**
+ * Change a value for users with a certain criteria
+ *
+ * @param string $fieldname Name of the field
+ * @param string $fieldvalue Value to write
+ * @param object $criteria {@link CriteriaElement}
+ *
+ * @return bool
+ **/
+ function updateAll($fieldname, $fieldvalue, $criteria = null)
+ {
+ $profile_fields = array_keys($this->_pHandler->loadFields());
+ if (!in_array($fieldname, $profile_fields)) {
+ return parent::updateAll($fieldname, $fieldvalue, $criteria);
+ }
+ else {
+ return $this->_pHandler->updateAll($fieldname, $fieldvalue, $criteria);
+ }
+ }
+
+ /**
+ * log in a user - we need this instead of getObjects since the profile table may not be there, in the case of upgrading
+ *
+ * @param string $uname username as entered in the login form
+ * @param string $pwd password entered in the login form
+ * @param bool $md5 whether the password is already md5'ed
+ *
+ * @return object XoopsUser reference to the logged in user. FALSE if failed to log in
+ */
+ function &loginUser($uname, $pwd, $md5 = false) {
+ if (!$md5) {
+ $pwd = md5($pwd);
+ }
+ $criteria = new CriteriaCompo(new Criteria('loginname', $uname));
+ $criteria->add(new Criteria('pass', $pwd));
+
+ //First try with profile
+ $user = $this->getObjects($criteria);
+ if ($user != array() && is_object($user[0]) ) {
+ return $user[0];
+ }
+ //But profile will not work, when you are upgrading from XOOPS 2.0.x
+ //so we need to have this extra stuff or an admin would not be able to
+ //log in to upgrade the system.
+ //It will add another query to wrong logins, but that's not a big problem
+ $sql = "SELECT * FROM ".$this->table;
+ $sql .= " ".$criteria->renderWhere();
+ $result = $this->db->query($sql);
+ $user = $this->convertResultSet($result, false);
+ if (!$user || count($user) != 1) {
+ $return = false;
+ return $return;
+ }
+ return $user[0];
+ }
+
+ /**
+ * Update a user by field
+ *
+ * @param string $fieldName name of field to change
+ * @param mixed $fieldValue Value to set field to
+ * @param int $uid ID of user to modify
+ *
+ * @return bool
+ */
+ function updateUserByField($fieldName, $fieldValue, $uid) {
+ $fields = $this->_pHandler->loadFields();
+ if (in_array($fieldName, array_keys($fields))) {
+ $keyName = 'profileid';
+ }
+ else {
+ $keyName = 'uid';
+ }
+ $criteria = new Criteria($keyName, $uid);
+ return $this->updateAll($fieldName, $fieldValue, $criteria);
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/kernel/user.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/admin.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/admin.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/admin.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,16 @@
+<?php
+// $Id$
+//%%%%%% File Name admin.php %%%%%
+define("_AD_NORIGHT","You don't have the right to access this area");
+define("_AD_ACTION","Action");
+define("_AD_EDIT","Edit");
+define("_AD_DELETE","Delete");
+define("_AD_LASTTENUSERS","Last 10 registered users");
+define("_AD_NICKNAME","Nickname");
+define("_AD_EMAIL","Email");
+define("_AD_AVATAR","Avatar");
+define("_AD_REGISTERED","Registered"); //Registered Date
+define('_AD_PRESSGEN', 'This is your first time to enter the administration section. Press the button below to proceed.');
+define('_AD_LOGINADMIN', 'Logging you in..');
+define('_AD_NAVIGATION', "Navigation");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/admin.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/calendar.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/calendar.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/calendar.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,34 @@
+<?php
+// $Id$
+//%%%%% Time Zone %%%%
+define("_CAL_SUNDAY", "Sunday");
+define("_CAL_MONDAY", "Monday");
+define("_CAL_TUESDAY", "Tuesday");
+define("_CAL_WEDNESDAY", "Wednesday");
+define("_CAL_THURSDAY", "Thursday");
+define("_CAL_FRIDAY", "Friday");
+define("_CAL_SATURDAY", "Saturday");
+define("_CAL_JANUARY", "January");
+define("_CAL_FEBRUARY", "February");
+define("_CAL_MARCH", "March");
+define("_CAL_APRIL", "April");
+define("_CAL_MAY", "May");
+define("_CAL_JUNE", "June");
+define("_CAL_JULY", "July");
+define("_CAL_AUGUST", "August");
+define("_CAL_SEPTEMBER", "September");
+define("_CAL_OCTOBER", "October");
+define("_CAL_NOVEMBER", "November");
+define("_CAL_DECEMBER", "December");
+define("_CAL_TGL1STD", "Toggle first day of week");
+define("_CAL_PREVYR", "Prev. year (hold for menu)");
+define("_CAL_PREVMNTH", "Prev. month (hold for menu)");
+define("_CAL_GOTODAY", "Go Today");
+define("_CAL_NXTMNTH", "Next month (hold for menu)");
+define("_CAL_NEXTYR", "Next year (hold for menu)");
+define("_CAL_SELDATE", "Select date");
+define("_CAL_DRAGMOVE", "Drag to move");
+define("_CAL_TODAY", "Today");
+define("_CAL_DISPM1ST", "Display Monday first");
+define("_CAL_DISPS1ST", "Display Sunday first");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/calendar.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/comment.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/comment.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/comment.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,40 @@
+<?php
+// $Id$
+define('_CM_TITLE','Title');
+define('_CM_MESSAGE','Message');
+define('_CM_DOSMILEY','Enable Smiley Icons');
+define('_CM_DOHTML','Enable HTML Tags');
+define('_CM_DOAUTOWRAP','Auto wrap lines');
+define('_CM_DOXCODE','Enable XOOPS Codes');
+define('_CM_REFRESH','Refresh');
+define('_CM_PENDING','Pending');
+define('_CM_HIDDEN','Hidden');
+define('_CM_ACTIVE','Active');
+define('_CM_STATUS','Status');
+define('_CM_POSTCOMMENT','Post Comment');
+define('_CM_REPLIES','Replies');
+define('_CM_PARENT','Parent');
+define('_CM_TOP','Top');
+define('_CM_BOTTOM','Bottom');
+define('_CM_ONLINE','Online!');
+define('_CM_POSTED','Posted'); // Posted date
+define('_CM_UPDATED', 'Updated');
+define('_CM_THREAD','Thread');
+define('_CM_POSTER','Poster');
+define('_CM_JOINED','Joined');
+define('_CM_POSTS','Posts');
+define('_CM_FROM','From');
+define('_CM_COMDELETED', 'Comment(s) deleted.');
+define('_CM_COMDELETENG', 'Could not delete comment.');
+define('_CM_DELETESELECT' , 'Delete all its child comments?');
+define('_CM_DELETEONE' , 'No, delete only this comment');
+define('_CM_DELETEALL', 'Yes, delete all');
+define('_CM_THANKSPOST', 'Thanks for posting!');
+define('_CM_NOTICE', "The comments are owned by the poster. We aren't responsible for their content.");
+define('_CM_COMRULES','Comment Rules');
+define('_CM_COMAPPROVEALL','Comments are always approved');
+define('_CM_COMAPPROVEUSER','Comments by registered users are always approved');
+define('_CM_COMAPPROVEADMIN','All comments need to be approved by administrator');
+define('_CM_COMANONPOST','Allow anonymous post in comments?');
+define('_CM_COMNOCOM','Disable comments');
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/comment.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/error.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/error.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/error.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,42 @@
+<?php
+define("_ER_UP_MIMETYPELOAD", "Error loading mimetypes definition");
+define("_ER_UP_FILENOTFOUND", "File not found");
+define("_ER_UP_INVALIDFILESIZE", "Invalid File Size");
+define("_ER_UP_FILENAMEEMPTY", "Filename Is Empty");
+define("_ER_UP_NOFILEUPLOADED", "No file uploaded");
+define("_ER_UP_ERROROCCURRED", "Error occurred: Error #%s");
+define("_ER_UP_UPLOADDIRNOTSET", "Upload directory not set");
+define("_ER_UP_FAILEDOPENDIR", "Failed opening directory: %s");
+define("_ER_UP_FAILEDOPENDIRWRITE", "Failed opening directory with write permission: %s");
+define("_ER_UP_FILESIZETOOLARGE", "File size too large: %u");
+define("_ER_UP_FILEWIDTHTOOLARGE", "File width must be smaller than %u");
+define("_ER_UP_FILEHEIGHTTOOLARGE", "File height must be smaller than %u");
+define("_ER_UP_MIMETYPENOTALLOWED", "MIME type not allowed: %s");
+define("_ER_UP_FAILEDUPLOADFILE", "Failed uploading file: %s");
+define("_ER_UP_FAILEDFETCHIMAGESIZE", "Failed fetching image size of %s, skipping max dimension check..");
+define("_ER_UP_UNKNOWNFILETYPEREJECTED", "Unknown filetype rejected");
+define("_ER_UP_ERRORSRETURNED", "Errors Returned While Uploading");
+
+define("_ER_OB_ISREQUIRED", "%s is required.");
+define("_ER_OB_MUSTBESHORTER", "%s must be shorter than %u characters.");
+define("_ER_OB_INVALIDEMAIL", "Invalid Email");
+
+define("_ER_SEC_TOKENEXPIRED", "Valid token expired");
+define("_ER_SEC_NOTOKENFOUND", "No valid security token found in session");
+
+define('_ER_US_INVALIDMAIL','ERROR: Invalid email');
+define('_ER_US_EMAILNOSPACES','ERROR: Email addresses do not contain spaces.');
+define('_ER_US_INVALIDNICKNAME','ERROR: Invalid Username');
+define('_ER_US_NICKNAMETOOLONG','Username is too long. It must be less than %s characters.');
+define('_ER_US_NICKNAMETOOSHORT','Username is too short. It must be more than %s characters.');
+define('_ER_US_NAMERESERVED','ERROR: Name is reserved.');
+define('_ER_US_NICKNAMENOSPACES','There cannot be any spaces in the Username.');
+define('_ER_US_NICKNAMETAKEN','ERROR: Username taken.');
+define('_ER_US_EMAILTAKEN','ERROR: Email address already registered.');
+define('_ER_US_ENTERPWD','ERROR: You must provide a password.');
+define('_ER_US_SORRYNOTFOUND','Sorry, no corresponding user info was found.');
+define('_ER_US_PASSNOTSAME','Both passwords are different. They must be identical.');
+define('_ER_US_PWDTOOSHORT','Sorry, your password must be at least <b>%s</b> characters long.');
+
+define("_ER_MAIL_PMMODULENOEXIST", "You need to install the PM module to be able to send PM's");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/error.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/global.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/global.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/global.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,218 @@
+<?php
+// $Id$
+//%%%%%% File Name mainfile.php %%%%%
+define("_PLEASEWAIT","Please Wait");
+define("_FETCHING","Loading...");
+define("_TAKINGBACK","Taking you back to where you were....");
+define("_LOGOUT","Logout");
+define("_SUBJECT","Subject");
+define("_MESSAGEICON","Message Icon");
+define("_COMMENTS","Comments");
+define("_POSTANON","Post Anonymously");
+define("_DISABLESMILEY","Disable smiley");
+define("_DISABLEHTML","Disable html");
+define("_PREVIEW","Preview");
+
+define("_GO","Go!");
+define("_NESTED","Nested");
+define("_NOCOMMENTS","No Comments");
+define("_FLAT","Flat");
+define("_THREADED","Threaded");
+define("_OLDESTFIRST","Oldest First");
+define("_NEWESTFIRST","Newest First");
+define("_MORE","more...");
+define("_MULTIPAGE","To have your article span multiple pages, insert the word <font color=red>[pagebreak]</font> (with brackets) in the article.");
+define("_IFNOTRELOAD","If the page does not automatically reload, please click <a href='%s'>here</a>");
+define("_WARNINSTALL2","WARNING: Directory %s exists on your server. <br />Please remove this directory for security reasons.");
+define("_WARNINWRITEABLE","WARNING: File %s is writeable by the server. <br />Please change the permission of this file for security reasons.<br /> in Unix (444), in Win32 (read-only)");
+
+//%%%%%% File Name themeuserpost.php %%%%%
+define("_PROFILE","Profile");
+define("_POSTEDBY","Posted by");
+define("_VISITWEBSITE","Visit Website");
+define("_SENDPMTO","Send Private Message to %s");
+define("_SENDEMAILTO","Send Email to %s");
+define("_ADD","Add");
+define("_REPLY","Reply");
+define("_DATE","Date"); // Posted date
+
+//%%%%%% File Name admin_functions.php %%%%%
+define("_MAIN","Main");
+define("_MANUAL","Manual");
+define("_INFO","Info");
+define("_CPHOME","Control Panel Home");
+define("_YOURHOME","Home Page");
+
+//%%%%%% File Name misc.php (who's-online popup) %%%%%
+define("_WHOSONLINE","Who's Online");
+define('_GUESTS', 'Guests');
+define('_MEMBERS', 'Members');
+define("_ONLINEPHRASE","<b>%s</b> user(s) are online");
+define("_ONLINEPHRASEX","<b>%s</b> user(s) are browsing <b>%s</b>");
+define("_CLOSE","Close"); // Close window
+
+//%%%%%% File Name module.textsanitizer.php %%%%%
+define("_QUOTEC","Quote:");
+
+//%%%%%% File Name admin.php %%%%%
+define("_NOPERM","Sorry, you don't have the permission to access this area.");
+
+//%%%%% Common Phrases %%%%%
+define("_NO","No");
+define("_YES","Yes");
+define("_EDIT","Edit");
+define("_DELETE","Delete");
+define("_SUBMIT","Submit");
+define("_MODULENOEXIST","Selected module does not exist!");
+define("_ALIGN","Align");
+define("_LEFT","Left");
+define("_CENTER","Center");
+define("_RIGHT","Right");
+define("_FORM_ENTER", "Please enter %s");
+// %s represents file name
+define("_MUSTWABLE","File %s must be writable by the server!");
+// Module info
+define('_PREFERENCES', 'Preferences');
+define("_VERSION", "Version");
+define("_DESCRIPTION", "Description");
+define("_ERRORS", "Errors");
+define("_NONE", "None");
+define('_ON','on');
+define('_READS','reads');
+define('_WELCOMETO','Welcome to %s');
+define('_SEARCH','Search');
+define('_ALL', 'All');
+define('_TITLE', 'Title');
+define('_OPTIONS', 'Options');
+define('_QUOTE', 'Quote');
+define('_LIST', 'List');
+define('_LOGIN','User Login');
+define('_USERNAME','Username: ');
+define('_PASSWORD','Password: ');
+define("_SELECT","Select");
+define("_IMAGE","Image");
+define("_SEND","Send");
+define("_CANCEL","Cancel");
+define("_ASCENDING","Ascending order");
+define("_DESCENDING","Descending order");
+define('_BACK', 'Back');
+define('_NOTITLE', 'No title');
+
+/* Image manager */
+define('_IMGMANAGER','Image Manager');
+define('_NUMIMAGES', '%s images');
+define('_ADDIMAGE','Add Image File');
+define('_IMAGENAME','Name:');
+define('_IMGMAXSIZE','Max size allowed (bytes):');
+define('_IMGMAXWIDTH','Max width allowed (pixels):');
+define('_IMGMAXHEIGHT','Max height allowed (pixels):');
+define('_IMAGECAT','Category:');
+define('_IMAGEFILE','Image file:');
+define('_IMGWEIGHT','Display order in image manager:');
+define('_IMGDISPLAY','Display this image?');
+define('_IMAGEMIME','MIME type:');
+define('_FAILFETCHIMG', 'Could not get uploaded file %s');
+define('_FAILSAVEIMG', 'Failed storing image %s into the database');
+define('_NOCACHE', 'No Cache');
+define('_CLONE', 'Clone');
+
+//%%%%% File Name class/xoopsform/formmatchoption.php %%%%%
+define("_STARTSWITH", "Starts with");
+define("_ENDSWITH", "Ends with");
+define("_MATCHES", "Matches");
+define("_CONTAINS", "Contains");
+
+//%%%%%% File Name commentform.php %%%%%
+define("_REGISTER","Register");
+
+//%%%%%% File Name xoopscodes.php %%%%%
+define("_SIZE","SIZE"); // font size
+define("_FONT","FONT"); // font family
+define("_COLOR","COLOR"); // font color
+define("_EXAMPLE","SAMPLE");
+define("_ENTERURL","Enter the URL of the link you want to add:");
+define("_ENTERWEBTITLE","Enter the web site title:");
+define("_ENTERIMGURL","Enter the URL of the image you want to add.");
+define("_ENTERIMGPOS","Now, enter the position of the image.");
+define("_IMGPOSRORL","'R' or 'r' for right, 'L' or 'l' for left, or leave it blank.");
+define("_ERRORIMGPOS","ERROR! Enter the position of the image.");
+define("_ENTEREMAIL","Enter the email address you want to add.");
+define("_ENTERCODE","Enter the codes that you want to add.");
+define("_ENTERQUOTE","Enter the text that you want to be quoted.");
+define("_ENTERTEXTBOX","Please input text into the textbox.");
+define("_ALLOWEDCHAR","Allowed max chars length: ");
+define("_CURRCHAR","Current chars length: ");
+define("_PLZCOMPLETE","Please complete the subject and message fields.");
+define("_MESSAGETOOLONG","Your message is too long.");
+
+//%%%%% TIME FORMAT SETTINGS %%%%%
+define('_SECOND', '1 second');
+define('_SECONDS', '%s seconds');
+define('_MINUTE', '1 minute');
+define('_MINUTES', '%s minutes');
+define('_HOUR', '1 hour');
+define('_HOURS', '%s hours');
+define('_DAY', '1 day');
+define('_DAYS', '%s days');
+define('_WEEK', '1 week');
+define('_MONTH', '1 month');
+
+define("_DATESTRING","Y/n/j G:i:s");
+define("_MEDIUMDATESTRING","Y/n/j G:i");
+define("_SHORTDATESTRING","Y/n/j");
+// !!IMPORTANT!! insert '\' before any char among reserved chars: "a", "A","B","c","d","D","F","g","G","h","H","i","I","j","l","L","m","M","n","O","r","s","S","t","T","U","w","W","Y","y","z","Z"
+// insert double '\' before 't', 'r', 'n'
+define("_TODAY", "\To\d\a\y G:i:s");
+define("_YESTERDAY", "\Ye\s\\te\\r\d\a\y G:i:s");
+define("_MONTHDAY", "n/j G:i:s");
+define("_YEARMONTHDAY", "Y/n/j G:i");
+/*
+The following characters are recognized in the format string:
+a - "am" or "pm"
+A - "AM" or "PM"
+d - day of the month, 2 digits with leading zeros; i.e. "01" to "31"
+D - day of the week, textual, 3 letters; i.e. "Fri"
+F - month, textual, long; i.e. "January"
+h - hour, 12-hour format; i.e. "01" to "12"
+H - hour, 24-hour format; i.e. "00" to "23"
+g - hour, 12-hour format without leading zeros; i.e. "1" to "12"
+G - hour, 24-hour format without leading zeros; i.e. "0" to "23"
+i - minutes; i.e. "00" to "59"
+j - day of the month without leading zeros; i.e. "1" to "31"
+l (lowercase 'L') - day of the week, textual, long; i.e. "Friday"
+L - boolean for whether it is a leap year; i.e. "0" or "1"
+m - month; i.e. "01" to "12"
+n - month without leading zeros; i.e. "1" to "12"
+M - month, textual, 3 letters; i.e. "Jan"
+s - seconds; i.e. "00" to "59"
+S - English ordinal suffix, textual, 2 characters; i.e. "th", "nd"
+t - number of days in the given month; i.e. "28" to "31"
+T - Timezone setting of this machine; i.e. "MDT"
+U - seconds since the epoch
+w - day of the week, numeric, i.e. "0" (Sunday) to "6" (Saturday)
+Y - year, 4 digits; i.e. "1999"
+y - year, 2 digits; i.e. "99"
+z - day of the year; i.e. "0" to "365"
+Z - timezone offset in seconds (i.e. "-43200" to "43200")
+*/
+
+
+//%%%%% LANGUAGE SPECIFIC SETTINGS %%%%%
+define('_CHARSET', 'ISO-8859-1');
+define('_LANGCODE', 'en');
+
+// change 0 to 1 if this language is a multi-bytes language
+define("XOOPS_USE_MULTIBYTES", "0");
+
+// Error messaging
+define("_NOERRORMESSAGE", "No Error Message Specified");
+
+// Added in XOOPS 2.2
+define("_SELECTEDITOR","Select editor");
+
+define("_REMOVE", "Remove");
+define("_REQUIRED", "Required");
+
+// Used for "theme" type profile field
+define("_SITEDEFAULT", "Site Default");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/global.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/local.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/local.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/local.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,102 @@
+<?php
+// $Id$
+
+// Local handler for string and encoding
+class XoopsLocal
+{
+ // localized substr
+ function &substr($str, $start, $length, $trimmarker = '...')
+ {
+ if ( !XOOPS_USE_MULTIBYTES ) {
+ return ( strlen($str) - $start <= $length ) ? substr( $str, $start, $length ) : substr( $str, $start, $length - strlen($trimmarker) ) . $trimmarker;
+ }
+ if (function_exists('mb_internal_encoding') && @mb_internal_encoding(_CHARSET)) {
+ $str2 = mb_strcut( $str , $start , $length - strlen( $trimmarker ) );
+ return $str2 . ( mb_strlen($str)!=mb_strlen($str2) ? $trimmarker : '' );
+ }
+ }
+
+ function &utf8_encode(&$text)
+ {
+ $text = XoopsLocal::convert_encoding($text, 'utf-8');
+ return $text;
+ }
+
+ function &convert_encoding(&$text, $to='utf-8', $from='')
+ {
+ if(empty($text)) {
+ return $text;
+ }
+ if(empty($from)) $from = _CHARSET;
+ if (empty($to) || !strcasecmp($to, $from)) return $text;
+
+ if(XOOPS_USE_MULTIBYTES && function_exists('mb_convert_encoding')) $converted_text = @mb_convert_encoding($text, $to, $from);
+ else
+ if(function_exists('iconv')) $converted_text = @iconv($from, $to . "//TRANSLIT", $text);
+ $text = empty($converted_text)?$text:$converted_text;
+
+ return $text;
+ }
+
+ function &trim($text)
+ {
+ return trim($text);
+ }
+
+ /*
+ * Function to display formatted times in user timezone
+ */
+ function formatTimestamp($time, $format="l", $timeoffset="")
+ {
+ global $xoopsConfig, $xoopsUser;
+ $usertimestamp = xoops_getUserTimestamp($time, $timeoffset);
+ switch (strtolower($format)) {
+ case 's':
+ $datestring = _SHORTDATESTRING;
+ break;
+ case 'm':
+ $datestring = _MEDIUMDATESTRING;
+ break;
+ case 'mysql':
+ $datestring = "Y-m-d H:i:s";
+ break;
+ case 'rss':
+ $datestring = "r";
+ break;
+ case 'l':
+ $datestring = _DATESTRING;
+ break;
+ case 'c':
+ case 'custom':
+ if(date("Ymd", $usertimestamp) == date("Ymd")){
+ $datestring = _TODAY;
+ }elseif(date("Ymd", $usertimestamp+24*60*60) == date("Ymd")){
+ $datestring = _YESTERDAY;
+ }elseif(date("Y", $usertimestamp) == date("Y")){
+ $datestring = _MONTHDAY;
+ }else{
+ $datestring = _YEARMONTHDAY;
+ }
+ break;
+ default:
+ if ($format != '') {
+ $datestring = $format;
+ } else {
+ $datestring = _DATESTRING;
+ }
+ break;
+ }
+ return ucfirst(date($datestring, $usertimestamp));
+ }
+
+
+ // adding your new functions
+ // calling the function:
+ // Method 1: echo xoops_local("hello", "Some greeting words");
+ // Method 2: echo XoopsLocal::hello("Some greeting words");
+ function &hello($text)
+ {
+ return "<div>Hello, ".$text."</div>";
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/local.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,10 @@
+<?php
+define("_MAIL_MSGBODY", "Message body is not set.");
+define("_MAIL_FAILOPTPL", "Failed opening template file.");
+define("_MAIL_FNAMENG", "From Name is not set.");
+define("_MAIL_FEMAILNG", "From Email is not set.");
+define("_MAIL_SENDMAILNG", "Could not send mail to %s.");
+define("_MAIL_MAILGOOD", "Mail sent to %s.");
+define("_MAIL_SENDPMNG", "Could not send private message to %s.");
+define("_MAIL_PMGOOD", "Private message sent to %s.");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/activated.tpl
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/activated.tpl 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/activated.tpl 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,12 @@
+Hello {X_UNAME},
+
+Your new account at {SITENAME} has been activated by the administrator.
+
+You can now login from the following URL with the password you have provided upon registration.
+
+{SITEURL}user.php
+
+-----------
+{SITENAME} ({SITEURL})
+webmaster
+{ADMINMAIL}
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/activated.tpl
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/adminactivate.tpl
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/adminactivate.tpl 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/adminactivate.tpl 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,11 @@
+Hello {X_UNAME},
+
+A new user {USERNAME} ({USEREMAIL}) has just registered an account at {SITENAME}.
+Clicking on the link below will activate the account of this user:
+
+{USERACTLINK}
+
+-----------
+{SITENAME} ({SITEURL})
+webmaster
+{ADMINMAIL}
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/adminactivate.tpl
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/comment_notify.tpl
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/comment_notify.tpl 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/comment_notify.tpl 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,20 @@
+Hello {X_UNAME},
+
+A comment has been added to the {X_ITEM_TYPE} "{X_ITEM_NAME}" you are monitoring in the {X_MODULE} module at our site.
+
+You can view the comment here:
+{X_COMMENT_URL}
+
+-----------
+
+You are receiving this message because you selected to be notified when comments are added to this {X_ITEM_TYPE}.
+
+If this is an error or you wish not to receive further such notifications, please update your subscriptions by visiting the link below:
+{X_UNSUBSCRIBE_URL}
+
+Please do not reply to this message.
+
+-----------
+{X_SITENAME} ({X_SITEURL})
+webmaster
+{X_ADMINMAIL}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/comment_notify.tpl
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/commentsubmit_notify.tpl
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/commentsubmit_notify.tpl 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/commentsubmit_notify.tpl 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,20 @@
+Hello {X_UNAME},
+
+A comment has been submitted (but not yet approved) to the {X_ITEM_TYPE} "{X_ITEM_NAME}" you are monitoring in the {X_MODULE} module at our site.
+
+You can view the comment here (if you have permission):
+{X_COMMENT_URL}
+
+-----------
+
+You are receiving this message because you selected to be notified when comments are submitted to this {X_ITEM_TYPE}.
+
+If this is an error or you wish not to receive further such notifications, please update your subscriptions by visiting the link below:
+{X_UNSUBSCRIBE_URL}
+
+Please do not reply to this message.
+
+-----------
+{X_SITENAME} ({X_SITEURL})
+webmaster
+{X_ADMINMAIL}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/commentsubmit_notify.tpl
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/default_notify.tpl
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/default_notify.tpl 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/default_notify.tpl 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,20 @@
+Hello {X_UNAME},
+
+The event {X_NOTIFY_EVENT} has occurred to the {X_ITEM_TYPE} "{X_ITEM_TILE}" you are monitoring in the {X_MODULE} module at our site.
+
+You can view the {X_ITEM_TYPE} here:
+{X_ITEM_URL}
+
+-----------
+
+You have subscribed to receive notifications of this sort.
+
+If this is an error or you wish not to receive further such notifications, please update your subscriptions by visiting the link below:
+{X_UNSUBSCRIBE_URL}
+
+Please do not reply to this message.
+
+-----------
+{X_SITENAME} ({X_SITEURL})
+webmaster
+{X_ADMINMAIL}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/default_notify.tpl
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/lostpass1.tpl
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/lostpass1.tpl 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/lostpass1.tpl 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,13 @@
+Hello {X_UNAME},
+
+A web user from {IP} has just requested a new password for your account at {SITENAME}.
+You can get your new password by clicking on the link below:
+
+{NEWPWD_LINK}
+
+If you didn't ask for this, don't worry. Just delete this Email.
+
+-----------
+{SITENAME} ({SITEURL})
+webmaster
+{ADMINMAIL}
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/lostpass1.tpl
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/lostpass2.tpl
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/lostpass2.tpl 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/lostpass2.tpl 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,15 @@
+Hello {X_UNAME},
+
+A web user from {IP} has just requested that password be sent.
+Here are your login details at {SITENAME}.
+
+Username: {LOGINNAME}
+New Password: {NEWPWD}
+
+You can change it after you login at {SITEURL}user.php.
+If you didn't ask for this, don't worry. You are seeing this message, not 'them'. If this was an error, we are really sorry but please login with your new password.
+
+-----------
+{SITENAME} ({SITEURL})
+webmaster
+{ADMINMAIL}
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/lostpass2.tpl
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/register.tpl
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/register.tpl 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/register.tpl 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,21 @@
+Hello {X_UNAME},
+
+Thanks for subscribing to {SITENAME}. As a registered member your can:
+- Send private messages among members
+- Participate in discussion boards
+- Get the latest news
+- Submit content
+- Much, much more....
+
+The email address ({X_UEMAIL}) has been used to register an account.
+
+To become a member of {SITENAME}, please confirm your
+request by clicking on the link below:
+
+{X_UACTLINK}
+
+-----------
+Best Regards
+{SITENAME}
+({SITEURL})
+{ADMINMAIL}
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/register.tpl
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/tellfriend.tpl
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/tellfriend.tpl 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/tellfriend.tpl 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,11 @@
+Hello {FRIEND_NAME},
+
+Your friend {YOUR_NAME} liked our site and wanted to show it to you.
+
+Site Name: {SITENAME}
+Site URL: {SITEURL}
+
+-----------
+{SITENAME} ({SITEURL})
+webmaster
+{ADMINMAIL}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/mail_template/tellfriend.tpl
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/misc.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/misc.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/misc.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,24 @@
+<?php
+// $Id$
+define("_MSC_YOURNAMEC","Your Name: ");
+define("_MSC_YOUREMAILC","Your Email: ");
+define("_MSC_FRIENDNAMEC","Friend Name: ");
+define("_MSC_FRIENDEMAILC","Friend Email: ");
+define("_MSC_RECOMMENDSITE","Recommend this Site to a Friend");
+// %s is your site name
+define("_MSC_INTSITE","Interesting Site: %s");
+define("_MSC_REFERENCESENT","The reference to our site has been sent to your friend. Thanks!");
+define("_MSC_ENTERYNAME","Please enter your name");
+define("_MSC_ENTERFNAME","Please enter your friend's name");
+define("_MSC_ENTERFMAIL","Please enter your friend's email address");
+define("_MSC_NEEDINFO","You need to enter required info!");
+define("_MSC_INVALIDEMAIL1","The email address you provided is not a valid address.");
+define("_MSC_INVALIDEMAIL2","Please check the address and try again.");
+
+define("_MSC_AVAVATARS","Available Avatars");
+
+define("_MSC_SMILIES","Smilies");
+define("_MSC_CLICKASMILIE","Click a smilie to insert it into your message.");
+define("_MSC_CODE","Code");
+define("_MSC_EMOTION","Emotion");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/misc.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/notification.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/notification.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/notification.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,88 @@
+<?php
+// $Id$
+
+// RMV-NOTIFY
+
+// Text for various templates...
+
+define ('_NOT_NOTIFICATIONOPTIONS', 'Notification Options');
+define ('_NOT_UPDATENOW', 'Update Now');
+define ('_NOT_UPDATEOPTIONS', 'Update Notification Options');
+
+define ('_NOT_CLEAR', 'Clear');
+define ('_NOT_CHECKALL', 'Check All');
+define ('_NOT_MODULE', 'Module');
+define ('_NOT_CATEGORY', 'Category');
+define ('_NOT_ITEMID', 'ID');
+define ('_NOT_ITEMNAME', 'Name');
+define ('_NOT_EVENT', 'Event');
+define ('_NOT_EVENTS', 'Events');
+define ('_NOT_ACTIVENOTIFICATIONS', 'Active Notifications');
+define ('_NOT_NAMENOTAVAILABLE', 'Name Not Available');
+// RMV-NEW : TODO: remove NAMENOTAVAILBLE above
+define ('_NOT_ITEMNAMENOTAVAILABLE', 'Item Name Not Available');
+define ('_NOT_ITEMTYPENOTAVAILABLE', 'Item Type Not Available');
+define ('_NOT_ITEMURLNOTAVAILABLE', 'Item URL Not Available');
+define ('_NOT_DELETINGNOTIFICATIONS', 'Deleting Notifications');
+define ('_NOT_DELETESUCCESS', 'Notification(s) deleted successfully.');
+define ('_NOT_UPDATEOK', 'Notification options updated');
+define ('_NOT_NOTIFICATIONMETHODIS', 'Notification method is');
+define ('_NOT_EMAIL', 'email');
+define ('_NOT_PM', 'private message');
+define ('_NOT_DISABLE', 'disabled');
+define ('_NOT_CHANGE', 'Change');
+
+define ('_NOT_NOACCESS', 'You do not have permission to access this page.');
+
+// Text for module config options
+
+define ('_NOT_ENABLE', 'Enable');
+define ('_NOT_NOTIFICATION', 'Notification');
+
+define ('_NOT_CONFIG_ENABLED', 'Enable Notification');
+define ('_NOT_CONFIG_ENABLEDDSC', 'This module allows users to select to be notified when certain events occur. Choose "yes" to enable this feature.');
+
+define ('_NOT_CONFIG_EVENTS', 'Enable Specific Events');
+define ('_NOT_CONFIG_EVENTSDSC', 'Select which notification events to which your users may subscribe.');
+
+define ('_NOT_CONFIG_ENABLE', 'Enable Notification');
+define ('_NOT_CONFIG_ENABLEDSC', 'This module allows users to be notified when certain events occur. Select if users should be presented with notification options in a Block (Block-style), within the module (Inline-style), or both. For block-style notification, the Notification Options block must be enabled for this module.');
+define ('_NOT_CONFIG_DISABLE', 'Disable Notification');
+define ('_NOT_CONFIG_ENABLEBLOCK', 'Enable only Block-style');
+define ('_NOT_CONFIG_ENABLEINLINE', 'Enable only Inline-style');
+define ('_NOT_CONFIG_ENABLEBOTH', 'Enable Notification (both styles)');
+
+// For notification about comment events
+
+define ('_NOT_COMMENT_NOTIFY', 'Comment Added');
+define ('_NOT_COMMENT_NOTIFYCAP', 'Notify me when a new comment is posted for this item.');
+define ('_NOT_COMMENT_NOTIFYDSC', 'Receive notification whenever a new comment is posted (or approved) for this item.');
+define ('_NOT_COMMENT_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify: Comment added to {X_ITEM_TYPE}');
+
+define ('_NOT_COMMENTSUBMIT_NOTIFY', 'Comment Submitted');
+define ('_NOT_COMMENTSUBMIT_NOTIFYCAP', 'Notify me when a new comment is submitted (awaiting approval) for this item.');
+define ('_NOT_COMMENTSUBMIT_NOTIFYDSC', 'Receive notification whenever a new comment is submitted (awaiting approval) for this item.');
+define ('_NOT_COMMENTSUBMIT_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify: Comment submitted for {X_ITEM_TYPE}');
+
+// For notification bookmark feature
+// (Not really notification, but easy to do with this module)
+
+define ('_NOT_BOOKMARK_NOTIFY', 'Bookmark');
+define ('_NOT_BOOKMARK_NOTIFYCAP', 'Bookmark this item (no notification).');
+define ('_NOT_BOOKMARK_NOTIFYDSC', 'Keep track of this item without receiving any event notifications.');
+
+// For user profile
+// FIXME: These should be reworded a little...
+
+define ('_NOT_NOTIFYMETHOD', 'Notification Method');
+define ('_NOT_METHOD_EMAIL', 'Email (use address in my profile)');
+define ('_NOT_METHOD_PM', 'Private Message');
+define ('_NOT_METHOD_DISABLE', 'Temporarily Disable');
+
+define ('_NOT_NOTIFYMODE', 'Default Notification Mode');
+define ('_NOT_MODE_SENDALWAYS', 'Notify me of all selected updates');
+define ('_NOT_MODE_SENDONCE', 'Notify me only once');
+define ('_NOT_MODE_SENDONCEPERLOGIN', 'Notify me once then disable until I log in again');
+
+define("_NOT_NOTIFYMETHOD_DESC", "When you monitor e.g. a forum, how would you like to receive notifications of updates?");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/notification.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/search.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/search.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/search.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,23 @@
+<?php
+// $Id$
+//%%%%%% File Name search.php %%%%%
+define("_SR_SEARCH","Search");
+define("_SR_PLZENTER","Please enter all required data!");
+define("_SR_SEARCHRESULTS","Search Results");
+define("_SR_NOMATCH","No Match Found for your Query");
+define("_SR_FOUND","Found <b>%s</b> match(es)");
+define("_SR_SHOWING","(Showing %d - %d)");
+define("_SR_ANY","Any (OR)");
+define("_SR_ALL","All (AND)");
+define("_SR_EXACT","Exact Match");
+define("_SR_SHOWALLR","Show all results");
+define("_SR_NEXT","Next >>");
+define("_SR_PREVIOUS","<< Previous");
+define("_SR_KEYWORDS","Keyword(s)");
+define("_SR_TYPE","Type");
+define("_SR_SEARCHIN","Search in");
+define('_SR_KEYTOOSHORT', 'Keywords must be at least <b>%s</b> characters long');
+define('_SR_KEYIGNORE', 'Keywords shorter than <b>%s</b> characters will be ignored');
+define('_SR_SEARCHRULE', 'Seach Rule');
+define('_SR_IGNOREDWORDS', 'The following words are shorter than allowed minmum length (%u chars) and were not included in your search:');
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/search.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/timezone.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/timezone.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/timezone.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,34 @@
+<?php
+// $Id$
+//%%%%% Time Zone %%%%
+define("_TZ_GMTM12", "(GMT-12:00) Eniwetok, Kwajalein");
+define("_TZ_GMTM11", "(GMT-11:00) Midway Island, Samoa");
+define("_TZ_GMTM10", "(GMT-10:00) Hawaii");
+define("_TZ_GMTM9", "(GMT-9:00) Alaska");
+define("_TZ_GMTM8", "(GMT-8:00) Pacific Time (US & Canada)");
+define("_TZ_GMTM7", "(GMT-7:00) Mountain Time (US & Canada)");
+define("_TZ_GMTM6", "(GMT-6:00) Central Time (US & Canada), Mexico City");
+define("_TZ_GMTM5", "(GMT-5:00) Eastern Time (US & Canada), Bogota, Lima, Quito");
+define("_TZ_GMTM4", "(GMT-4:00) Atlantic Time (Canada), Caracas, La Paz");
+define("_TZ_GMTM35", "(GMT-3:30) Newfoundland");
+define("_TZ_GMTM3", "(GMT-3:00) Brasilia, Buenos Aires, Georgetown");
+define("_TZ_GMTM2", "(GMT-2:00) Mid-Atlantic");
+define("_TZ_GMTM1", "(GMT-1:00) Azores, Cape Verde Islands");
+define("_TZ_GMT0", "(GMT) Greenwich Mean Time, London, Dublin, Lisbon, Casablanca, Monrovia");
+define("_TZ_GMTP1", "(GMT+1:00) Amsterdam, Berlin, Rome, Copenhagen, Brussels, Madrid, Paris");
+define("_TZ_GMTP2", "(GMT+2:00) Athens, Istanbul, Minsk, Helsinki, Jerusalem, South Africa");
+define("_TZ_GMTP3", "(GMT+3:00) Baghdad, Kuwait, Riyadh, Moscow, St. Petersburg");
+define("_TZ_GMTP35", "(GMT+3:30) Tehran");
+define("_TZ_GMTP4", "(GMT+4:00) Abu Dhabi, Muscat, Baku, Tbilisi");
+define("_TZ_GMTP45", "(GMT+4:30) Kabul");
+define("_TZ_GMTP5", "(GMT+5:00) Ekaterinburg, Islamabad, Karachi, Tashkent");
+define("_TZ_GMTP55", "(GMT+5:30) Bombay, Calcutta, Madras, New Delhi");
+define("_TZ_GMTP6", "(GMT+6:00) Almaty, Dhaka, Colombo");
+define("_TZ_GMTP7", "(GMT+7:00) Bangkok, Hanoi, Jakarta");
+define("_TZ_GMTP8", "(GMT+8:00) Beijing, Perth, Singapore, Hong Kong, Urumqi, Taipei");
+define("_TZ_GMTP9", "(GMT+9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk");
+define("_TZ_GMTP95", "(GMT+9:30) Adelaide, Darwin");
+define("_TZ_GMTP10", "(GMT+10:00) Brisbane, Canberra, Melbourne, Sydney, Guam,Vlasdiostok");
+define("_TZ_GMTP11", "(GMT+11:00) Magadan, Solomon Islands, New Caledonia");
+define("_TZ_GMTP12", "(GMT+12:00) Auckland, Wellington, Fiji, Kamchatka, Marshall Island");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/timezone.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/english/user.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/english/user.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/english/user.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,46 @@
+<?php
+// $Id$
+//%%%%%% File Name user.php %%%%%
+define('_US_NOTREGISTERED','Not registered? Click <a href="register.php">here</a>.');
+define('_US_LOSTPASSWORD','Lost your Password?');
+define('_US_NOPROBLEM','No problem. Simply enter the e-mail address we have on file for your account.');
+define('_US_YOUREMAIL','Your Email: ');
+define('_US_SENDPASSWORD','Send Password');
+define('_US_LOGGEDOUT','You are now logged out');
+define('_US_THANKYOUFORVISIT','Thank you for your visit to our site!');
+define('_US_INCORRECTLOGIN','Incorrect Login!');
+define('_US_LOGGINGU','Thank you for logging in, %s.');
+
+// 2001-11-17 ADD
+define('_US_NOACTTPADM','The selected user has been deactivated or has not been activated yet.<br />Please contact the administrator for details.');
+define('_US_ACTKEYNOT','Activation key not correct!');
+define('_US_ACONTACT','Selected account is already activated!');
+define('_US_ACTLOGIN','Your account has been activated. Please login with the registered password.');
+define('_US_NOPERMISS','Sorry, you dont have the permission to perform this action!');
+define('_US_SURETODEL','Are you sure you want to delete your account?');
+define('_US_REMOVEINFO','This will remove all your info from our database.');
+define('_US_BEENDELED','Your account has been deleted.');
+
+//lostpass.php
+define('_US_PWDMAILED','Password for %s mailed.');
+define('_US_CONFMAIL','Confirmation Mail for %s mailed.');
+define('_US_SORRYNOTFOUND','Sorry, no corresponding user info was found.');
+define('_US_NEWPWDREQ','New Password Request at %s');
+define('_US_MAILPWDNG','mail_password: could not update user entry. Contact the Administrator');
+
+// AVATAR
+define('_US_MYAVATAR', 'My Avatar');
+define('_US_UPLOADMYAVATAR', 'Upload Avatar');
+define('_US_MAXPIXEL','Max Pixels');
+define('_US_MAXIMGSZ','Max Image Size (Bytes)');
+define('_US_SELFILE','Select file');
+define('_US_OLDDELETED','Your old avatar will be deleted!');
+define('_US_CHOOSEAVT', 'Choose avatar from the available list');
+
+define('_US_PRESSLOGIN', 'Press the button below to login');
+
+define('_US_ADMINNO', 'User in the webmasters group cannot be removed');
+define('_US_GROUPS', 'User\'s Groups');
+
+define("_US_RESENDACTIVATIONMAIL", "Resend Activation Email");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/english/user.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/language/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/language/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/language/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/language/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/lostpass.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/lostpass.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/lostpass.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,92 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+$xoopsOption['pagetype'] = "user";
+include "mainfile.php";
+$email = isset($_REQUEST['email']) ? trim($_REQUEST['email']) : '';
+if (!isset($_REQUEST['email']) || trim($_REQUEST['email']) == "") {
+ redirect_header(XOOPS_URL,2,_US_SORRYNOTFOUND);
+ exit();
+}
+
+$myts =& MyTextSanitizer::getInstance();
+$member_handler =& xoops_gethandler('member');
+$getuser =& $member_handler->getUsers(new Criteria('email', $myts->addSlashes($email)));
+if (count($getuser) == 0) {
+ redirect_header("user.php",2,_US_SORRYNOTFOUND);
+ exit();
+} else {
+ $code = isset($_GET['code']) ? trim($_GET['code']) : '';
+ $areyou = substr($getuser[0]->getVar("pass"), 0, 5);
+
+ $xoopsMailer =& getMailer();
+ $xoopsMailer->useMail();
+ $xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']);
+ $xoopsMailer->assign("ADMINMAIL", $xoopsConfig['adminmail']);
+ $xoopsMailer->assign("SITEURL", XOOPS_URL."/");
+ $xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']);
+ $xoopsMailer->setToUsers($getuser[0]);
+ $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
+ $xoopsMailer->setFromName($xoopsConfig['sitename']);
+ $xoopsMailer->setSubject(sprintf(_US_NEWPWDREQ,$xoopsConfig['sitename']));
+
+ if ($code != '' && $areyou == $code) {
+ $newpass = xoops_makepass();
+ $xoopsMailer->setTemplate("lostpass2.tpl");
+ $xoopsMailer->assign("NEWPWD", $newpass);
+ $xoopsMailer->assign("LOGINNAME", $getuser[0]->getVar('loginname'));
+ if ( !$xoopsMailer->send() ) {
+ echo $xoopsMailer->getErrors();
+ }
+
+ $getuser[0]->setVar('pass', md5($newpass));
+ if (!$member_handler->insertUser($getuser[0], true)) {
+ include XOOPS_ROOT_PATH."/header.php";
+ echo _US_MAILPWDNG;
+ include XOOPS_ROOT_PATH."/footer.php";
+ exit();
+ }
+ redirect_header("user.php", 3, sprintf(_US_PWDMAILED,$getuser[0]->getVar("uname")), false);
+ exit();
+ // If no Code, send it
+ } else {
+ if (!$GLOBALS['xoopsSecurity']->check(true, $_REQUEST['t'])) {
+ redirect_header(XOOPS_URL."/user.php", 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $xoopsMailer->setTemplate("lostpass1.tpl");
+ $xoopsMailer->assign("NEWPWD_LINK", XOOPS_URL."/lostpass.php?email=".$email."&code=".$areyou);
+
+ include XOOPS_ROOT_PATH."/header.php";
+ if ( !$xoopsMailer->send() ) {
+ echo $xoopsMailer->getErrors();
+ }
+ echo "<h4>";
+ printf(_US_CONFMAIL,$getuser[0]->getVar("uname"));
+ echo "</h4>";
+ include XOOPS_ROOT_PATH."/footer.php";
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/lostpass.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/mainfile.dist.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/mainfile.dist.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/mainfile.dist.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,98 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+if ( !defined("XOOPS_MAINFILE_INCLUDED") ) {
+ define("XOOPS_MAINFILE_INCLUDED",1);
+
+ // XOOPS Physical Path
+ // Physical path to your main XOOPS directory WITHOUT trailing slash
+ // Example: define('XOOPS_ROOT_PATH', '/path/to/xoops/directory');
+ define('XOOPS_ROOT_PATH', '');
+
+ // XOOPS Virtual Path (URL)
+ // Virtual path to your main XOOPS directory WITHOUT trailing slash
+ // Example: define('XOOPS_URL', 'http://url_to_xoops_directory');
+ define('XOOPS_URL', 'http://');
+
+ define('XOOPS_CHECK_PATH', "0");
+ // Protect against external scripts execution if safe mode is not enabled
+ if ( XOOPS_CHECK_PATH && !@ini_get('safe_mode') ) {
+ if ( function_exists('debug_backtrace') ) {
+ $xoopsScriptPath = debug_backtrace();
+ if ( !count($xoopsScriptPath) ) {
+ die("XOOPS path check: this file cannot be requested directly");
+ }
+ $xoopsScriptPath = $xoopsScriptPath[0]['file'];
+ } else {
+ $xoopsScriptPath = isset($_SERVER['PATH_TRANSLATED']) ? $_SERVER['PATH_TRANSLATED'] : $_SERVER['SCRIPT_FILENAME'];
+ }
+ if ( DIRECTORY_SEPARATOR != '/' ) {
+ // IIS6 may double the \ chars
+ $xoopsScriptPath = str_replace( strpos( $xoopsScriptPath, '\\\\', 2 ) ? '\\\\' : DIRECTORY_SEPARATOR, '/', $xoopsScriptPath);
+ }
+ if ( strcasecmp( substr($xoopsScriptPath, 0, strlen(XOOPS_ROOT_PATH)), str_replace( DIRECTORY_SEPARATOR, '/', XOOPS_ROOT_PATH)) ) {
+ exit("XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run.");
+ }
+ }
+
+ // Database
+ // Choose the database to be used
+ define('XOOPS_DB_TYPE', 'mysql');
+
+ // Table Prefix
+ // This prefix will be added to all new tables created to avoid name conflict in the database. Please change this to something different than 'xoops'.
+ define('XOOPS_DB_PREFIX', 'xoops');
+
+ // Database Hostname
+ // Hostname of the database server. If you are unsure, 'localhost' works in most cases.
+ define('XOOPS_DB_HOST', 'localhost');
+
+ // Database Username
+ // Your database user account on the host
+ define('XOOPS_DB_USER', '');
+
+ // Database Password
+ // Password for your database user account
+ define('XOOPS_DB_PASS', '');
+
+ // Database Name
+ // The name of database on the host. The installer will attempt to create the database if not exist
+ define('XOOPS_DB_NAME', '');
+
+ // Use persistent connection? (Yes=1 No=0)
+ // Default is 'No'. Choose 'No' if you are unsure.
+ define('XOOPS_DB_PCONNECT', "0");
+
+ define("XOOPS_GROUP_ADMIN", "1");
+ define("XOOPS_GROUP_USERS", "2");
+ define("XOOPS_GROUP_ANONYMOUS", "3");
+
+ if (!isset($xoopsOption['nocommon']) && XOOPS_ROOT_PATH != '') {
+ require XOOPS_ROOT_PATH."/include/common.php";
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/mainfile.dist.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/mainfile.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/mainfile.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/mainfile.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,35 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+/**
+ * Xoops is not installed, redirect to the installer
+ **/
+
+// XOOPS is not installed yet.
+if(! defined('XOOPS_INSTALL')){
+ header('Location: install/index.php');
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/mainfile.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/misc.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/misc.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/misc.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,264 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include "mainfile.php";
+include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/misc.php';
+$action = isset($_GET['action']) ? trim($_GET['action']) : '';
+$action = isset($_POST['action']) ? trim($_POST['action']) : $action;
+$type = isset($_GET['type']) ? trim($_GET['type']) : '';
+$type = isset($_POST['type']) ? trim($_POST['type']) : $type;
+
+if ( $action == "showpopups" ) {
+ xoops_header(false);
+ // show javascript close button?
+ $closebutton = 1;
+ switch ( $type ) {
+ case "smilies":
+ $target = isset($_GET['target']) ? trim($_GET['target']) : '';
+ if ($target == '' || !preg_match('/^[0-9a-z_]*$/i', $target)) {
+ } else {
+ echo "<script type=\"text/javascript\"><!--//
+ function doSmilie(addSmilie) {
+ var currentMessage = window.opener.xoopsGetElementById(\"".$target."\").value;
+ window.opener.xoopsGetElementById(\"".$target."\").value=currentMessage+addSmilie;
+ return;
+ }
+ //-->
+ </script>
+ ";
+ echo '</head><body>
+ <table width="100%" class="outer">
+ <tr><th colspan="3">'._MSC_SMILIES.'</th></tr>
+ <tr class="head"><td>'._MSC_CODE.'</td><td>'._MSC_EMOTION.'</td><td>'._IMAGE.'</td></tr>';
+ if ($getsmiles = $xoopsDB->query("SELECT * FROM ".$xoopsDB->prefix("smiles"))) {
+ $rcolor = 'even';
+ while ( $smile = $xoopsDB->fetchArray($getsmiles) ) {
+ echo "<tr class='$rcolor'><td>".$smile['code']."</td><td>".$smile['emotion']."</td><td><img onmouseover='style.cursor=\"hand\"' onclick='doSmilie(\" ".$smile['code']." \");' src='".XOOPS_UPLOAD_URL."/".$smile['smile_url']."' alt='' /></td></tr>";
+ $rcolor = ($rcolor == 'even') ? 'odd' : 'even';
+ }
+ } else {
+ echo "Could not retrieve data from the database.";
+ }
+ echo '</table>'._MSC_CLICKASMILIE;
+ }
+ break;
+ case "avatars":
+ ?>
+ <script type='text/javascript'>
+ <!--//
+ function myimage_onclick(counter){
+ window.opener.xoopsGetElementById("user_avatar").options[counter].selected = true;
+ showAvatar();
+ window.opener.xoopsGetElementById("user_avatar").focus();
+ window.close();
+ }
+ function showAvatar() {
+ window.opener.xoopsGetElementById("avatar").src='<?php echo XOOPS_UPLOAD_URL;?>/' + window.opener.xoopsGetElementById("user_avatar").options[window.opener.xoopsGetElementById("user_avatar").selectedIndex].value;
+ }
+ //-->
+ </script>
+ </head><body>
+ <h4><?php echo _MSC_AVAVATARS;?></h4>
+ <form name='avatars' action='<?php echo $_SERVER['REQUEST_URI'];?>'>
+ <table width='100%'><tr>
+ <?php
+ $avatar_handler =& xoops_gethandler('avatar');
+ $avatarslist =& $avatar_handler->getList('S');
+ $cntavs = 0;
+ $counter = isset($_GET['start']) ? intval($_GET['start']) : 0;
+ foreach ($avatarslist as $file => $name) {
+ echo '<td><img src="uploads/'.$file.'" alt="'.$name.'" style="padding:10px; vertical-align:top;" /><br />'.$name.'<br /><input name="myimage" type="button" value="'._SELECT.'" onclick="myimage_onclick('.$counter.')" /></td>';
+ $counter++;
+ $cntavs++;
+ if ($cntavs > 8) {
+ echo '</tr><tr>';
+ $cntavs=0;
+ }
+ }
+ echo '</tr></table></form></div>';
+ break;
+ case "friend":
+ if ( !$GLOBALS['xoopsSecurity']->check() || !isset($_POST['op']) || $_POST['op'] == "sendform") {
+ if ( $xoopsUser ) {
+ $yname = $xoopsUser->getVar("uname", 'e');
+ $ymail = $xoopsUser->getVar("email", 'e');
+ $fname = "";
+ $fmail = "";
+ } else {
+ $yname = "";
+ $ymail = "";
+ $fname = "";
+ $fmail = "";
+ }
+ printCheckForm();
+ echo '</head><body>';
+ if (isset($_POST['op'])) {
+ echo "<div class='errorMsg'>".implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())."</div>";
+ }
+ echo '
+ <form action="'.XOOPS_URL.'/misc.php" method="post" onsubmit="return checkForm();"><table width="100%" class="outer" cellspacing="1"><tr><th colspan="2">'._MSC_RECOMMENDSITE.'</th></tr>';
+ echo "<tr><td class='head'>
+ <input type='hidden' name='op' value='sendsite' />
+ <input type='hidden' name='action' value='showpopups' />
+ <input type='hidden' name='type' value='friend' />\n";
+ echo _MSC_YOURNAMEC."</td><td class='even'><input type='text' name='yname' value='$yname' id='yname' /></td></tr>
+ <tr><td class='head'>"._MSC_YOUREMAILC."</td><td class='odd'><input type='text' name='ymail' value='".$ymail."' id='ymail' /></td></tr>
+ <tr><td class='head'>"._MSC_FRIENDNAMEC."</td><td class='even'><input type='text' name='fname' value='$fname' id='fname' /></td></tr>
+ <tr><td class='head'>"._MSC_FRIENDEMAILC."</td><td class='odd'><input type='text' name='fmail' value='$fmail' id='fmail' /></td></tr>
+ <tr><td class='head'> </td><td class='even'><input type='submit' value='"._SEND."' /> <input value='"._CLOSE."' type='button' onclick='javascript:window.close();' />".$GLOBALS['xoopsSecurity']->getTokenHTML()."</td></tr>
+ </table></form>\n";
+ $closebutton = 0;
+ } elseif ($_POST['op'] == "sendsite") {
+ $myts =& MyTextsanitizer::getInstance();
+ if ( $xoopsUser ) {
+ $ymail = $xoopsUser->getVar("email");
+ } else {
+ $ymail = isset($_POST['ymail']) ? $myts->stripSlashesGPC(trim($_POST['ymail'])) : '';
+ }
+ if ( !isset($_POST['yname']) || trim($_POST['yname']) == "" || $ymail == '' || !isset($_POST['fname']) || trim($_POST['fname']) == "" || !isset($_POST['fmail']) || trim($_POST['fmail']) == '' ) {
+ redirect_header(XOOPS_URL."/misc.php?action=showpopups&type=friend&op=sendform",2,_MSC_NEEDINFO);
+ exit();
+ }
+ $yname = $myts->stripSlashesGPC(trim($_POST['yname']));
+ $fname = $myts->stripSlashesGPC(trim($_POST['fname']));
+ $fmail = $myts->stripSlashesGPC(trim($_POST['fmail']));
+ if (!checkEmail($fmail) || !checkEmail($ymail)) {
+ $errormessage = _MSC_INVALIDEMAIL1."<br />"._MSC_INVALIDEMAIL2."";
+ redirect_header(XOOPS_URL."/misc.php?action=showpopups&type=friend&op=sendform",2,$errormessage);
+ exit();
+ }
+ $xoopsMailer =& getMailer();
+ $xoopsMailer->setTemplate("tellfriend.tpl");
+ $xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']);
+ $xoopsMailer->assign("ADMINMAIL", $xoopsConfig['adminmail']);
+ $xoopsMailer->assign("SITEURL", XOOPS_URL."/");
+ $xoopsMailer->assign("YOUR_NAME", $yname);
+ $xoopsMailer->assign("FRIEND_NAME", $fname);
+ $xoopsMailer->setToEmails($fmail);
+ $xoopsMailer->setFromEmail($ymail);
+ $xoopsMailer->setFromName($yname);
+ $xoopsMailer->setSubject(sprintf(_MSC_INTSITE,$xoopsConfig['sitename']));
+ //OpenTable();
+ if ( !$xoopsMailer->send() ) {
+ echo $xoopsMailer->getErrors();
+ } else {
+ echo "<div><h4>"._MSC_REFERENCESENT."</h4></div>";
+ }
+ //CloseTable();
+ }
+ break;
+ case 'online':
+ $isadmin = $xoopsUserIsAdmin;
+ echo '</head><body><table width="100%" cellspacing="1" class="outer"><tr><th colspan="3">'._WHOSONLINE.'</th></tr>';
+ $start = isset($_GET['start']) ? intval($_GET['start']) : 0;
+ $online_handler =& xoops_gethandler('online');
+ $online_total =& $online_handler->getCount();
+ $limit = ($online_total > 20) ? 20 : $online_total;
+ $criteria = new CriteriaCompo();
+ $criteria->setLimit($limit);
+ $criteria->setStart($start);
+ $onlines =& $online_handler->getAll($criteria);
+ $count = count($onlines);
+ $module_handler =& xoops_gethandler('module');
+ $modules =& $module_handler->getList(new Criteria('isactive', 1));
+ for ($i = 0; $i < $count; $i++) {
+ if ($onlines[$i]['online_uid'] == 0) {
+ $onlineUsers[$i]['user'] = '';
+ } else {
+ $onlineUsers[$i]['user'] =& new XoopsUser($onlines[$i]['online_uid']);
+ }
+ $onlineUsers[$i]['ip'] = $onlines[$i]['online_ip'];
+ $onlineUsers[$i]['updated'] = $onlines[$i]['online_updated'];
+ $onlineUsers[$i]['module'] = ($onlines[$i]['online_module'] > 0) ? $modules[$onlines[$i]['online_module']] : '';
+ }
+ $class = 'even';
+ for ($i = 0; $i < $count; $i++) {
+ $class = ($class == 'odd') ? 'even' : 'odd';
+ echo '<tr valign="middle" align="center" class="'.$class.'">';
+ if (is_object($onlineUsers[$i]['user'])) {
+ $avatar = $onlineUsers[$i]['user']->getVar('user_avatar') ? '<img src="'.XOOPS_UPLOAD_URL.'/'.$onlineUsers[$i]['user']->getVar('user_avatar').'" alt="" />' : ' ';
+ echo '<td>'.$avatar."</td><td><a href=\"javascript:window.opener.location='".XOOPS_URL."/userinfo.php?uid=".$onlineUsers[$i]['user']->getVar('uid')."';window.close();\">".$onlineUsers[$i]['user']->getVar('uname')."</a>";
+ } else {
+ echo '<td> </td><td>'.$xoopsConfig['anonymous'];
+ }
+ if ($isadmin == 1) {
+ echo '<br />('.$onlineUsers[$i]['ip'].')';
+ }
+ echo '</td><td>'.$onlineUsers[$i]['module'].'</td></tr>';
+ }
+ echo '</table><br />';
+ if ($online_total > 20) {
+ include_once XOOPS_ROOT_PATH.'/class/pagenav.php';
+ $nav = new XoopsPageNav($online_total, 20, $start, 'start', 'action=showpopups&type=online');
+ echo '<div style="text-align: right;">'.$nav->renderNav().'</div>';
+ }
+ break;
+ case 'ssllogin':
+ if ($xoopsConfig['use_ssl'] && isset($_POST[$xoopsConfig['sslpost_name']]) && is_object($xoopsUser)) {
+ include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/user.php';
+ echo sprintf(_US_LOGGINGU, $xoopsUser->getVar('uname'));
+ echo '<div style="text-align:center;"><input class="formButton" value="'._CLOSE.'" type="button" onclick="window.opener.location.reload();window.close();" /></div>';
+ $closebutton = false;
+ }
+ break;
+ default:
+ break;
+ }
+ if ($closebutton) {
+ echo '<div style="text-align:center;"><input class="formButton" value="'._CLOSE.'" type="button" onclick="javascript:window.close();" /></div>';
+ }
+ xoops_footer();
+}
+
+function printCheckForm()
+{
+ ?>
+ <script type='text/javascript'>
+ <!--//
+ function checkForm()
+ {
+ if ( xoopsGetElementById("yname").value == "" ){
+ alert( "<?php echo _MSC_ENTERYNAME;?>" );
+ xoopsGetElementById("yname").focus();
+ return false;
+ } else if ( xoopsGetElementById("fname").value == "" ){
+ alert( "<?php echo _MSC_ENTERFNAME;?>" );
+ xoopsGetElementById("fname").focus();
+ return false;
+ } else if ( xoopsGetElementById("fmail").value ==""){
+ alert( "<?php echo _MSC_ENTERFMAIL;?>" );
+ xoopsGetElementById("fmail").focus();
+ return false;
+ } else {
+ return true;
+ }
+ }
+ //-->
+ </script>
+ <?php
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/misc.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/admin.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/admin.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/admin.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,37 @@
+<?php
+// $id: Exp $ //
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: XOOPS Foundation //
+// URL: http://www.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+include '../../../include/cp_header.php';
+xoops_cp_header();
+
+$xTheme->loadModuleAdminMenu(1);
+
+xoops_cp_footer();
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/admin.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/menu.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/menu.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/menu.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,35 @@
+<?php
+// $id: Exp $ //
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: XOOPS Foundation //
+// URL: http://www.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+$adminmenu[1]['title'] = _PM_MI_INDEX;
+$adminmenu[1]['link'] = "admin/admin.php";
+$adminmenu[2]['title'] = _PM_MI_PRUNE;
+$adminmenu[2]['link'] = "admin/prune.php";
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/menu.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/prune.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/prune.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/prune.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,98 @@
+<?php
+// $id: Exp $ //
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: XOOPS Foundation //
+// URL: http://www.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+include '../../../include/cp_header.php';
+xoops_cp_header();
+
+$xTheme->loadModuleAdminMenu(2);
+
+$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : "form";
+$pmhandler =& xoops_getmodulehandler('privmessage');
+switch ($op) {
+ default:
+ case "form":
+ $form =& $pmhandler->getPruneForm();
+ $form->display();
+ break;
+
+ case "prune":
+ $criteria = new CriteriaCompo();
+ if ($_REQUEST['after']['date'] && $_REQUEST['after']['date'] != "YYYY/MM/DD") {
+ $criteria->add(new Criteria('msg_time', strtotime($_REQUEST['after']['date']) + intval($_REQUEST['after']['time']), ">"));
+ }
+ if ($_REQUEST['before']['date'] && $_REQUEST['before']['date'] != "YYYY/MM/DD") {
+ $criteria->add(new Criteria('msg_time', strtotime($_REQUEST['before']['date']) + intval($_REQUEST['before']['time']), "<"));
+ }
+ if (isset($_REQUEST['onlyread']) && $_REQUEST['onlyread'] == 1) {
+ $criteria->add(new Criteria('read_msg', 1));
+ }
+ if ((!isset($_REQUEST['includesave']) || $_REQUEST['includesave'] == 0)) {
+ $savecriteria = new CriteriaCompo(new Criteria('to_save', 0));
+ $savecriteria->add(new Criteria('from_save', 0));
+ $criteria->add($savecriteria);
+ }
+ if (isset($_REQUEST['notifyusers']) && $_REQUEST['notifyusers'] == 1) {
+ $notifycriteria = $criteria;
+ $notifycriteria->add(new Criteria('to_delete', 0));
+ $notifycriteria->setGroupBy('to_userid');
+ // Get array of uid => number of deleted messages
+ $uids = $pmhandler->getCount($notifycriteria);
+ }
+ $deletedrows = $pmhandler->deleteAll($criteria);
+ if ($deletedrows === false) {
+ redirect_header('prune.php', 2, _PM_AM_ERRORWHILEPRUNING);
+ }
+ if (isset($_REQUEST['notifyusers']) && $_REQUEST['notifyusers'] == 1) {
+ $errors = false;
+ foreach ($uids as $uid => $messagecount) {
+ $pm = $pmhandler->create();
+
+ $pm->setVar("subject", $xoopsModuleConfig['prunesubject']);
+ $pm->setVar("msg_text", str_replace('{PM_COUNT}', $messagecount, $xoopsModuleConfig['prunemessage']));
+ $pm->setVar("to_userid", $uid);
+ $pm->setVar("from_userid", $xoopsUser->getVar("uid"));
+
+ if (!$pmhandler->insert($pm)) {
+ $errors = true;
+ $errormsg[] = $pm->getHtmlErrors();
+ }
+ unset($pm);
+ }
+ if ($errors == true) {
+ echo implode('<br />', $errormsg);
+ xoops_cp_footer();
+ exit();
+ }
+ }
+ redirect_header('admin.php', 2, sprintf(_PM_AM_MESSAGESPRUNED, $deletedrows));
+ break;
+}
+xoops_cp_footer();
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/admin/prune.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/class/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/class/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/class/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/class/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/class/privmessage.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/class/privmessage.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/class/privmessage.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,233 @@
+<?php
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// ------------------------------------------------------------------------ //
+// XOOPS - PM(Private Message) Hack4.6 //
+// Just enjoy! Internet for everyone!! //
+// <http://www.wanisys.net/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * {description}
+ *
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 The XOOPS Project (http://www.xoops.org)
+ *
+ */
+class PmPrivmessage extends XoopsObject
+{
+
+ /**
+ * constructor
+ **/
+ function PmPrivmessage()
+ {
+ $this->XoopsObject();
+ $this->initVar('msg_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('msg_image', XOBJ_DTYPE_OTHER, 'icon1.gif', false, 100);
+ $this->initVar('subject', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('from_userid', XOBJ_DTYPE_INT, null, true);
+ $this->initVar('to_userid', XOBJ_DTYPE_INT, null, true);
+ $this->initVar('msg_time', XOBJ_DTYPE_OTHER, time(), false);
+ $this->initVar('msg_text', XOBJ_DTYPE_TXTAREA, null, true);
+ $this->initVar('read_msg', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('from_delete', XOBJ_DTYPE_INT, 1, false);
+ $this->initVar('to_delete', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('from_save', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('to_save', XOBJ_DTYPE_INT, 0, false);
+ }
+}
+
+/**
+ * XOOPS private message handler class.
+ *
+ * This class is responsible for providing data access mechanisms to the data source
+ * of XOOPS private message class objects.
+ *
+ * @package kernel
+ *
+ * @author Kazumi Ono <onokazu at xoops.org>
+ * @copyright copyright (c) 2000-2003 The XOOPS Project (http://www.xoops.org)
+ *
+ */
+class PmPrivmessageHandler extends XoopsPersistableObjectHandler
+{
+ function PmPrivmessageHandler(&$db) {
+ $this->XoopsPersistableObjectHandler($db, 'priv_msgs', 'PmPrivmessage', 'msg_id', 'subject');
+ }
+
+ /**
+ * Mark a message as read
+ * @param object $pm {@link XoopsPrivmessage} object
+ * @return bool
+ **/
+ function setRead(&$pm, $val=1)
+ {
+ return $this->updateAll('read_msg', intval($val), new Criteria('msg_id', $pm->getVar('msg_id')), true);
+ }
+ /**
+ * Mark a message as from_delete = 1 or removes it if the recipient has also deleted it
+ * @param object $pm {@link XoopsPrivmessage} object
+ * @return bool
+ **/
+ function setFromdelete(&$pm, $val=1)
+ {
+ if ($pm->getVar('to_delete') == 0) {
+ return $this->updateAll('from_delete', intval($val), new Criteria('msg_id', $pm->getVar('msg_id')));
+ }
+ else {
+ return parent::delete($pm);
+ }
+ }
+ /**
+ * Mark a message as to_delete = 1 or removes it if the sender has also deleted it
+ * @param object $pm {@link XoopsPrivmessage} object
+ * @return bool
+ **/
+ function setTodelete(&$pm, $val=1)
+ {
+ if ($pm->getVar('from_delete') == 0) {
+ return $this->updateAll('to_delete', intval($val), new Criteria('msg_id', $pm->getVar('msg_id')));
+ }
+ else {
+ return parent::delete($pm);
+ }
+ }
+
+ /**
+ * Mark a message as from_save = 1
+ * @param object $pm {@link XoopsPrivmessage} object
+ * @return bool
+ **/
+ function setFromsave(&$pm, $val=1)
+ {
+ return $this->updateAll('from_save', intval($val), new Criteria('msg_id', $pm->getVar('msg_id')));
+ }
+
+ /**
+ * Mark a message as to_save = 1
+ * @param object $pm {@link XoopsPrivmessage} object
+ * @return bool
+ **/
+ function setTosave(&$pm, $val=1)
+ {
+ return $this->updateAll('to_save', intval($val), new Criteria('msg_id', $pm->getVar('msg_id')));
+ }
+
+ /**
+ * get user's message count in savebox
+ * @param object $user
+ * @return int
+ **/
+ function getSavecount(&$user)
+ {
+ if(!is_object($user)) {
+ $user =& $GLOBALS["xoopsUser"];
+ }
+ $crit_to = new CriteriaCompo(new Criteria('to_delete',0));
+ $crit_to->add(new Criteria('to_save',1));
+ $crit_to->add(new Criteria('to_userid',$user->getVar('uid')));
+ $crit_from = new CriteriaCompo(new Criteria('from_delete',0));
+ $crit_from->add(new Criteria('from_save',1));
+ $crit_from->add(new Criteria('from_userid',$user->getVar('uid')));
+ $criteria = new CriteriaCompo($crit_to);
+ $criteria->add($crit_from, "OR");
+ return $this->getCount($criteria);
+ }
+
+ /**
+ * Send a message to user's email
+ * @param object $pm {@link XoopsPrivmessage} object
+ * @param object $user
+ * @return bool
+ **/
+ function sendEmail(&$pm, &$user)
+ {
+ global $xoopsConfig;
+ if(!is_object($user)) {
+ $user =& $GLOBALS["xoopsUser"];
+ }
+ $msg = sprintf(_PM_EMAIL_DESC, $user->getVar("uname"));
+ $msg .= "\n\n";
+ $msg .= formatTimestamp($pm->getVar("msg_time"));
+ $msg .= "\n";
+ $from = new XoopsUser($pm->getVar("from_userid"));
+ $to = new XoopsUser($pm->getVar("to_userid"));
+ $msg .= sprintf(_PM_EMAIL_FROM, $from->getVar("uname")." (".XOOPS_URL."/userinfo.php?uid=".$pm->getVar("from_userid").")");
+ $msg .= "\n";
+ $msg .= sprintf(_PM_EMAIL_TO, $to->getVar("uname")." (".XOOPS_URL."/userinfo.php?uid=".$pm->getVar("to_userid").")");
+ $msg .= "\n";
+ $msg .= _PM_EMAIL_MESSAGE.":\n";
+ $msg .= "\n".$pm->getVar("subject")."\n";
+ $msg .= "\n".
+ strip_tags(
+ str_replace("<p>", "\n",
+ str_replace("</p>", "\n",
+ str_replace("<br>", "\n",
+ str_replace("<br />", "\n",
+ $pm->getVar("msg_text"))))))
+ ."\n\n";
+ $msg .= "--------------\n";
+ $msg .= $xoopsConfig['sitename'].": ".XOOPS_URL."\n";
+ $xoopsMailer =& getMailer();
+ $xoopsMailer->useMail();
+ $xoopsMailer->setToEmails($user->getVar("email"));
+ $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
+ $xoopsMailer->setFromName($xoopsConfig['sitename']);
+ $xoopsMailer->setSubject(sprintf(_PM_EMAIL_SUBJECT,$pm->getVar("subject")));
+ $xoopsMailer->setBody($msg);
+ return $xoopsMailer->send();
+ }
+
+ /**
+ * Get {@link XoopsForm} for setting prune criteria
+ *
+ * @return object
+ **/
+ function getPruneForm() {
+ include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
+ $form = new XoopsThemeForm(_PM_AM_PRUNE, 'form', 'prune.php', 'post', true);
+
+ $form->addElement(new XoopsFormDateTime(_PM_AM_PRUNEAFTER, 'after'));
+ $form->addElement(new XoopsFormDateTime(_PM_AM_PRUNEBEFORE, 'before'));
+ $form->addElement(new XoopsFormRadioYN(_PM_AM_ONLYREADMESSAGES, 'onlyread', 1));
+ $form->addElement(new XoopsFormRadioYN(_PM_AM_INCLUDESAVE, 'includesave', 0));
+ $form->addElement(new XoopsFormRadioYN(_PM_AM_NOTIFYUSERS, 'notifyusers', 0));
+
+ $form->addElement(new XoopsFormHidden('op', 'prune'));
+ $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
+
+ return $form;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/class/privmessage.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/images/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/images/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/images/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/images/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/images/pm.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/images/pm.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/images/pm_logo.jpg
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/images/pm_logo.jpg
___________________________________________________________________
Name: svn:mime-type
+ image/jpeg
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/images/read.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/images/read.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/include/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/include/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/include/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/include/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/include/install.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/include/install.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/include/install.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,48 @@
+<?php
+// Pre treatment: detect module status
+function xoops_module_pre_install_pm(&$module) {
+ $PM_tables = $module->getInfo("tables");
+ $PM_table = $PM_tables[0];
+
+ $sql = "SHOW COLUMNS FROM ".$GLOBALS["xoopsDB"]->prefix($PM_table);
+ $level = ($result = $GLOBALS["xoopsDB"]->queryF($sql)) ? 1 : 0;
+ if ($level) {
+ $fields = array();
+ while (list($field) = $GLOBALS["xoopsDB"]->fetchRow($result)) {
+ if (in_array($field, array("from_delete", "from_save", "to_delete", "to_save"))) {
+ $level = 2; // XOOPS 2.2+, no need for table change
+ break;
+ }
+ }
+ }
+
+ if($level==0){ // fresh install
+ $module->setInfo("sqlfile", array('mysql' => "sql/mysql.sql"));
+ }
+ $module->setInfo("level", $level);
+
+ return true;
+}
+
+function xoops_module_install_pm(&$module)
+{
+ $sql = "UPDATE ".$GLOBALS['xoopsDB']->prefix('user_profile')." SET pm_link=".$GLOBALS['xoopsDB']->quoteString(
+ "<a href=\"javascript:openWithSelfMain('{X_URL}/modules/pm/pmlite.php?send2=1&to_userid={X_UID}', 'pmlite', 550, 450);\" title=\""._PM_MI_MESSAGE." {X_UNAME}\"><img src=\"{X_URL}/modules/pm/images/pm.gif\" alt=\""._PM_MI_MESSAGE." {X_UNAME}\" /></a>"
+ )." WHERE pm_link=''";
+ if (!$GLOBALS['xoopsDB']->query($sql)) {
+ $module->setMessage($GLOBALS['xoopsDB']->error());
+ }else{
+ $module->setMessage("pm_link data updated");
+ }
+ // Post treatment: upgrade table if pre 2.2
+ $level = $module->getInfo("level");
+ $PM_tables = $module->getInfo("tables");
+ $PM_table = $PM_tables[0];
+ if($level==1){
+ $sql = "ALTER TABLE ".$GLOBALS['xoopsDB']->prefix($PM_table)." ADD from_delete TINYINT( 1 ) UNSIGNED NOT NULL default '0' , ADD to_delete TINYINT( 1 ) UNSIGNED NOT NULL default '0', ADD to_save TINYINT( 1 ) UNSIGNED NOT NULL default '0', ADD from_save TINYINT( 1 ) UNSIGNED NOT NULL default '0';";
+ return $GLOBALS['xoopsDB']->query($sql);
+ }else{
+ return true;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/include/install.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/index.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/index.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/index.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,32 @@
+<?php
+// $id: Exp $ //
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: XOOPS Foundation //
+// URL: http://www.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+header('location: viewpmsg.php');
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/index.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/admin.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/admin.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/admin.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,12 @@
+<?php
+
+define("_PM_AM_PRUNE", "Prune");
+define("_PM_AM_PRUNEAFTER", "Prune messages posted after this date (leave blank for no start date)");
+define("_PM_AM_PRUNEBEFORE", "Prune messages posted before this date (leave blank for no end date)");
+define("_PM_AM_ONLYREADMESSAGES", "Prune only read messages");
+define("_PM_AM_INCLUDESAVE", "Include messages in users' \"save\" folders");
+define("_PM_AM_NOTIFYUSERS", "Notify affected users about the prune?");
+
+define("_PM_AM_MESSAGESPRUNED", "%u Messages Pruned");
+define("_PM_AM_ERRORWHILEPRUNING", "An error occurred during prune");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/admin.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/main.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/main.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/main.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,92 @@
+<?php
+// $Id$
+//%%%%%% File Name readpmsg.php %%%%%
+define("_PM_DELETED","Your message(s) has been deleted");
+define("_PM_PRIVATEMESSAGE","Private Messages");
+define("_PM_INBOX","Inbox");
+define("_PM_FROM","From");
+define("_PM_YOUDONTHAVE","You don't have any private messages");
+define("_PM_FROMC","From: ");
+define("_PM_SENTC","Sent: "); // The date of message sent
+define("_PM_PROFILE","Profile");
+
+// %s is a username
+define("_PM_PREVIOUS","Previous Message");
+define("_PM_NEXT","Next Message");
+
+//%%%%%% File Name pmlite.php %%%%%
+define("_PM_SORRY","Sorry! You are not a registered user.");
+define("_PM_REGISTERNOW","Register Now!");
+define("_PM_GOBACK","Go Back");
+define("_PM_USERNOEXIST","The selected user doesn't exist in the database.");
+define("_PM_PLZTRYAGAIN","Please check the name and try again.");
+define("_PM_MESSAGEPOSTED","Your message has been posted");
+define("_PM_CLICKHERE","You can click here to view your private messages");
+define("_PM_ORCLOSEWINDOW","Or click here to close this window.");
+define("_PM_USERWROTE","%s wrote:");
+define("_PM_TO","To: ");
+define("_PM_SUBJECTC","Subject: ");
+define("_PM_MESSAGEC","Message: ");
+define("_PM_CLEAR","Clear");
+define("_PM_CANCELSEND","Cancel Send");
+define("_PM_SUBMIT","Submit");
+define("_PM_SAVEINOUTBOX", "Save a copy in your outbox?");
+
+//%%%%%% File Name viewpmsg.php %%%%%
+define("_PM_SUBJECT","Subject");
+define("_PM_DATE","Date");
+define("_PM_NOTREAD","Not Read");
+define("_PM_SEND","Send");
+define("_PM_DELETE","Delete");
+define("_PM_TOSAVE","Save");
+define("_PM_UNSAVE","Unset save");
+define("_PM_EMPTY","Empty");
+define("_PM_REPLY", "Reply");
+define("_PM_PLZREG","Please register first to send private messages!");
+define("_PM_SAVED_PART","You are allowed %d in your savebox and you saved %d messages for this time");
+define("_PM_SAVED_ALL","Messages have been moved to savebox");
+define("_PM_UNSAVED","Messages have been removed from savebox");
+define("_PM_EMPTIED","The box has been emptied");
+define("_PM_RUSUREEMPTY","Are you sure you want to empty the box?");
+define("_PM_RUSUREDELETE","Are you sure you want to delete these message(s)?");
+
+define("_PM_ONLINE", "Online");
+
+define("_PM_RECEIVE","RECEIVE");
+define("_PM_POST","POST");
+define("_PM_READBOX","READBOX");
+define("_PM_RSAVEBOX","Receive_SAVEBOX");
+define("_PM_OUTBOX","Outbox");
+define("_PM_SAVEBOX","Savebox");
+define("_PM_SENTBOX","SENTBOX");
+define("_PM_PSAVEBOX","Post_SAVEBOX");
+define("_PM_SAVE","SAVE");
+define("_PM_SAVED","Saved Successfully");
+define("_PM_TOC","From: ");
+
+//WANISYS.NET PM HACK1.5
+define("_PM_SORT","SORT");
+define("_PM_ORDER","ORDER");
+define("_PM_UID","Partner's UID");
+define("_PM_TIME","Post DATE");
+define("_PM_ASC","ASC");
+define("_PM_DESC","DESC");
+define("_PM_LIMIT","PMs per Page");
+define("_PM_BACKTOBOX","Back to Box");
+define("_PM_SORTSUBMIT","Submit");
+define("_PM_PREVIOUSP","Previous");
+define("_PM_NEXTP","Next");
+
+define("_PM_MAILNOTIFY","%s-You've got a new PM from %s");
+define("_PM_MAILMESSAGE","Hello!\nA New PM has arrived from %s\n\nTitle of PM is\n%s\n\nYou can view the PM here\n%s\n\n-----------\nYou are receiving this message because you selected to be notified when you receive a new PM\n\nYou can change your PM-Config\n%s\n\nPlease do not reply to this message\n\n---------\nBest Regards\n%s\n%s\n%s");
+
+define("_PM_EMAIL", "Email");
+define("_PM_EMAIL_DESC", "Dear %s, this is a message transfered from your account at ".$xoopsConfig['sitename']);
+define("_PM_EMAIL_FROM", "From %s");
+define("_PM_EMAIL_TO", "To %s");
+define("_PM_EMAIL_SUBJECT", "[message]%s");
+define("_PM_EMAIL_MESSAGE", "Message content");
+
+define("_PM_ACTION_DONE", "Operation executed successfully");
+define("_PM_ACTION_ERROR", "Operation failed");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/main.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/modinfo.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/modinfo.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/modinfo.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,24 @@
+<?php
+define("_PM_MI_NAME", "Private Messaging");
+define("_PM_MI_DESC", "Module for private messaging between users");
+
+define("_PM_MI_INDEX", "Index");
+define("_PM_MI_PRUNE", "Prune Messages");
+
+define("_PM_MI_LINK_TITLE", "PM Link");
+define("_PM_MI_LINK_DESCRIPTION", "Shows a link to send a private message to the user");
+define("_PM_MI_MESSAGE", "Write a message to");
+
+define("_PM_MI_PRUNESUBJECT", "Prune PM subject line");
+define("_PM_MI_PRUNESUBJECT_DESC", "This will be the subject of the PM to the user, received after a PM prune");
+define("_PM_MI_PRUNEMESSAGE", "Prune PM body message");
+define("_PM_MI_PRUNEMESSAGE_DESC", "This message will be in the body of the message to users after one or more of their messages have been removed from their inbox during a PM prune. Use {PM_COUNT} in the text to be replaced with the number of messages removed from this user's inbox");
+define("_PM_MI_PRUNESUBJECTDEFAULT", "Messages deleted during cleanup");
+define("_PM_MI_PRUNEMESSAGEDEFAULT", "During a cleanup of the Private Messaging, we have deleted {PM_COUNT} of the messages in your inbox to save space and resources");
+
+define("_PM_MI_MAXSAVE", "Maximum items in savebox");
+define("_PM_MI_MAXSAVE_DESC", "");
+
+define("_PM_MI_PERPAGE", "Items per page");
+define("_PM_MI_PERPAGE_DESC", "");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/english/modinfo.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/language/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/pmlite.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/pmlite.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/pmlite.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,147 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include_once "../../mainfile.php";
+$xoopsOption['output_type'] = 'plain';
+$reply = !empty($_GET['reply']) ? 1 : 0;
+$send = !empty($_GET['send']) ? 1 : 0;
+$send2 = !empty($_GET['send2']) ? 1 : 0;
+$sendmod = !empty($_POST['sendmod']) ? 1 : 0; // send from other modules with post data
+$to_userid = !empty($_GET['to_userid']) ? intval($_GET['to_userid']) : 0;
+$msg_id = !empty($_GET['msg_id']) ? intval($_GET['msg_id']) : 0;
+if ( empty($_GET['refresh'] ) && isset($_POST['op']) && $_POST['op'] != "submit" ) {
+ $jump = "pmlite.php?refresh=".time()."";
+ if ( $send == 1 ) {
+ $jump .= "&send=".$send."";
+ } elseif ( $send2 == 1 ) {
+ $jump .= "&send2=".$send2."&to_userid=".$to_userid."";
+ } elseif ( $reply == 1 ) {
+ $jump .= "&reply=".$reply."&msg_id=".$msg_id."";
+ } else {
+ }
+ header('location: '.$jump);
+ exit();
+}
+if ($xoopsUser) {
+ $myts =& MyTextSanitizer::getInstance();
+ if (isset($_POST['op']) && $_POST['op'] == "submit") {
+ $member_handler =& xoops_gethandler('member');
+ $count = $member_handler->getUserCount(new Criteria('uid', intval($_POST['to_userid'])));
+ if ($count != 1) {
+ echo "<br /><br /><div><h4>"._PM_USERNOEXIST."<br />";
+ echo _PM_PLZTRYAGAIN."</h4><br />";
+ echo "[ <a href='javascript:history.go(-1)'>"._PM_GOBACK."</a> ]</div>";
+ } elseif ($GLOBALS['xoopsSecurity']->check()) {
+ $pm_handler =& xoops_getmodulehandler('privmessage');
+ $pm =& $pm_handler->create();
+ $pm->setVar("subject", $_POST['subject']);
+ $pm->setVar("msg_text", $_POST['message']);
+ $pm->setVar("to_userid", $_POST['to_userid']);
+ $pm->setVar("from_userid", $xoopsUser->getVar("uid"));
+ if (isset($_REQUEST['savecopy']) && $_REQUEST['savecopy'] == 1) {
+ //PMs are by default not saved in outbox
+ $pm->setVar('from_delete', 0);
+ }
+ if (!$pm_handler->insert($pm)) {
+ echo $pm->getHtmlErrors();
+ echo "<br /><a href='javascript:history.go(-1)'>"._PM_GOBACK."</a>";
+ } else {
+ // @todo: Send notification email if user has selected this in the profile
+
+ echo "<br /><br /><div style='text-align:center;'><h4>"._PM_MESSAGEPOSTED."</h4><br /><a href=\"javascript:window.opener.location='".XOOPS_URL."/viewpmsg.php';window.close();\">"._PM_CLICKHERE."</a><br /><br /><a href=\"javascript:window.close();\">"._PM_ORCLOSEWINDOW."</a></div>";
+ }
+ }
+ else {
+ echo implode('<br />', $GLOBALS['xoopsSecurity']->getErrors());
+ echo "<br /><a href=\"javascript:window.close();\">"._PM_ORCLOSEWINDOW."</a>";
+ }
+
+ } elseif ($reply == 1 || $send == 1 || $send2 == 1 || $sendmod =1) {
+ if ($reply == 1) {
+ $pm_handler =& xoops_gethandler('privmessage');
+ $pm =& $pm_handler->get($msg_id);
+ if ($pm->getVar("to_userid") == $xoopsUser->getVar('uid')) {
+ $pm_uname = XoopsUser::getUnameFromId($pm->getVar("from_userid"));
+ $message = "[quote]\n";
+ $message .= sprintf(_PM_USERWROTE,$pm_uname);
+ $message .= "\n".$pm->getVar("msg_text", "E")."\n[/quote]";
+ } else {
+ unset($pm);
+ $reply = $send2 = 0;
+ }
+ }
+
+ include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
+ $pmform = new XoopsForm('', 'pmform', 'pmlite.php', 'post', true);
+
+ if ($reply == 1) {
+ $subject = $pm->getVar('subject', 'E');
+ if (!preg_match("/^Re:/i",$subject)) {
+ $subject = 'Re: '.$subject;
+ }
+ $xoopsTpl->assign('to_username', $pm_uname);
+ $pmform->addElement(new XoopsFormHidden('to_userid', $pm->getVar("from_userid")));
+ }
+ elseif($sendmod == 1){
+ $xoopsTpl->assign('to_username', XoopsUser::getUnameFromId($_POST["to_userid"]));
+ $pmform->addElement(new XoopsFormHidden('to_userid', $_POST["to_userid"]));
+ $subject = $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['subject']));
+ $message = $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['message']));
+ }
+ else {
+ if ($send2 == 1) {
+ $xoopsTpl->assign('to_username', XoopsUser::getUnameFromId($to_userid, false));
+ $pmform->addElement(new XoopsFormHidden('to_userid', $to_userid));
+ }
+ else {
+ $to_username = new XoopsFormSelectUser('', 'to_userid');
+ $xoopsTpl->assign('to_username', $to_username->render());
+ }
+ $subject = "";
+ $message = "";
+ }
+ $pmform->addElement(new XoopsFormText('', 'subject', 30, 100, $subject), true);
+ $pmform->addElement(new XoopsFormDhtmlTextArea('', 'message', $message, 8, 37), true);
+ $pmform->addElement(new XoopsFormRadioYN('', 'savecopy', 0));
+
+ $pmform->addElement(new XoopsFormHidden('op', 'submit'));
+ $pmform->addElement(new XoopsFormButton('', 'submit', _PM_SUBMIT, 'submit'));
+ $pmform->addElement(new XoopsFormButton('', 'reset', _PM_CLEAR, 'reset'));
+
+ $cancel_send = new XoopsFormButton('', 'cancel', _PM_CANCELSEND, 'button');
+ $cancel_send->setExtra("onclick='javascript:window.close();'");
+ $pmform->addElement($cancel_send);
+ $pmform->assign($xoopsTpl);
+
+ $xoopsOption['template_main'] = "pm_pmlite.html";
+ }
+} else {
+ echo _PM_SORRY."<br /><br /><a href='".XOOPS_URL."/register.php'>"._PM_REGISTERNOW."</a>.";
+}
+
+include(XOOPS_ROOT_PATH."/footer.php");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/pmlite.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/readpmsg.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/readpmsg.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/readpmsg.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,176 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include_once "../../mainfile.php";
+
+if ( !is_object($xoopsUser) ) {
+ redirect_header("user.php",0);
+ exit();
+} else {
+ $_REQUEST['op'] = empty($_REQUEST['op'])?"in":$_REQUEST['op'];
+ $msg_id = empty($_REQUEST['msg_id'])?0:intval($_REQUEST['msg_id']);
+ $pm_handler =& xoops_getmodulehandler('privmessage');
+ if($msg_id>0){
+ $pm =& $pm_handler->get($msg_id);
+ }else{
+ $pm = null;
+ }
+ if (is_object($pm) && !empty($_POST['action']) ) {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ echo implode('<br />', $GLOBALS['xoopsSecurity']->getErrors());
+ exit();
+ }
+ $res = false;
+ if(!empty($_REQUEST['email_message'])){
+ $res = $pm_handler->sendEmail($pm, $xoopsUser);
+ }elseif(
+ !empty($_REQUEST['move_message'])
+ && $_REQUEST['op']!='save'
+ && !$xoopsUser->isAdmin()
+ && $pm_handler->getSavecount() >= $xoopsModuleConfig['max_save']
+ ){
+ $res_message = sprintf(_PM_SAVED_PART, $xoopsModuleConfig['max_save'], 0);
+ }else{
+ switch($_REQUEST['op']){
+ case 'out':
+ if($pm->getVar('from_userid') != $xoopsUser->getVar('uid')) break;
+ if(!empty($_REQUEST['delete_message'])){
+ $res = $pm_handler->setFromdelete($pm);
+ }elseif(!empty($_REQUEST['move_message'])){
+ $res = $pm_handler->setFromsave($pm);
+ }
+ break;
+ case 'save':
+ if($pm->getVar('to_userid') == $xoopsUser->getVar('uid')){
+ if(!empty($_REQUEST['delete_message'])){
+ $res1 = $pm_handler->setTodelete($pm);
+ $res1 = ($res1)?$pm_handler->setTosave($pm, 0):false;
+ }elseif(!empty($_REQUEST['move_message'])){
+ $res1 = $pm_handler->setTosave($pm, 0);
+ }
+ }
+ if($pm->getVar('from_userid') == $xoopsUser->getVar('uid')){
+ if(!empty($_REQUEST['delete_message'])){
+ $res2 = $pm_handler->setFromDelete($pm);
+ $res2 = ($res2)?$pm_handler->setFromsave($pm, 0):false;
+ }elseif(!empty($_REQUEST['move_message'])){
+ $res2 = $pm_handler->setFromsave($pm, 0);
+ }
+ }
+ $res = $res1 && $res2;
+ break;
+ case 'in':
+ default:
+ if($pm->getVar('to_userid') != $xoopsUser->getVar('uid')) break;
+ if(!empty($_REQUEST['delete_message'])){
+ $res = $pm_handler->setTodelete($pm);
+ }elseif(!empty($_REQUEST['move_message'])){
+ $res = $pm_handler->setTosave($pm);
+ }
+ break;
+ }
+ }
+ $res_message = isset($res_message)?$res_message:(($res)?_PM_ACTION_DONE:_PM_ACTION_ERROR);
+ redirect_header('viewpmsg.php?op='.$_REQUEST['op'], 2, $res_message);
+ }
+ $start = !empty($_GET['start']) ? intval($_GET['start']) : 0;
+ $total_messages = !empty($_GET['total_messages']) ? intval($_GET['total_messages']) : 0;
+ $xoopsOption['template_main'] = "pm_readpmsg.html";
+ include XOOPS_ROOT_PATH.'/header.php';
+
+ if(!is_object($pm)){
+ if ($_REQUEST['op'] == "out") {
+ $criteria = new CriteriaCompo(new Criteria('from_delete', 0));
+ $criteria->add(new Criteria('from_userid', $xoopsUser->getVar('uid')));
+ $criteria->add(new Criteria('from_save', 0));
+ }
+ elseif ($_REQUEST['op'] == "save") {
+ $crit_to = new CriteriaCompo(new Criteria('to_delete',0));
+ $crit_to->add(new Criteria('to_save',1));
+ $crit_to->add(new Criteria('to_userid',$xoopsUser->getVar('uid')));
+ $crit_from = new CriteriaCompo(new Criteria('from_delete',0));
+ $crit_from->add(new Criteria('from_save',1));
+ $crit_from->add(new Criteria('from_userid',$xoopsUser->getVar('uid')));
+ $criteria = new CriteriaCompo($crit_to);
+ $criteria->add($crit_from, "OR");
+ }
+ else {
+ $criteria = new CriteriaCompo(new Criteria('to_delete', 0));
+ $criteria->add(new Criteria('to_userid', $xoopsUser->getVar('uid')));
+ $criteria->add(new Criteria('to_save', 0));
+ }
+
+ $criteria->setLimit(1);
+ $criteria->setStart($start);
+ $criteria->setSort('msg_time');
+ $criteria->setOrder("DESC");
+ $pm_arr =& $pm_handler->getObjects($criteria);
+ $pm =& $pm_arr[0];
+ }
+
+ include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
+
+ $pmform = new XoopsForm('', 'pmform', 'readpmsg.php', 'post', true);
+ if($pm->getVar('from_userid') != $xoopsUser->getVar('uid')){
+ $reply_button = new XoopsFormButton('', 'send', _PM_REPLY);
+ $reply_button->setExtra("onclick='javascript:openWithSelfMain(\"".XOOPS_URL."/modules/pm/pmlite.php?reply=1&msg_id=$msg_id\",\"pmlite\",550,450);'");
+ $pmform->addElement($reply_button);
+ }
+ $pmform->addElement(new XoopsFormButton('', 'move_message', ($_REQUEST['op']=='save')?_PM_UNSAVE:_PM_TOSAVE, 'submit'));
+ $pmform->addElement(new XoopsFormButton('', 'delete_message', _PM_DELETE, 'submit'));
+ $pmform->addElement(new XoopsFormButton('', 'email_message', _PM_EMAIL, 'submit'));
+ $pmform->addElement(new XoopsFormHidden('msg_id', $pm->getVar("msg_id")));
+ $pmform->addElement(new XoopsFormHidden('op', $_REQUEST['op']));
+ $pmform->addElement(new XoopsFormHidden('action', 1));
+ $pmform->assign($xoopsTpl);
+
+ if ($pm->getVar("from_userid") == $xoopsUser->getVar("uid")) {
+ $poster = new XoopsUser($pm->getVar("to_userid"));
+ }else {
+ $poster = new XoopsUser($pm->getVar("from_userid"));
+ }
+ if (!is_object($poster)) {
+ $xoopsTpl->assign('poster', false);
+ $xoopsTpl->assign('anonymous', $xoopsConfig['anonymous']);
+ }else {
+ $xoopsTpl->assign('poster', $poster);
+ }
+
+ if ($pm->getVar("to_userid") == $xoopsUser->getVar("uid") && $pm->getVar('read_msg') == 0) {
+ $pm_handler->setRead($pm);
+ }
+
+ $message = $pm->toArray();
+ $message['msg_time'] = formatTimestamp($pm->getVar("msg_time"));
+ $xoopsTpl->assign('message', $message);
+ $xoopsTpl->assign('op', $_REQUEST['op']);
+ $xoopsTpl->assign('previous', $start-1);
+ $xoopsTpl->assign('next', $start+1);
+ $xoopsTpl->assign('total_messages', $total_messages);
+ include XOOPS_ROOT_PATH."/footer.php";
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/readpmsg.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/sql/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/sql/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/sql/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/sql/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/sql/mysql.sql
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/sql/mysql.sql 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/sql/mysql.sql 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,19 @@
+CREATE TABLE `priv_msgs` (
+ `msg_id` mediumint(8) unsigned NOT NULL auto_increment,
+ `msg_image` varchar(100) default NULL,
+ `subject` varchar(255) NOT NULL default '',
+ `from_userid` mediumint(8) unsigned NOT NULL default '0',
+ `to_userid` mediumint(8) unsigned NOT NULL default '0',
+ `msg_time` int(10) unsigned NOT NULL default '0',
+ `msg_text` text NOT NULL,
+ `read_msg` tinyint(1) unsigned NOT NULL default '0',
+ `from_delete` tinyint(1) unsigned NOT NULL default 0,
+ `from_save` tinyint(1) unsigned NOT NULL default 0,
+ `to_delete` tinyint(1) unsigned NOT NULL default 0,
+ `to_save` tinyint(1) unsigned NOT NULL default 0,
+ PRIMARY KEY (`msg_id`),
+ KEY to_userid (`to_userid`),
+ KEY inbox (`to_userid`,`read_msg`),
+ KEY outbox (`from_userid`, `read_msg`),
+ KEY prune (`msg_time`, `read_msg`, `from_save`, `to_delete`)
+) TYPE=MyISAM;
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/sql/mysql.sql
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/pm_pmlite.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/pm_pmlite.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/pm_pmlite.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,34 @@
+<{$pmform.javascript}>
+<form name="<{$pmform.name}>" id="<{$pmform.name}>" action="<{$pmform.action}>" method="<{$pmform.method}>" <{$pmform.extra}> >
+ <table width='300' align='center' class='outer'>
+ <tr>
+ <td class='head' width='30%'><{$smarty.const._PM_TO}></td>
+ <td class='even'><{if $pmform.elements.to_userid.hidden != 1}><{$pmform.elements.to_userid.body}><{/if}><{$to_username}></td>
+ </tr>
+ <tr>
+ <td class='head' width='30%'><{$smarty.const._PM_SUBJECTC}></td>
+ <td class='even'><{$pmform.elements.subject.body}></td>
+ </tr>
+ <tr valign='top'>
+ <td class='head' width='30%'><{$smarty.const._PM_MESSAGEC}></td>
+ <td class='even'><{$pmform.elements.message.body}></td>
+ </tr>
+ <tr valign='top'>
+ <td class='head' width='30%'><{$smarty.const._PM_SAVEINOUTBOX}></td>
+ <td class='even'><{$pmform.elements.savecopy.body}></td>
+ </tr>
+ <tr>
+ <td class='head'> </td>
+ <td class='even'>
+ <{foreach item=element from=$pmform.elements}>
+ <{if $element.hidden == 1}>
+ <{$element.body}>
+ <{/if}>
+ <{/foreach}>
+ <{$pmform.elements.submit.body}>
+ <{$pmform.elements.reset.body}>
+ <{$pmform.elements.cancel.body}>
+ </td>
+ </tr>
+ </table>
+</form>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/pm_pmlite.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/pm_readpmsg.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/pm_readpmsg.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/pm_readpmsg.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,74 @@
+<div>
+ <h4><{$smarty.const._PM_PRIVATEMESSAGE}></h4>
+</div><br />
+<{if $op==out}>
+ <a href='viewpmsg.php?op=out'><{$smarty.const._PM_OUTBOX}></a>
+<{elseif $op == "save"}>
+ <a href='viewpmsg.php?op=save'><{$smarty.const._PM_SAVEBOX}></a>
+<{else}>
+ <a href='viewpmsg.php?op=in'><{$smarty.const._PM_INBOX}></a>
+<{/if}>
+
+<{if $message}>
+ <span style='font-weight:bold;'>»»</span> <{$message.subject}><br />
+ <form name="<{$pmform.name}>" id="<{$pmform.name}>" action="<{$pmform.action}>" method="<{$pmform.method}>" <{$pmform.extra}> >
+ <table border='0' cellpadding='4' cellspacing='1' class='outer' width='100%'>
+ <tr>
+ <th colspan='2'><{if $op==out}><{$smarty.const._PM_TO}><{else}><{$smarty.const._PM_FROM}><{/if}></th>
+ </tr>
+ <tr class='even'>
+ <td valign='top'>
+ <{if ( $poster != false ) }>
+ <a href='<{$xoops_url}>/userinfo.php?uid=<{$poster->getVar("uid")}>'><{$poster->getVar("uname")}></a><br />
+ <{if ( $poster->getVar("user_avatar") != "" ) }>
+ <img src='<{$xoops_url}>/uploads/<{$poster->getVar("user_avatar")}>' alt='' /><br />
+ <{/if}>
+ <{if ( $poster->getVar("user_from") != "" ) }>
+ <{$smarty.const._PM_FROMC}><{$poster->getVar("user_from")}><br /><br />
+ <{/if}>
+ <{if ( $poster->isOnline() ) }>
+ <span style='color:#ee0000;font-weight:bold;'><{$smarty.const._PM_ONLINE}></span><br /><br />
+ <{/if}>
+ <{else}>
+ <{$anonymous}>
+ <{/if}>
+ </td>
+ <td>
+ <img src='<{$xoops_url}>/images/subject/<{$message.msg_image}>' alt='' /> <{$smarty.const._PM_SENTC}><{$message.msg_time}>
+ <hr />
+ <b><{$message.subject}></b><br />
+ <br />
+ <{$message.msg_text}><br />
+ <br />
+ </td>
+ </tr>
+ <tr class='foot'>
+ <td width='20%' colspan='2' align='left'>
+ <{foreach item=element from=$pmform.elements}>
+ <{$element.body}>
+ <{/foreach}>
+ </td>
+ </tr>
+ <tr>
+ <td colspan='2' align='right'>
+ <{if ( $previous >= 0 ) }>
+ <a href='readpmsg.php?start=<{$previous}>&total_messages=<{$total_messages}>&op=<{$op}>'>
+ <{$smarty.const._PM_PREVIOUS}>
+ </a> |
+ <{else}>
+ <{$smarty.const._PM_PREVIOUS}> |
+ <{/if}>
+ <{if ( $next < $total_messages ) }>
+ <a href='readpmsg.php?start=<{$next}>&total_messages=<{$total_messages}>&op=<{$op}>'>
+ <{$smarty.const._PM_NEXT}>
+ </a>
+ <{else}>
+ <{$smarty.const._PM_NEXT}>
+ <{/if}>
+ </td>
+ </tr>
+ </table>
+ </form>
+<{else}>
+ <br /><br /><{$smarty.const._PM_YOUDONTHAVE}>
+<{/if}>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/pm_readpmsg.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/pm_viewpmsg.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/pm_viewpmsg.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/pm_viewpmsg.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,104 @@
+<h4 style='text-align:center;'><{$smarty.const._PM_PRIVATEMESSAGE}></h4><br />
+<div style="float:right; width: 18%; text-align: right;">
+ <{if $op == "out"}>
+ <a href='viewpmsg.php?op=in'><{$smarty.const._PM_INBOX}></a> | <a href='viewpmsg.php?op=save'><{$smarty.const._PM_SAVEBOX}></a>
+ <{elseif $op == "save"}>
+ <a href='viewpmsg.php?op=in'><{$smarty.const._PM_INBOX}></a> | <a href='viewpmsg.php?op=out'><{$smarty.const._PM_OUTBOX}></a>
+ <{elseif $op == "in"}>
+ <a href='viewpmsg.php?op=out'><{$smarty.const._PM_OUTBOX}></a> | <a href='viewpmsg.php?op=save'><{$smarty.const._PM_SAVEBOX}></a>
+ <{/if}>
+</div>
+<div style="float:left; width: 80%;">
+ <{if $op == "out"}><{$smarty.const._PM_OUTBOX}>
+ <{elseif $op == "save"}><{$smarty.const._PM_SAVEBOX}>
+ <{else}><{$smarty.const._PM_INBOX}><{/if}>
+</div>
+<br />
+<br />
+<{if $msg}>
+ <div class="confirmMsg"><{$msg}></div>
+<{/if}>
+<{if $errormsg}>
+ <div class="errorMsg"><{$errormsg}></div>
+<{/if}>
+<{if $pagenav}>
+<div style="padding: 5px;float: right; text-align:right;">
+<{$pagenav}>
+</div>
+<br clear="all" />
+<{/if}>
+<form name="<{$pmform.name}>" id="<{$pmform.name}>" action="<{$pmform.action}>" method="<{$pmform.method}>" <{$pmform.extra}> >
+ <table border='0' cellspacing='1' cellpadding='4' width='100%' class='outer'>
+
+ <tr align='center' valign='middle'>
+ <th><input name='allbox' id='allbox' onclick='xoopsCheckAll("<{$pmform.name}>", "allbox");' type='checkbox' value='Check All' /></th>
+ <th><img src='<{$xoops_url}>/images/download.gif' alt='' border='0' /></th>
+ <th> </th>
+ <{if $op == "out"}>
+ <th><{$smarty.const._PM_TO}></th>
+ <{else}>
+ <th><{$smarty.const._PM_FROM}></th>
+ <{/if}>
+ <th><{$smarty.const._PM_SUBJECT}></th>
+ <th align='center'><{$smarty.const._PM_DATE}></th>
+ </tr>
+
+ <{if $total_messages == 0}>
+ <tr>
+ <td class='even' colspan='6' align='center'><{$smarty.const._PM_YOUDONTHAVE}></td>
+ </tr>
+ <{/if}>
+ <{foreach item=message from=$messages}>
+ <tr align='left' class='<{cycle values="odd, even"}>'>
+ <td valign='top' width='2%' align='center'>
+ <input type='checkbox' id='msg_id_<{$message.msg_id}>' name='msg_id[]' value='<{$message.msg_id}>' />
+ </td>
+ <{if $message.read_msg == 1}>
+ <td valign='top' width='5%' align='center'> </td>
+ <{else}>
+ <td valign='top' width='5%' align='center'><img src='images/read.gif' alt='<{$smarty.const._PM_NOTREAD}>' /></td>
+ <{/if}>
+ <td valign='top' width='5%' align='center'>
+ <{if $message.msg_image != ""}>
+ <img src='<{$xoops_url}>/images/subject/<{$message.msg_image}>' alt='' />
+ <{/if}>
+ </td>
+ <td valign='middle' width='10%'>
+ <{if $message.postername != ""}>
+ <a href='<{$xoops_url}>/userinfo.php?uid=<{$message.posteruid}>'><{$message.postername}></a>
+ <{else}>
+ <{$anonymous}>
+ <{/if}>
+ </td>
+ <td valign='middle'>
+ <a href='readpmsg.php?msg_id=<{$message.msg_id}>start=<{$message.msg_no}>&total_messages=<{$total_messages}>&op=<{$op}>'>
+ <{$message.subject}>
+ </a>
+ </td>
+ <td valign='middle' align='center' width='20%'>
+ <{$message.msg_time}>
+ </td>
+ </tr>
+ <{/foreach}>
+ <tr class='bg2' align='left'>
+ <td colspan='6' align='left'>
+ <{$pmform.elements.send.body}>
+ <{if $display}>
+ <{$pmform.elements.move_messages.body}>
+ <{$pmform.elements.delete_messages.body}>
+ <{$pmform.elements.empty_messages.body}>
+ <{/if}>
+ <{foreach item=element from=$pmform.elements}>
+ <{if $element.hidden == 1}>
+ <{$element.body}>
+ <{/if}>
+ <{/foreach}>
+ </td>
+ </tr>
+ </table>
+</form>
+<{if $pagenav}>
+<div style="padding: 5px;float: right; text-align:right;">
+<{$pagenav}>
+</div>
+<{/if}>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/templates/pm_viewpmsg.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/viewpmsg.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/viewpmsg.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/viewpmsg.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,244 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include_once "../../mainfile.php";
+
+if (!is_object($xoopsUser)) {
+ $errormessage = _PM_SORRY."<br />"._PM_PLZREG."";
+ redirect_header(XOOPS_URL."/user.php",2,$errormessage);
+} else {
+ $_REQUEST['op'] = empty($_REQUEST['op'])?"in":$_REQUEST['op'];
+ $start = empty($_REQUEST["start"])?0:intval($_REQUEST["start"]);
+ $pm_handler =& xoops_getmodulehandler('privmessage');
+ if (isset($_POST['delete_messages']) && isset($_POST['msg_id'])) {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ $xoopsTpl->assign('errormsg', implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ elseif (empty($_REQUEST['ok'])) {
+ xoops_confirm(array('ok' => 1, 'delete_messages' => 1, 'op' => $_REQUEST['op'], 'msg_id'=>serialize(array_map("intval",$_POST['msg_id']))), $_SERVER['REQUEST_URI'], _PM_RUSUREDELETE);
+ include XOOPS_ROOT_PATH."/footer.php";
+ exit();
+ }
+ else{
+ $_POST['msg_id'] = unserialize($_POST['msg_id']);
+ $size = count($_POST['msg_id']);
+ $msg =& $_POST['msg_id'];
+ for ( $i = 0; $i < $size; $i++ ) {
+ $pm =& $pm_handler->get($msg[$i]);
+ if ($pm->getVar('to_userid') == $xoopsUser->getVar('uid')) {
+ $pm_handler->setTodelete($pm);
+ }elseif ($pm->getVar('from_userid') == $xoopsUser->getVar('uid')) {
+ $pm_handler->setFromdelete($pm);
+ }
+ unset($pm);
+ }
+ $xoopsTpl->assign('msg', _PM_DELETED);
+ }
+ }
+ if (isset($_POST['move_messages']) && isset($_POST['msg_id'])) {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ $xoopsTpl->assign('errormsg', implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ else{
+ $size = count($_POST['msg_id']);
+ $msg =& $_POST['msg_id'];
+ if($_POST['op']=='save'){
+ for ( $i = 0; $i < $size; $i++ ) {
+ $pm =& $pm_handler->get($msg[$i]);
+ if($_POST['op']=='save'){
+ if ($pm->getVar('to_userid') == $xoopsUser->getVar('uid')) {
+ $pm_handler->setTosave($pm, 0);
+ }elseif ($pm->getVar('from_userid') == $xoopsUser->getVar('uid')) {
+ $pm_handler->setFromsave($pm, 0);
+ }
+ }
+ unset($pm);
+ }
+ }else{
+ if(!$xoopsUser->isAdmin()){
+ $total_save = $pm_handler->getSavecount();
+ $size=min($size, ($xoopsModuleConfig['max_save']-$total_save));
+ }
+ for ( $i = 0; $i < $size; $i++ ) {
+ $pm =& $pm_handler->get($msg[$i]);
+ if($_POST['op']=='in'){
+ $pm_handler->setTosave($pm);
+ }
+ elseif($_POST['op']=='out'){
+ $pm_handler->setFromsave($pm);
+ }
+ unset($pm);
+ }
+ }
+ if($_POST['op']=='save'){
+ $xoopsTpl->assign('msg', _PM_UNSAVED);
+ }elseif(isset($total_save) && !$xoopsUser->isAdmin()){
+ $xoopsTpl->assign('msg', sprintf(_PM_SAVED_PART, $xoopsModuleConfig['max_save'], $i));
+ }else{
+ $xoopsTpl->assign('msg', _PM_SAVED_ALL);
+ }
+ }
+ }
+ if (isset($_REQUEST['empty_messages'])) {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ $xoopsTpl->assign('errormsg', implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ elseif (empty($_REQUEST['ok'])) {
+ xoops_confirm(array('ok' => 1, 'empty_messages' => 1, 'op' => $_REQUEST['op']), $_SERVER['REQUEST_URI'], _PM_RUSUREEMPTY);
+ include XOOPS_ROOT_PATH."/footer.php";
+ exit();
+ }
+ else {
+ if($_POST['op']=='save'){
+ $crit_to = new CriteriaCompo(new Criteria('to_delete',0));
+ $crit_to->add(new Criteria('to_save',1));
+ $crit_to->add(new Criteria('to_userid',$xoopsUser->getVar('uid')));
+ $crit_from = new CriteriaCompo(new Criteria('from_delete',0));
+ $crit_from->add(new Criteria('from_save',1));
+ $crit_from->add(new Criteria('from_userid',$xoopsUser->getVar('uid')));
+ $criteria = new CriteriaCompo($crit_to);
+ $criteria->add($crit_from, "OR");
+ }
+ elseif($_POST['op']=='out'){
+ $criteria = new CriteriaCompo(new Criteria('from_delete', 0));
+ $criteria->add(new Criteria('from_userid', $xoopsUser->getVar('uid')));
+ $criteria->add(new Criteria('from_save', 0));
+ }
+ else{
+ $criteria = new CriteriaCompo(new Criteria('to_delete', 0));
+ $criteria->add(new Criteria('to_userid', $xoopsUser->getVar('uid')));
+ $criteria->add(new Criteria('to_save', 0));
+ }
+ $pms =& $pm_handler->getObjects($criteria);
+ unset($criteria);
+ if(count($pms)>0){
+ foreach (array_keys($pms) as $i) {
+ if ($pms[$i]->getVar('to_userid') == $xoopsUser->getVar('uid')) {
+ if($_POST['op']=='save'){
+ $pm_handler->setTosave($pms[$i],0);
+ }elseif($_POST['op']=='in'){
+ $pm_handler->setTodelete($pms[$i]);
+ }
+ }
+ if ($pms[$i]->getVar('from_userid') == $xoopsUser->getVar('uid')) {
+ if($_POST['op']=='save'){
+ $pm_handler->setFromsave($pms[$i],0);
+ }elseif($_POST['op']=='out'){
+ $pm_handler->setFromdelete($pms[$i]);
+ }
+ }
+ }
+ }
+ $xoopsTpl->assign('msg', _PM_EMPTIED);
+ }
+ }
+ $xoopsConfig['module_cache'] = 0; //disable caching since the URL will be the same, but content different from one user to another
+ $xoopsOption['template_main'] = "pm_viewpmsg.html";
+ include XOOPS_ROOT_PATH.'/header.php';
+
+ if ($_REQUEST['op'] == "out") {
+ $criteria = new CriteriaCompo(new Criteria('from_delete', 0));
+ $criteria->add(new Criteria('from_userid', $xoopsUser->getVar('uid')));
+ $criteria->add(new Criteria('from_save', 0));
+ }
+ elseif ($_REQUEST['op'] == "save") {
+ $crit_to = new CriteriaCompo(new Criteria('to_delete',0));
+ $crit_to->add(new Criteria('to_save',1));
+ $crit_to->add(new Criteria('to_userid',$xoopsUser->getVar('uid')));
+ $crit_from = new CriteriaCompo(new Criteria('from_delete',0));
+ $crit_from->add(new Criteria('from_save',1));
+ $crit_from->add(new Criteria('from_userid',$xoopsUser->getVar('uid')));
+ $criteria = new CriteriaCompo($crit_to);
+ $criteria->add($crit_from, "OR");
+ }
+ else {
+ $criteria = new CriteriaCompo(new Criteria('to_delete', 0));
+ $criteria->add(new Criteria('to_userid', $xoopsUser->getVar('uid')));
+ $criteria->add(new Criteria('to_save', 0));
+ }
+ $xoopsTpl->assign('op', $_REQUEST['op']);
+ $criteria->setStart($start);
+ $criteria->setLimit($xoopsModuleConfig['perpage']);
+ $criteria->setSort("msg_time");
+ $criteria->setOrder("DESC");
+ $pm_arr =& $pm_handler->getObjects($criteria);
+ $total_messages = $pm_handler->getCount($criteria);
+ unset($criteria);
+ $xoopsTpl->assign('total_messages', $total_messages);
+ if ( $total_messages > $xoopsModuleConfig['perpage']) {
+ include XOOPS_ROOT_PATH.'/class/pagenav.php';
+ $nav = new XoopsPageNav($total_messages, $xoopsModuleConfig['perpage'], $start, "start", 'op='.$_REQUEST['op']);
+ $xoopsTpl->assign('pagenav', $nav->renderNav(4));
+ }
+
+ $xoopsTpl->assign('display', $total_messages > 0);
+ $xoopsTpl->assign('anonymous', $xoopsConfig['anonymous']);
+ if(count($pm_arr)>0){
+ foreach (array_keys($pm_arr) as $i) {
+ if (isset($_REQUEST['op']) && $_REQUEST['op'] == "out") {
+ $uids[] = $pm_arr[$i]->getVar('to_userid');
+ }
+ else {
+ $uids[] = $pm_arr[$i]->getVar('from_userid');
+ }
+ }
+ $member_handler =& xoops_gethandler('member');
+ $senders =& $member_handler->getUserList(new Criteria('uid', "(".implode(',', array_unique($uids)).")", "IN"));
+ foreach (array_keys($pm_arr) as $i) {
+ $message = $pm_arr[$i]->toArray();
+ $message['msg_time'] = formatTimestamp($message["msg_time"]);
+ if (isset($_REQUEST['op']) && $_REQUEST['op'] == "out") {
+ $message['postername'] = $senders[$pm_arr[$i]->getVar('to_userid')];
+ $message['posteruid'] = $pm_arr[$i]->getVar('to_userid');
+ }
+ else {
+ $message['postername'] = $senders[$pm_arr[$i]->getVar('from_userid')];
+ $message['posteruid'] = $pm_arr[$i]->getVar('from_userid');
+ }
+ $message['msg_no'] = $i;
+ $xoopsTpl->append('messages', $message);
+ }
+ }
+
+ include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
+ $send_button = new XoopsFormButton('', 'send', _PM_SEND);
+ $send_button->setExtra("onclick='javascript:openWithSelfMain(\"".XOOPS_URL."/modules/pm/pmlite.php?send=1\",\"pmlite\",550,450);'");
+ $delete_button = new XoopsFormButton('', 'delete_messages', _PM_DELETE, 'submit');
+ $move_button = new XoopsFormButton('', 'move_messages', ($_REQUEST['op']=='save')?_PM_UNSAVE:_PM_TOSAVE, 'submit');
+ $empty_button = new XoopsFormButton('', 'empty_messages', _PM_EMPTY, 'submit');
+
+ $pmform = new XoopsForm('', 'pmform', 'viewpmsg.php', 'post', true);
+ $pmform->addElement($send_button);
+ $pmform->addElement($move_button);
+ $pmform->addElement($delete_button);
+ $pmform->addElement($empty_button);
+ $pmform->addElement(new XoopsFormHidden('op', $_REQUEST['op']));
+ $pmform->assign($xoopsTpl);
+
+ include XOOPS_ROOT_PATH."/footer.php";
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/viewpmsg.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/xoops_version.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/xoops_version.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/xoops_version.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,116 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$modversion['name'] = _PM_MI_NAME;
+$modversion['version'] = 0.1;
+$modversion['description'] = _PM_MI_DESC;
+$modversion['author'] = "Jan Pedersen";
+$modversion['credits'] = "The XOOPS Project, Wanikoo";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 1;
+$modversion['image'] = "images/pm_logo.jpg";
+$modversion['dirname'] = "pm";
+
+// Admin things
+$modversion['hasAdmin'] = 1;
+$modversion['adminindex'] = "admin/admin.php";
+$modversion['adminmenu'] = "admin/menu.php";
+
+//$modversion['sqlfile']['mysql'] = "sql/mysql.sql";
+
+// Table
+$modversion['tables'][0] = "priv_msgs";
+
+//install
+$modversion['onInstall'] = 'include/install.php';
+//update
+$modversion['onUpdate'] = 'include/update.php';
+
+// Templates
+$modversion['templates'][1]['file'] = 'pm_pmlite.html';
+$modversion['templates'][1]['description'] = '';
+$modversion['templates'][2]['file'] = 'pm_readpmsg.html';
+$modversion['templates'][2]['description'] = '';
+$modversion['templates'][3]['file'] = 'pm_lookup.html';
+$modversion['templates'][3]['description'] = '';
+$modversion['templates'][4]['file'] = 'pm_viewpmsg.html';
+$modversion['templates'][4]['description'] = '';
+
+// Menu
+$modversion['hasMain'] = 1;
+
+$modversion['config'][]=array(
+ 'name' => 'perpage',
+ 'title' => '_PM_MI_PERPAGE',
+ 'description' => '_PM_MI_PERPAGE_DESC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'int',
+ 'default' => 20);
+
+$modversion['config'][]=array(
+ 'name' => 'max_save',
+ 'title' => '_PM_MI_MAXSAVE',
+ 'description' => '_PM_MI_MAXSAVE_DESC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'int',
+ 'default' => 10);
+
+$modversion['config'][]=array(
+ 'name' => 'prunesubject',
+ 'title' => '_PM_MI_PRUNESUBJECT',
+ 'description' => '_PM_MI_PRUNESUBJECT_DESC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'text',
+ 'default' => _PM_MI_PRUNESUBJECTDEFAULT);
+
+$modversion['config'][]=array(
+ 'name' => 'prunemessage',
+ 'title' => '_PM_MI_PRUNEMESSAGE',
+ 'description' => '_PM_MI_PRUNEMESSAGE_DESC',
+ 'formtype' => 'textarea',
+ 'valuetype' => 'text',
+ 'default' => _PM_MI_PRUNEMESSAGEDEFAULT);
+
+// User Profile
+$modversion['hasProfile'] = 1;
+
+$modversion['profile']['field'][1]['name'] = 'pm_link';
+$modversion['profile']['field'][1]['type'] = 'autotext';
+$modversion['profile']['field'][1]['valuetype'] = XOBJ_DTYPE_TXTAREA;
+$modversion['profile']['field'][1]['default'] = "<a href=\"javascript:openWithSelfMain('{X_URL}/modules/pm/pmlite.php?send2=1&to_userid={X_UID}', 'pmlite', 550, 450);\" title=\""._PM_MI_MESSAGE." {X_UNAME}\"><img src=\"{X_URL}/modules/pm/images/pm.gif\" alt=\""._PM_MI_MESSAGE." {X_UNAME}\" /></a>";
+$modversion['profile']['field'][1]['show'] = 1;
+$modversion['profile']['field'][1]['title'] = _PM_MI_LINK_TITLE;
+$modversion['profile']['field'][1]['edit'] = 0;
+$modversion['profile']['field'][1]['description'] = _PM_MI_LINK_DESCRIPTION;
+$modversion['profile']['field'][1]['required'] = 0;
+$modversion['profile']['field'][1]['config'] = 0;
+$modversion['profile']['field'][1]['options'] = array();
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/pm/xoops_version.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/activate.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/activate.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/activate.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,127 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Patch made by XoopsTotal - Fernando Santos, fernando at zend.com.br //
+// www.xoopstotal.com.br //
+// ------------------------------------------------------------------------ //
+//$xoopsOption['pagetype'] = "user";
+include "../../mainfile.php";
+include XOOPS_ROOT_PATH.'/header.php';
+
+if (isset($_REQUEST['op']) && $_REQUEST['op'] == "actv") {
+ if ( file_exists(XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/user.php") ) {
+ include_once XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/user.php";
+ } else {
+ include_once XOOPS_ROOT_PATH."/language/english/user.php";
+ }
+ $id = intval($_GET['id']);
+ $actkey = trim($_GET['actkey']);
+ if (empty($id)) {
+ redirect_header(XOOPS_URL,1,'');
+ exit();
+ }
+ $member_handler =& xoops_gethandler('member');
+ $thisuser =& $member_handler->getUser($id);
+ if (!is_object($thisuser)) {
+ exit();
+ }
+ if ($thisuser->getVar('actkey') != $actkey) {
+ redirect_header(XOOPS_URL.'/index.php',5,_PROFILE_MA_ACTKEYNOT);
+ } else {
+ if ($thisuser->getVar('level') > 0 ) {
+ redirect_header(XOOPS_URL.'/user.php',5,_PROFILE_MA_ACONTACT);
+ } else {
+ if (false != $member_handler->activateUser($thisuser)) {
+ $config_handler =& xoops_gethandler('config');
+ if ($xoopsModuleConfig['activation_type'] == 2) {
+ $myts =& MyTextSanitizer::getInstance();
+ $xoopsMailer =& getMailer();
+ $xoopsMailer->useMail();
+ $xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH."/modules/profile/language/".$xoopsConfig['language']."/mail_template");
+ $xoopsMailer->setTemplate('activated.tpl');
+ $xoopsMailer->assign('SITENAME', $xoopsConfig['sitename']);
+ $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
+ $xoopsMailer->assign('SITEURL', XOOPS_URL."/");
+ $xoopsMailer->setToUsers($thisuser);
+ $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
+ $xoopsMailer->setFromName($xoopsConfig['sitename']);
+ $xoopsMailer->setSubject(sprintf(_PROFILE_MA_YOURACCOUNT,$xoopsConfig['sitename']));
+ include XOOPS_ROOT_PATH.'/header.php';
+ if ( !$xoopsMailer->send() ) {
+ printf(_PROFILE_MA_ACTVMAILNG, $thisuser->getVar('uname'));
+ } else {
+ printf(_PROFILE_MA_ACTVMAILOK, $thisuser->getVar('uname'));
+ }
+ include XOOPS_ROOT_PATH.'/footer.php';
+ } else {
+ redirect_header(XOOPS_URL.'/user.php',5,_PROFILE_MA_ACTLOGIN);
+ }
+ } else {
+ redirect_header(XOOPS_URL.'/index.php',5,'Activation failed!');
+ }
+ }
+ }
+ exit();
+}
+elseif (!isset($_REQUEST['submit']) || !isset($_REQUEST['email']) || trim($_REQUEST['email']) == "") {
+ include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
+ $form = new XoopsThemeForm('', 'form', 'activate.php');
+ $form->addElement(new XoopsFormText(_PROFILE_MA_EMAIL, 'email', 25, 255));
+ $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
+ $form->display();
+}else{
+ $myts =& MyTextSanitizer::getInstance();
+ $member_handler =& xoops_gethandler('member');
+ $getuser =& $member_handler->getUsers(new Criteria('email', $myts->addSlashes(trim($_REQUEST['email']))));
+ if (count($getuser) == 0) {
+ redirect_header(XOOPS_URL, 2, _PROFILE_MA_SORRYNOTFOUND);
+ }
+ if($getuser[0]->isActive()){
+ redirect_header(XOOPS_URL, 2, sprintf(_PROFILE_MA_USERALREADYACTIVE, $getuser[0]->getVar('email')));
+ }
+ if($getuser[0]->isDisabled()){
+ redirect_header(XOOPS_URL, 2, sprintf(_PROFILE_MA_USERDISABLED, $getuser[0]->getVar('email')));
+ }
+ $xoopsMailer =& getMailer();
+ $xoopsMailer->useMail();
+ $xoopsMailer->setTemplate('register.tpl');
+ $xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar('dirname')."/language/".$xoopsConfig['language']."/mail_template/");
+ $xoopsMailer->assign('SITENAME', $xoopsConfig['sitename']);
+ $xoopsMailer->assign('ADMINMAIL',
+ $xoopsConfig['adminmail']);
+ $xoopsMailer->assign('SITEURL', XOOPS_URL."/");
+ $xoopsMailer->setToUsers($getuser[0]);
+ $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
+ $xoopsMailer->setFromName($xoopsConfig['sitename']);
+ $xoopsMailer->setSubject($xoopsMailer->setSubject(sprintf(_PROFILE_MA_USERKEYFOR, $getuser[0]->getVar('uname'))));
+ if ( !$xoopsMailer->send() ) {
+ echo _PROFILE_MA_YOURREGMAILNG;
+ } else {
+ echo _PROFILE_MA_YOURREGISTERED;
+ }
+}
+include XOOPS_ROOT_PATH.'/footer.php';
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/activate.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/admin.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/admin.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/admin.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,37 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: XOOPS Foundation //
+// URL: http://www.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+include '../../../include/cp_header.php';
+xoops_cp_header();
+
+$xTheme->loadModuleAdminMenu(1, _PROFILE_MI_INDEX);
+
+xoops_cp_footer();
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/admin.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/category.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/category.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/category.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,100 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: XOOPS Foundation //
+// URL: http://www.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+include '../../../include/cp_header.php';
+xoops_cp_header();
+$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : (isset($_REQUEST['id']) ? "edit" : 'list');
+
+$handler =& xoops_getmodulehandler('category');
+$xTheme->loadModuleAdminMenu(2, _PROFILE_MI_CATEGORIES);
+switch($op) {
+ default:
+ case "list":
+ $xoopsTpl->assign('categories', $handler->getObjects(null, true, false));
+ $xoopsOption['template_main'] = "profile_admin_categorylist.html";
+ break;
+
+ case "new":
+ include_once('../include/forms.php');
+ $obj =& $handler->create();
+ $form =& $obj->getForm();
+ $form->display();
+ break;
+
+ case "edit":
+ include_once('../include/forms.php');
+ $obj =& $handler->get($_REQUEST['id']);
+ $form =& $obj->getForm();
+ $form->display();
+ break;
+
+ case "save":
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('category.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if (isset($_REQUEST['id'])) {
+ $obj =& $handler->get($_REQUEST['id']);
+ }
+ else {
+ $obj =& $handler->create();
+ }
+ $obj->setVar('cat_title', $_REQUEST['cat_title']);
+ $obj->setVar('cat_description', $_REQUEST['cat_description']);
+ $obj->setVar('cat_weight', $_REQUEST['cat_weight']);
+ if ($handler->insert($obj)) {
+ redirect_header('category.php', 3, sprintf(_PROFILE_AM_SAVEDSUCCESS, _PROFILE_AM_CATEGORY));
+ }
+ include_once('../include/forms.php');
+ echo $obj->getHtmlErrors();
+ $form =& $obj->getForm();
+ $form->display();
+ break;
+
+ case "delete":
+ $obj =& $handler->get($_REQUEST['id']);
+ if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('category.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if ($handler->delete($obj)) {
+ redirect_header('category.php', 3, sprintf(_PROFILE_AM_DELETEDSUCCESS, _PROFILE_AM_CATEGORY));
+ }
+ else {
+ echo $obj->getHtmlErrors();
+ }
+ }
+ else {
+ xoops_confirm(array('ok' => 1, 'id' => $_REQUEST['id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_PROFILE_AM_RUSUREDEL, $obj->getVar('cat_title')));
+ }
+ break;
+}
+
+xoops_cp_footer();
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/category.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/field.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/field.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/field.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,337 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: XOOPS Foundation //
+// URL: http://www.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+include '../../../include/cp_header.php';
+xoops_cp_header();
+$xTheme->loadModuleAdminMenu(3, _PROFILE_MI_FIELDS);
+$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : (isset($_REQUEST['id']) ? "edit" : 'list');
+
+$profilefield_handler =& xoops_gethandler('profilefield');
+
+switch($op) {
+ default:
+ case "list":
+ $fields =& $profilefield_handler->getObjects(null, true, false);
+
+ $module_handler =& xoops_gethandler('module');
+ $modules =& $module_handler->getObjects(null, true);
+
+ $fieldcat_handler =& xoops_getmodulehandler('fieldcategory');
+ $fieldcats =& $fieldcat_handler->getObjects(null, true);
+
+ $cat_handler =& xoops_getmodulehandler('category');
+ $criteria = new CriteriaCompo();
+ $criteria->setSort('cat_weight');
+ $cats =& $cat_handler->getObjects($criteria, true);
+ unset($criteria);
+
+ $categories[0] = _PROFILE_AM_DEFAULT;
+ if (count($cats) > 0) {
+ foreach (array_keys($cats) as $i) {
+ $categories[$cats[$i]->getVar('catid')] = $cats[$i]->getVar('cat_title');
+ }
+ }
+ $xoopsTpl->assign('categories', $categories);
+ unset($categories);
+ $valuetypes = array(XOBJ_DTYPE_ARRAY => _PROFILE_AM_ARRAY,
+ XOBJ_DTYPE_EMAIL => _PROFILE_AM_EMAIL,
+ XOBJ_DTYPE_INT => _PROFILE_AM_INT,
+ XOBJ_DTYPE_TXTAREA => _PROFILE_AM_TXTAREA,
+ XOBJ_DTYPE_TXTBOX => _PROFILE_AM_TXTBOX,
+ XOBJ_DTYPE_URL => _PROFILE_AM_URL,
+ XOBJ_DTYPE_OTHER => _PROFILE_AM_OTHER,
+ XOBJ_DTYPE_MTIME => _PROFILE_AM_DATE);
+
+ $fieldtypes = array('checkbox' => _PROFILE_AM_CHECKBOX,
+ 'group' => _PROFILE_AM_GROUP,
+ 'group_multi' => _PROFILE_AM_GROUPMULTI,
+ 'language' => _PROFILE_AM_LANGUAGE,
+ 'radio' => _PROFILE_AM_RADIO,
+ 'select' => _PROFILE_AM_SELECT,
+ 'select_multi' => _PROFILE_AM_SELECTMULTI,
+ 'textarea' => _PROFILE_AM_TEXTAREA,
+ 'dhtml' => _PROFILE_AM_DHTMLTEXTAREA,
+ 'textbox' => _PROFILE_AM_TEXTBOX,
+ 'timezone' => _PROFILE_AM_TIMEZONE,
+ 'yesno' => _PROFILE_AM_YESNO,
+ 'date' => _PROFILE_AM_DATE,
+ 'datetime' => _PROFILE_AM_DATETIME,
+ 'theme' => _PROFILE_AM_THEME,
+ 'autotext' => _PROFILE_AM_AUTOTEXT);
+
+ foreach (array_keys($fields) as $i) {
+ $fields[$i]['canEdit'] = $fields[$i]['field_config'] || $fields[$i]['field_show'] || $fields[$i]['field_edit'];
+ $fields[$i]['canDelete'] = $fields[$i]['field_config'];
+ $fields[$i]['module'] = $modules[$fields[$i]['field_moduleid']]->getVar('name');
+ $fields[$i]['fieldtype'] = $fieldtypes[$fields[$i]['field_type']];
+ $fields[$i]['valuetype'] = $valuetypes[$fields[$i]['field_valuetype']];
+ $fields[$i]['catid'] = isset($fieldcats[$fields[$i]['fieldid']]) ? $fieldcats[$fields[$i]['fieldid']]->getVar('catid') : 0;
+ $fields[$i]['field_weight'] = isset($fieldcats[$fields[$i]['fieldid']]) ? intval($fieldcats[$fields[$i]['fieldid']]->getVar('field_weight')) : 1;
+ $categories[$fields[$i]['catid']][] = $fields[$i];
+ $weights[$fields[$i]['catid']][] = $fields[$i]['field_weight'];
+ }
+ //sort fields order in categories
+ foreach (array_keys($categories) as $i) {
+ array_multisort($weights[$i], SORT_ASC, array_keys($categories[$i]), SORT_ASC, $categories[$i]);
+ }
+ ksort($categories);
+ $xoopsTpl->assign('fieldcategories', $categories);
+ $xoopsTpl->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML());
+ $xoopsOption['template_main'] = "profile_admin_fieldlist.html";
+ break;
+
+ case "new":
+ include_once('../include/forms.php');
+ $obj =& $profilefield_handler->create();
+ $form =& getFieldForm($obj);
+ $form->display();
+ break;
+
+ case "edit":
+ $obj =& $profilefield_handler->get($_REQUEST['id']);
+ if (!$obj->getVar('field_config') && !$obj->getVar('field_show') && !$obj->getVar('field_edit')) { //If no configs exist
+ redirect_header('field.php', 2, _PROFILE_AM_FIELDNOTCONFIGURABLE);
+ }
+ include_once('../include/forms.php');
+ $form =& getFieldForm($obj);
+ $form->display();
+ break;
+
+ case "reorder":
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('field.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if (isset($_POST['fieldids']) && count($_POST['fieldids']) > 0) {
+ $oldweight = $_POST['oldweight'];
+ $oldcat = $_POST['oldcat'];
+ $category = $_POST['category'];
+ $weight = $_POST['weight'];
+ $ids = array();
+ foreach ($_POST['fieldids'] as $fieldid) {
+ if ($oldweight[$fieldid] != $weight[$fieldid] || $oldcat[$fieldid] != $category[$fieldid]) {
+ //if field has changed
+ $ids[] = intval($fieldid);
+ }
+ }
+ if (count($ids) > 0) {
+ $errors = array();
+ //if there are changed fields, fetch the fieldcategory objects
+ $fieldcat_handler =& xoops_getmodulehandler('fieldcategory');
+ $fieldcats =& $fieldcat_handler->getObjects(new Criteria('fieldid', "(".implode(',', array_values($ids)).")", 'IN'), true);
+ foreach ($ids as $i) {
+ if (!isset($fieldcats[$i])) {
+ $fieldcats[$i] =& $fieldcat_handler->create();
+ $fieldcats[$i]->setVar('fieldid', $i);
+ }
+ $fieldcats[$i]->setVar('field_weight', intval($weight[$i]));
+ $fieldcats[$i]->setVar('catid', intval($category[$i]));
+ if (!$fieldcat_handler->insert($fieldcats[$i])) {
+ $errors = array_merge($errors, $fieldcats[$i]->getErrors());
+ }
+ }
+ if (count($errors) == 0) {
+ //no errors
+ redirect_header('field.php', 2, sprintf(_PROFILE_AM_SAVEDSUCCESS, _PROFILE_AM_FIELDS));
+ }
+ else {
+ redirect_header('field.php', 3, implode('<br />', $errors));
+ }
+ }
+ }
+ break;
+
+ case "save":
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('field.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $redirect_to_edit = false;
+ if (isset($_REQUEST['id'])) {
+ $obj =& $profilefield_handler->get($_REQUEST['id']);
+ if (!$obj->getVar('field_config') && !$obj->getVar('field_show') && !$obj->getVar('field_edit')) { //If no configs exist
+ redirect_header('admin.php', 2, _PROFILE_AM_FIELDNOTCONFIGURABLE);
+ }
+ }
+ else {
+ $obj =& $profilefield_handler->create();
+ $obj->setVar('field_name', $_REQUEST['field_name']);
+ $obj->setVar('field_moduleid', $xoopsModule->getVar('mid'));
+ $obj->setVar('field_show', 1);
+ $obj->setVar('field_edit', 1);
+ $obj->setVar('field_config', 1);
+ $redirect_to_edit = true;
+ }
+ $obj->setVar('field_title', $_REQUEST['field_title']);
+ $obj->setVar('field_description', $_REQUEST['field_description']);
+ if ($obj->getVar('field_config')) {
+ $obj->setVar('field_type', $_REQUEST['field_type']);
+ if (isset($_REQUEST['field_valuetype'])) {
+ $obj->setVar('field_valuetype', $_REQUEST['field_valuetype']);
+ }
+ $options = $obj->getVar('field_options');
+ if (isset($_REQUEST['addOption']) && $_REQUEST['addOption']['value'] != "") {
+ if ($_REQUEST['addOption']['key'] == "") {
+ $_REQUEST['addOption']['key'] = $_REQUEST['addOption']['value'];
+ }
+ $options[$_REQUEST['addOption']['key']] = $_REQUEST['addOption']['value'];
+ $redirect_to_edit = true;
+ }
+ if (isset($_REQUEST['removeOptions']) && is_array($_REQUEST['removeOptions'])) {
+ foreach ($_REQUEST['removeOptions'] as $index) {
+ unset($options[$index]);
+ }
+ $redirect_to_edit = true;
+ }
+ $obj->setVar('field_options', $options);
+ }
+ if ($obj->getVar('field_edit')) {
+ $required = isset($_REQUEST['field_required']) ? $_REQUEST['field_required'] : 0;
+ $obj->setVar('field_required', $required); //0 = no, 1 = yes
+ if (isset($_REQUEST['field_maxlength'])) {
+ $obj->setVar('field_maxlength', $_REQUEST['field_maxlength']);
+ }
+ if (isset($_REQUEST['field_default'])) {
+ //Check for multiple selections
+ if (is_array($_REQUEST['field_default'])) {
+ $obj->setVar('field_default', serialize($_REQUEST['field_default']));
+ }
+ else {
+ $obj->setVar('field_default', $_REQUEST['field_default']);
+ }
+ }
+ }
+
+ if ($obj->getVar('field_show')) {
+ //$obj->setVar('field_weight', $_REQUEST['field_weight']);
+ //Add field to category
+ //$obj->setVar('catid', $_REQUEST['catid']);
+ }
+ if ($obj->getVar('field_edit') && isset($_REQUEST['field_register'])) {
+ $obj->setVar('field_register', $_REQUEST['field_register']);
+ }
+ if ($profilefield_handler->insert($obj)) {
+ $fieldcat_handler =& xoops_getmodulehandler('fieldcategory');
+ $fieldcat =& $fieldcat_handler->get($obj->getVar('fieldid'));
+ $fieldcat->setVar('fieldid', $obj->getVar('fieldid'));
+ $fieldcat->setVar('catid', intval($_REQUEST['field_category']));
+ $fieldcat_handler->insert($fieldcat);
+
+ $groupperm_handler =& xoops_gethandler('groupperm');
+
+ $perm_arr = array();
+ if ($obj->getVar('field_show')) {
+ $perm_arr[] = 'profile_show';
+ $perm_arr[] = 'profile_visible';
+ }
+ if ($obj->getVar('field_edit')) {
+ $perm_arr[] = 'profile_edit';
+ }
+ if ($obj->getVar('field_edit') || $obj->getVar('field_show')) {
+ $perm_arr[] = 'profile_search';
+ }
+ if (count($perm_arr) > 0) {
+ foreach ($perm_arr as $perm) {
+ $criteria = new CriteriaCompo(new Criteria('gperm_name', $perm));
+ $criteria->add(new Criteria('gperm_itemid', intval($obj->getVar('fieldid'))));
+ $criteria->add(new Criteria('gperm_modid', intval($xoopsModule->getVar('mid'))));
+ if (isset($_REQUEST[$perm]) && is_array($_REQUEST[$perm])) {
+ $perms =& $groupperm_handler->getObjects($criteria);
+ if (count($perms) > 0) {
+ foreach (array_keys($perms) as $i) {
+ $groups[$perms[$i]->getVar('gperm_groupid')] =& $perms[$i];
+ }
+ }
+ else {
+ $groups = array();
+ }
+ foreach ($_REQUEST[$perm] as $groupid) {
+ $groupid = intval($groupid);
+ if (!isset($groups[$groupid])) {
+ $perm_obj =& $groupperm_handler->create();
+ $perm_obj->setVar('gperm_name', $perm);
+ $perm_obj->setVar('gperm_itemid', intval($obj->getVar('fieldid')));
+ $perm_obj->setVar('gperm_modid', $xoopsModule->getVar('mid'));
+ $perm_obj->setVar('gperm_groupid', $groupid);
+ $groupperm_handler->insert($perm_obj);
+ unset($perm_obj);
+ }
+ }
+ $removed_groups = array_diff(array_keys($groups), $_REQUEST[$perm]);
+ if (count($removed_groups) > 0) {
+ $criteria->add(new Criteria('gperm_groupid', "(".implode(',', $removed_groups).")", "IN"));
+ $groupperm_handler->deleteAll($criteria);
+ }
+ unset($groups);
+
+ }
+ else {
+ $groupperm_handler->deleteAll($criteria);
+ }
+ unset($criteria);
+ }
+ }
+ $url = $redirect_to_edit ? 'field.php?op=edit&id='.$obj->getVar('fieldid') : 'field.php';
+ redirect_header($url, 3, sprintf(_PROFILE_AM_SAVEDSUCCESS, _PROFILE_AM_FIELD));
+ }
+ include_once('../include/forms.php');
+ echo $obj->getHtmlErrors();
+ $form =& getFieldForm($obj);
+ $form->display();
+ break;
+
+ case "delete":
+ $obj =& $profilefield_handler->get($_REQUEST['id']);
+ if (!$obj->getVar('field_config')) {
+ redirect_header('index.php', 2, _PROFILE_AM_FIELDNOTCONFIGURABLE);
+ }
+ if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('field.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if ($profilefield_handler->delete($obj)) {
+ $fieldcat_handler =& xoops_getmodulehandler('fieldcategory');
+ $criteria = new CriteriaCompo(new Criteria('fieldid', $obj->getVar('fieldid')));
+ if($fieldcat_handler->deleteAll($criteria)){
+ redirect_header('field.php', 3, sprintf(_PROFILE_AM_DELETEDSUCCESS, _PROFILE_AM_FIELD));
+ }else{
+ // Any error message?
+ }
+ }
+ else {
+ echo $obj->getHtmlErrors();
+ }
+ }
+ else {
+ xoops_confirm(array('ok' => 1, 'id' => $_REQUEST['id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_PROFILE_AM_RUSUREDEL, $obj->getVar('field_title')));
+ }
+ break;
+}
+
+xoops_cp_footer();
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/field.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/menu.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/menu.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/menu.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,41 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: XOOPS Foundation //
+// URL: http://www.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+//$adminmenu[1]['title'] = _PROFILE_MI_INDEX;
+//$adminmenu[1]['link'] = "admin/admin.php";
+$adminmenu[4]['title'] = _PROFILE_MI_USERS;
+$adminmenu[4]['link'] = "admin/user.php";
+$adminmenu[2]['title'] = _PROFILE_MI_CATEGORIES;
+$adminmenu[2]['link'] = "admin/category.php";
+$adminmenu[3]['title'] = _PROFILE_MI_FIELDS;
+$adminmenu[3]['link'] = "admin/field.php";
+$adminmenu[5]['title'] = _PROFILE_MI_PERMISSIONS;
+$adminmenu[5]['link'] = "admin/permissions.php";
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/menu.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/permissions.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/permissions.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/permissions.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,110 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: XOOPS Foundation //
+// URL: http://www.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+include '../../../include/cp_header.php';
+xoops_cp_header();
+
+$xTheme->loadModuleAdminMenu(5, _PROFILE_MI_PERMISSIONS);
+
+$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : "view";
+
+include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+$opform = new XoopsSimpleForm('', 'opform', 'permissions.php', "get");
+$op_select = new XoopsFormSelect("", 'op', $op);
+$op_select->setExtra('onchange="document.forms.opform.submit()"');
+$op_select->addOption('view', _PROFILE_AM_PROF_VISIBLE_FOR);
+$op_select->addOption('show', _PROFILE_AM_PROF_VISIBLE_ON);
+$op_select->addOption('edit', _PROFILE_AM_PROF_EDITABLE);
+$op_select->addOption('search', _PROFILE_AM_PROF_SEARCH);
+$opform->addElement($op_select);
+$opform->display();
+
+switch ($op) {
+ case "view":
+ $title_of_form = _PROFILE_AM_PROF_VISIBLE_FOR;
+ $perm_name = "profile_visible";
+ $restriction = "field_show";
+ $anonymous = true;
+ break;
+
+ case "edit":
+ $title_of_form = _PROFILE_AM_PROF_EDITABLE;
+ $perm_name = "profile_edit";
+ $restriction = "field_edit";
+ $anonymous = false;
+ break;
+
+ case "show":
+ $title_of_form = _PROFILE_AM_PROF_VISIBLE_ON;
+ $perm_name = "profile_show";
+ $restriction = "field_show";
+ $anonymous = false;
+ break;
+
+ case "search":
+ $title_of_form = _PROFILE_AM_PROF_SEARCH;
+ $perm_name = "profile_search";
+ $restriction = "";
+ $anonymous = true;
+ break;
+}
+$module_id = $xoopsModule->getVar('mid');
+$perm_desc = "";
+include_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php';
+$form = new XoopsGroupPermForm($title_of_form, $module_id, $perm_name, $perm_desc, 'admin/permissions.php', $anonymous);
+
+$profile_handler =& xoops_gethandler('profile');
+$fields = $profile_handler->loadFields();
+
+if ($op != "search") {
+ foreach (array_keys($fields) as $i) {
+ if ($restriction == "" || $fields[$i]->getVar($restriction)) {
+ $form->addItem($fields[$i]->getVar('fieldid'), $fields[$i]->getVar('field_title'));
+ }
+ }
+}
+else {
+ $searchable_types = array('textbox',
+ 'select',
+ 'radio',
+ 'yesno',
+ 'date',
+ 'datetime',
+ 'timezone',
+ 'language');
+ foreach (array_keys($fields) as $i) {
+ if (in_array($fields[$i]->getVar('field_type'), $searchable_types)) {
+ $form->addItem($fields[$i]->getVar('fieldid'), $fields[$i]->getVar('field_title'));
+ }
+ }
+}
+$form->display();
+xoops_cp_footer();
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/permissions.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/user.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/user.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/user.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,214 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: XOOPS Foundation //
+// URL: http://www.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+include '../../../include/cp_header.php';
+xoops_cp_header();
+$xTheme->loadModuleAdminMenu(4, _PROFILE_MI_USERS);
+//$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : (isset($_REQUEST['id']) ? "edit" : 'list');
+$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : 'list';
+if($op == "editordelete") {
+ $op = isset($_REQUEST['delete'])?"delete":"edit";
+}
+$handler =& xoops_gethandler('member');
+/* @var $handler XoopsMemberHandler */
+
+switch($op) {
+ default:
+ case "list":
+ include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
+ $form = new XoopsThemeForm(_PROFILE_AM_EDITUSER, 'form', 'user.php');
+ $form->addElement(new XoopsFormSelectUser(_PROFILE_AM_SELECTUSER, 'id'));
+ $form->addElement(new XoopsFormHidden('op', 'editordelete'));
+ $button_tray = new XoopsFormElementTray('');
+ $button_tray->addElement(new XoopsFormButton('', 'edit', _EDIT, 'submit'));
+ $button_tray->addElement(new XoopsFormButton('', 'delete', _DELETE, 'submit'));
+ $form->addElement($button_tray);
+ //$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
+ $form->display();
+
+ case "new":
+ $xoopsModule->loadLanguage();
+ include_once('../include/forms.php');
+ $obj =& $handler->createUser();
+ $obj->setGroups(array(XOOPS_GROUP_USERS));
+ $form =& getUserForm($obj);
+ $form->display();
+ break;
+
+ case "edit":
+ $xoopsModule->loadLanguage();
+ $obj =& $handler->getUser($_REQUEST['id']);
+ include_once('../include/forms.php');
+ $form =& getUserForm($obj);
+ $form->display();
+ break;
+
+ case "save":
+ $xoopsModule->loadLanguage();
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php',3,_PROFILE_MA_NOEDITRIGHT."<br />".implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit;
+ }
+ $uid = 0;
+ if (!empty($_POST['uid'])) {
+ $uid = intval($_POST['uid']);
+ $user =& $handler->getUser($uid);
+ }
+ else {
+ $user =& $handler->createUser();
+ $user->setVar('user_regdate', time());
+ $user->setVar('level', 1);
+ }
+ $errors = array();
+ $myts =& MyTextSanitizer::getInstance();
+ if ($user->isNew() || $xoopsModuleConfig['allow_chgmail'] == 1) {
+ $email = '';
+ if (!empty($_POST['email'])) {
+ $user->setVar('email', trim($_POST['email']));
+ }
+ }
+ if ($user->getVar('uid') != $xoopsUser->getVar('uid')) {
+ $password = '';
+ if (!empty($_POST['password'])) {
+ $password = $myts->stripSlashesGPC(trim($_POST['password']));
+ }
+ if ($password != '') {
+ if (strlen($password) < $xoopsModuleConfig['minpass']) {
+ $errors[] = sprintf(_PROFILE_MA_PWDTOOSHORT,$xoopsModuleConfig['minpass']);
+ }
+ $vpass = '';
+ if (!empty($_POST['vpass'])) {
+ $vpass = $myts->stripSlashesGPC(trim($_POST['vpass']));
+ }
+ if ($password != $vpass) {
+ $errors[] = _PROFILE_MA_PASSNOTSAME;
+ }
+ $user->setVar('pass', md5($password));
+ }
+ elseif ($user->isNew()) {
+ $errors[] = _PROFILE_MA_NOPASSWORD;
+ }
+ if ($xoopsUser->isAdmin()) {
+ //admins can set level (activated/deactivated) for users
+ $user->setVar('level', intval($_POST['level']));
+ }
+ }
+ $user->setVar('uname', $_POST['uname']);
+ $user->setVar('loginname', $_POST['loginname']);
+ $user->setVar('rank', intval($_POST['rank']));
+ $user->setVar('name', $_POST['name']);
+ include_once('../include/functions.php');
+ $stop = userCheck($user);
+ if ($stop != "") {
+ $errors[] = $stop;
+ }
+
+
+ // Dynamic fields
+ $profile_handler =& xoops_gethandler('profile');
+ // Get fields
+ $fields =& $profile_handler->loadFields();
+ // Get ids of fields that can be edited
+ $gperm_handler =& xoops_gethandler('groupperm');
+ $editable_fields =& $gperm_handler->getItemIds('profile_edit', $xoopsUser->getGroups(), $xoopsModule->getVar('mid'));
+
+ foreach (array_keys($fields) as $i) {
+ $fieldname = $fields[$i]->getVar('field_name');
+ if (in_array($fields[$i]->getVar('fieldid'), $editable_fields) && isset($_REQUEST[$fieldname])) {
+ $user->setVar($fieldname, $_REQUEST[$fieldname]);
+ }
+ }
+
+ $new_groups = isset($_POST['groups']) ? $_POST['groups'] : array();
+ //$user->setGroups($new_groups);
+
+ if (count($errors) == 0) {
+ if ($handler->insertUser($user)) {
+ if ($gperm_handler->checkRight("system_admin", XOOPS_SYSTEM_GROUP, $xoopsUser->getGroups(), 1)) {
+ //Update group memberships
+ $cur_groups = $user->getGroups();
+
+ $added_groups = array_diff($new_groups, $cur_groups);
+ $removed_groups = array_diff($cur_groups, $new_groups);
+
+ if (count($added_groups) > 0) {
+ foreach ($added_groups as $groupid) {
+ $handler->addUserToGroup($groupid, $user->getVar('uid'));
+ }
+ }
+ if (count($removed_groups) > 0) {
+ foreach ($removed_groups as $groupid) {
+ $handler->removeUsersFromGroup($groupid, array($user->getVar('uid')));
+ }
+ }
+ }
+ if ($user->isNew()) {
+ redirect_header('user.php', 2, _PROFILE_AM_USERCREATED, false);
+ }
+ else {
+ redirect_header('user.php', 2, _PROFILE_MA_PROFUPDATED, false);
+ }
+ }
+ }
+ else {
+ foreach ($errors as $err) {
+ $user->setErrors($err);
+ }
+ }
+ include_once('../include/forms.php');
+ echo $user->getHtmlErrors();
+ $form =& getUserForm($user);
+ $form->display();
+ break;
+
+ case "delete":
+ if ($_REQUEST['id'] == $xoopsUser->getVar('uid')) {
+ redirect_header('user.php', 2, _PROFILE_AM_CANNOTDELETESELF);
+ }
+ $obj =& $handler->getUser($_REQUEST['id']);
+ if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('user.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()), false);
+ }
+ if ($handler->deleteUser($obj)) {
+ redirect_header('user.php', 3, sprintf(_PROFILE_AM_DELETEDSUCCESS, $obj->getVar('uname')." (".$obj->getVar('loginname').")"), false);
+ }
+ else {
+ echo $obj->getHtmlErrors();
+ }
+ }
+ else {
+ xoops_confirm(array('ok' => 1, 'id' => $_REQUEST['id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_PROFILE_AM_RUSUREDEL, $obj->getVar('uname')." (".$obj->getVar('loginname').")"));
+ }
+ break;
+}
+
+xoops_cp_footer();
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/admin/user.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/changemail.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/changemail.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/changemail.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,105 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include '../../mainfile.php';
+if (!$xoopsUser || $xoopsModuleConfig['allow_chgmail'] != 1) {
+ redirect_header(XOOPS_URL, 2, _NOPERM);
+}
+include XOOPS_ROOT_PATH."/header.php";
+
+if (!isset($_POST['submit'])) {
+ //show change password form
+ include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+ $form = new XoopsThemeForm(_PROFILE_MA_CHANGEMAIL, 'form', 'changemail.php', 'post', true);
+ $form->addElement(new XoopsFormText(_PROFILE_MA_NEWMAIL, 'newmail', 15, 50), true);
+ $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
+ $form->display();
+}
+else {
+ //compute unique key
+ $key = md5(substr($xoopsUser->getVar("pass"), 0, 5));
+ if (!isset($_REQUEST['oldmail'])) {
+ if (!checkEmail($_POST['newmail'])) {
+ redirect_header('changemail.php', 2, _PROFILE_MA_INVALIDMAIL);
+ }
+ else {
+ //send email to new email address with key
+ $xoopsMailer =& getMailer();
+ $xoopsMailer->useMail();
+ $xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar('dirname')."/language/".$xoopsConfig['language']."/mail_template");
+ $xoopsMailer->setTemplate('changemail.tpl');
+ $xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']);
+ $xoopsMailer->assign("ADMINMAIL", $xoopsConfig['adminmail']);
+ $xoopsMailer->assign("SITEURL", XOOPS_URL."/");
+ $xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']);
+ $xoopsMailer->assign("NEWEMAIL_LINK", XOOPS_URL."/modules/profile/changemail.php?code=".$key);
+ $xoopsMailer->setToEmails($_POST['newemail']);
+ $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
+ $xoopsMailer->setFromName($xoopsConfig['sitename']);
+ $xoopsMailer->setSubject(sprintf(_PROFILE_MA_NEWEMAILREQ,$xoopsConfig['sitename']));
+ if ($xoopsMailer->send()) {
+ //set proposed email as the user's newemail
+ $xoopsUser->setVar('newemail', $_POST['newmail']);
+ $member_handler =& xoops_gethandler('member');
+ if ($member_handler->insertUser($xoopsUser)) {
+ //redirect with success
+ redirect_header('index.php', 2, _PROFILE_MA_NEWMAILMSGSENT);
+ }
+ }
+ else {
+ //relevant error messages
+ echo $xoopsMailer->getErrors();
+ }
+ }
+ }
+ else {
+ //check unique key
+ $code = isset($_GET['code']) ? $_GET['code'] : redirect_header(XOOPS_URL, 2, _PROFILE_MA_CONFCODEMISSING);
+ if ($code == $key) {
+ //change email address to the proposed one
+ $xoopsUser->setVar('email', $xoopsUser->getVar('newemail', 'n'));
+ //update user data
+ $member_handler =& xoops_gethandler('member');
+ if ($member_handler->insertUser($xoopsUser, true)) {
+ //redirect with success
+ redirect_header('index.php', 2, _PROFILE_MA_EMAILCHANGED);
+ }
+ else {
+ //error in update process
+ echo implode('<br />', $xoopsUser->getErrors());
+ }
+ }
+ else {
+ //wrong key
+ $eh =& XoopsErrorHandler::getInstance();
+ $eh->errorPage(1, $xoopsModule->getVar('mid'));
+ }
+ }
+}
+
+include XOOPS_ROOT_PATH."/footer.php";
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/changemail.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/changepass.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/changepass.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/changepass.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,63 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include '../../mainfile.php';
+if (!$xoopsUser) {
+ redirect_header(XOOPS_URL, 2, _NOPERM);
+}
+include XOOPS_ROOT_PATH."/header.php";
+
+if (!isset($_POST['submit'])) {
+ //show change password form
+ include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+ $form = new XoopsThemeForm(_PROFILE_MA_CHANGEPASSWORD, 'form', 'changepass.php', 'post', true);
+ $form->addElement(new XoopsFormPassword(_PROFILE_MA_OLDPASSWORD, 'oldpass', 15, 50), true);
+ $form->addElement(new XoopsFormPassword(_PROFILE_MA_NEWPASSWORD, 'newpass', 15, 50), true);
+ $form->addElement(new XoopsFormPassword(_PROFILE_MA_VERIFYPASS, 'vpass', 15, 50), true);
+ $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
+ $form->display();
+}
+else {
+ include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar('dirname')."/include/functions.php";
+ $stop = checkPassword($xoopsUser->getVar('loginname'), $_POST['oldpass'], $_POST['newpass'], $_POST['vpass']);
+ if ($stop != "") {
+ redirect_header('userinfo.php?uid='.$xoopsUser->getVar('uid'), 2, $stop);
+ }
+ else {
+ //update password
+ $xoopsUser->setVar('pass', md5($_POST['newpass']));
+
+ $member_handler =& xoops_gethandler('member');
+ if ($member_handler->insertUser($xoopsUser)) {
+ redirect_header('userinfo.php?uid='.$xoopsUser->getVar('uid'), 2, _PROFILE_MA_PASSWORDCHANGED);
+ }
+ redirect_header('userinfo.php?uid='.$xoopsUser->getVar('uid'), 2, _PROFILE_MA_ERRORDURINGSAVE);
+ }
+}
+
+include XOOPS_ROOT_PATH."/footer.php";
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/changepass.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/class/category.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/class/category.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/class/category.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,87 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: XOOPS Foundation //
+// URL: http://www.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package kernel
+ * @copyright copyright © 2000 XOOPS.org
+ */
+class ProfileCategory extends XoopsObject {
+ function ProfileCategory() {
+ $this->initVar('catid', XOBJ_DTYPE_INT, null, true);
+ $this->initVar('cat_title', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('cat_description', XOBJ_DTYPE_TXTAREA);
+ $this->initVar('cat_weight', XOBJ_DTYPE_INT);
+ //$this->initVar('cat_moduleid', XOBJ_DTYPE_INT);
+ }
+
+ /**
+ * Get {@link XoopsThemeForm} for adding/editing categories
+ *
+ * @param mixed $action URL to submit to or false for $_SERVER['REQUEST_URI']
+ *
+ * @return object
+ */
+ function getForm($action = false) {
+ if ($action === false) {
+ $action = $_SERVER['REQUEST_URI'];
+ }
+ $title = $this->isNew() ? sprintf(_PROFILE_AM_ADD, _PROFILE_AM_CATEGORY) : sprintf(_PROFILE_AM_EDIT, _PROFILE_AM_CATEGORY);
+
+ include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
+
+ $form = new XoopsThemeForm($title, 'form', $action, 'post', true);
+ $form->addElement(new XoopsFormText(sprintf(_PROFILE_AM_TITLE, _PROFILE_AM_CATEGORY), 'cat_title', 35, 255, $this->getVar('cat_title')));
+ if (!$this->isNew()) {
+ //Load groups
+ $form->addElement(new XoopsFormHidden('id', $this->getVar('catid')));
+ }
+ $form->addElement(new XoopsFormTextArea(_PROFILE_AM_DESCRIPTION, 'cat_description', $this->getVar('cat_description', 'e')));
+ $form->addElement(new XoopsFormText(_PROFILE_AM_CATEGORY." "._PROFILE_AM_WEIGHT, 'cat_weight', 35, 35, $this->getVar('cat_weight', 'e')));
+
+ $form->addElement(new XoopsFormHidden('op', 'save'));
+ $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
+
+ return $form;
+ }
+}
+
+/**
+ * @package kernel
+ * @copyright copyright © 2000 XOOPS.org
+ */
+class ProfileCategoryHandler extends XoopsPersistableObjectHandler {
+ function ProfileCategoryHandler(&$db) {
+ $this->XoopsPersistableObjectHandler($db, 'profile_category', "ProfileCategory", "catid", 'cat_title');
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/class/category.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/class/fieldcategory.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/class/fieldcategory.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/class/fieldcategory.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,71 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: XOOPS Foundation //
+// URL: http://www.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+/**
+ * @package kernel
+ * @copyright copyright © 2000 XOOPS.org
+ */
+class ProfileFieldCategory extends XoopsObject {
+ function ProfileFieldCategory() {
+ $this->initVar('fieldid', XOBJ_DTYPE_INT, null, true);
+ $this->initVar('catid', XOBJ_DTYPE_INT, null, true);
+ $this->initVar('field_weight', XOBJ_DTYPE_INT, 1);
+ }
+}
+
+/**
+ * @package kernel
+ * @copyright copyright © 2000 XOOPS.org
+ */
+class ProfileFieldCategoryHandler extends XoopsPersistableObjectHandler {
+ function ProfileFieldCategoryHandler(&$db) {
+ //A field can be in only one category, so fieldid can be used to uniquely identify a row
+ $this->XoopsPersistableObjectHandler($db, 'profile_fieldcategory', "ProfileFieldCategory", "fieldid");
+ }
+
+ /**
+ * Get array of categories with at least one field in them
+ *
+ * @return array
+ **/
+ function getActiveCats() {
+ $ret = array();
+ $sql = "SELECT DISTINCT catid FROM ".$this->table;
+ $result = $this->db->query($sql);
+ while (list($catid) = $this->db->fetchRow($result)) {
+ $ret[] = $catid;
+ }
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/class/fieldcategory.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/class/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/class/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/class/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/class/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/edituser.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/edituser.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/edituser.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,301 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include '../../mainfile.php';
+include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+include_once XOOPS_ROOT_PATH.'/modules/profile/include/functions.php';
+
+// If not a user, redirect
+if (!is_object($xoopsUser)) {
+ redirect_header(XOOPS_URL,3,_PROFILE_MA_NOEDITRIGHT);
+ exit();
+}
+
+// initialize $op variable
+$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : 'editprofile';
+
+if ($op == 'save') {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('index.php',3,_PROFILE_MA_NOEDITRIGHT."<br />".implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit;
+ }
+ $uid = 0;
+ if (!empty($_POST['uid'])) {
+ $uid = intval($_POST['uid']);
+ }
+ if (empty($uid) || ($xoopsUser->getVar('uid') != $uid && !$xoopsUser->isAdmin())) {
+ redirect_header(XOOPS_URL,3,_PROFILE_MA_NOEDITRIGHT);
+ exit();
+ }
+ $errors = array();
+ $myts =& MyTextSanitizer::getInstance();
+ if ($xoopsUser->isAdmin()) {
+ $email = '';
+ if (!empty($_POST['email'])) {
+ $email = $myts->stripSlashesGPC(trim($_POST['email']));
+ }
+ if ($email == '' || !checkEmail($email)) {
+ $errors[] = _PROFILE_MA_INVALIDMAIL.var_dump($email);
+ }
+ }
+ if (count($errors) > 0) {
+ include XOOPS_ROOT_PATH.'/header.php';
+ echo '<div>';
+ foreach ($errors as $er) {
+ echo '<span style="color: #ff0000; font-weight: bold;">'.$er.'</span><br />';
+ }
+ echo '</div><br />';
+ $op = 'editprofile';
+ } else {
+ $member_handler =& xoops_gethandler('member');
+ $edituser =& $member_handler->getUser($uid);
+// if ($xoopsModuleConfig['allow_chgmail'] == 1) {
+// $edituser->setVar('email', $email);
+// }
+ $edituser->setVar('name', $myts->stripSlashesGPC(trim($_POST['name'])));
+ $edituser->setVar('uname', $myts->stripSlashesGPC(trim($_POST['uname'])));
+ if ($xoopsUser->isAdmin()) {
+ $edituser->setVar('rank', intval($_POST['rank']));
+ $edituser->setVar('loginname', $myts->stripSlashesGPC(trim($_POST['loginname'])));
+ $edituser->setVar('email', $email);
+ }
+ $stop = userCheck($edituser);
+ if (!empty($stop)) {
+ echo "<span style='color:#ff0000;'>$stop</span>";
+ redirect_header('userinfo.php?uid='.$uid, 2);
+ }
+
+ // Dynamic fields
+ $profile_handler =& xoops_gethandler('profile');
+ // Get fields
+ $fields =& $profile_handler->loadFields();
+ // Get ids of fields that can be edited
+ $gperm_handler =& xoops_gethandler('groupperm');
+ $editable_fields =& $gperm_handler->getItemIds('profile_edit', $xoopsUser->getGroups(), $xoopsModule->getVar('mid'));
+
+ foreach (array_keys($fields) as $i) {
+ if (in_array($fields[$i]->getVar('fieldid'), $editable_fields)) {
+ $edituser->setVar($fields[$i]->getVar('field_name'), $fields[$i]->getValueForSave($_REQUEST[$fields[$i]->getVar('field_name')]));
+ }
+ }
+ if (!$member_handler->insertUser($edituser)) {
+ include XOOPS_ROOT_PATH.'/header.php';
+ echo $edituser->getHtmlErrors();
+ } else {
+ unset($_SESSION['xoopsUserTheme']);
+ redirect_header('userinfo.php?uid='.$uid, 1, _PROFILE_MA_PROFUPDATED);
+ }
+ }
+}
+
+
+if ($op == 'editprofile') {
+ include_once XOOPS_ROOT_PATH.'/header.php';
+ include_once 'include/forms.php';
+ echo '<a href="userinfo.php?uid='.$xoopsUser->getVar('uid').'">'. _PROFILE_MA_PROFILE .'</a> <span style="font-weight:bold;">»»</span> '. _PROFILE_MA_EDITPROFILE .'<br /><br />';
+ $form =& getUserForm($xoopsUser);
+ $form->display();
+}
+
+
+if ($op == 'delete') {
+ if (!$xoopsUser || $xoopsModuleConfig['self_delete'] != 1) {
+ redirect_header(XOOPS_URL.'/index.php',5,_PROFILE_MA_NOPERMISS);
+ exit();
+ } else {
+ $groups = $xoopsUser->getGroups();
+ if (in_array(XOOPS_GROUP_ADMIN, $groups)){
+ // users in the webmasters group may not be deleted
+ redirect_header(XOOPS_URL.'/user.php', 5, _PROFILE_MA_ADMINNO);
+ exit();
+ }
+ $ok = !isset($_POST['ok']) ? 0 : intval($_POST['ok']);
+ if ($ok != 1) {
+ include XOOPS_ROOT_PATH.'/header.php';
+ xoops_confirm(array('op' => 'delete', 'ok' => 1), 'edituser.php', _PROFILE_MA_SURETODEL.'<br/>'._PROFILE_MA_REMOVEINFO);
+ include XOOPS_ROOT_PATH.'/footer.php';
+ } else {
+ $del_uid = $xoopsUser->getVar("uid");
+ $member_handler =& xoops_gethandler('member');
+ if (false != $member_handler->deleteUser($xoopsUser)) {
+ $online_handler =& xoops_gethandler('online');
+ $online_handler->destroy($del_uid);
+ xoops_notification_deletebyuser($del_uid);
+
+ //logout user
+ $_SESSION = array();
+ session_destroy();
+ if ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
+ setcookie($xoopsConfig['session_name'], '', time()- 3600, '/', '', 0);
+ }
+ redirect_header(XOOPS_URL.'/index.php', 5, _PROFILE_MA_BEENDELED);
+ }
+ redirect_header(XOOPS_URL.'/index.php',5,_PROFILE_MA_NOPERMISS);
+ }
+ exit();
+ }
+}
+
+if ($op == 'avatarform') {
+ include XOOPS_ROOT_PATH.'/header.php';
+ echo '<a href="userinfo.php?uid='.$xoopsUser->getVar('uid').'">'. _PROFILE_MA_PROFILE .'</a> <span style="font-weight:bold;">»»</span> '. _PROFILE_MA_UPLOADMYAVATAR .'<br /><br />';
+ $oldavatar = $xoopsUser->getVar('user_avatar');
+ if (!empty($oldavatar) && $oldavatar != 'blank.gif') {
+ echo '<div style="text-align:center;"><h4 style="color:#ff0000; font-weight:bold;">'._PROFILE_MA_OLDDELETED.'</h4>';
+ echo '<img src="'.XOOPS_UPLOAD_URL.'/'.$oldavatar.'" alt="" /></div>';
+ }
+ if ($xoopsModuleConfig['avatar_allow_upload'] == 1 && $xoopsUser->getVar('posts') >= $xoopsModuleConfig['avatar_minposts']) {
+ include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+ $form = new XoopsThemeForm(_PROFILE_MA_UPLOADMYAVATAR, 'uploadavatar', 'edituser.php', 'post', true);
+ $form->setExtra('enctype="multipart/form-data"');
+ $form->addElement(new XoopsFormLabel(_PROFILE_MA_MAXPIXEL, $xoopsModuleConfig['avatar_width'].' x '.$xoopsModuleConfig['avatar_height']));
+ $form->addElement(new XoopsFormLabel(_PROFILE_MA_MAXIMGSZ, $xoopsModuleConfig['avatar_maxsize']));
+ $form->addElement(new XoopsFormFile(_PROFILE_MA_SELFILE, 'avatarfile', $xoopsModuleConfig['avatar_maxsize']), true);
+ $form->addElement(new XoopsFormHidden('op', 'avatarupload'));
+ $form->addElement(new XoopsFormHidden('uid', $xoopsUser->getVar('uid')));
+ $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
+ $form->display();
+ }
+ $avatar_handler =& xoops_gethandler('avatar');
+ $form2 = new XoopsThemeForm(_PROFILE_MA_CHOOSEAVT, 'uploadavatar', 'edituser.php', 'post', true);
+ $avatar_select = new XoopsFormSelect('', 'user_avatar', $xoopsUser->getVar('user_avatar'));
+ $avatar_select->addOptionArray($avatar_handler->getList('S'));
+ $avatar_select->setExtra("onchange='showImgSelected(\"avatar\", \"user_avatar\", \"uploads\", \"\", \"".XOOPS_URL."\")'");
+ $avatar_tray = new XoopsFormElementTray(_PROFILE_MA_AVATAR, ' ');
+ $avatar_tray->addElement($avatar_select);
+ $avatar_tray->addElement(new XoopsFormLabel('', "<img src='".XOOPS_UPLOAD_URL."/".$xoopsUser->getVar("user_avatar", "E")."' name='avatar' id='avatar' alt='' /> <a href=\"javascript:openWithSelfMain('".XOOPS_URL."/misc.php?action=showpopups&type=avatars','avatars',600,400);\">"._LIST."</a>"));
+ $form2->addElement($avatar_tray);
+ $form2->addElement(new XoopsFormHidden('uid', $xoopsUser->getVar('uid')));
+ $form2->addElement(new XoopsFormHidden('op', 'avatarchoose'));
+ $form2->addElement(new XoopsFormButton('', 'submit2', _SUBMIT, 'submit'));
+ $form2->display();
+}
+
+if ($op == 'avatarupload') {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('index.php',3,_PROFILE_MA_NOEDITRIGHT."<br />".implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit;
+ }
+ $xoops_upload_file = array();
+ $uid = 0;
+ if (!empty($_POST['xoops_upload_file']) && is_array($_POST['xoops_upload_file'])){
+ $xoops_upload_file = $_POST['xoops_upload_file'];
+ }
+ if (!empty($_POST['uid'])) {
+ $uid = intval($_POST['uid']);
+ }
+ if (empty($uid) || $xoopsUser->getVar('uid') != $uid ) {
+ redirect_header('index.php',3,_PROFILE_MA_NOEDITRIGHT);
+ exit();
+ }
+ if ($xoopsModuleConfig['avatar_allow_upload'] == 1 && $xoopsUser->getVar('posts') >= $xoopsModuleConfig['avatar_minposts']) {
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'), $xoopsModuleConfig['avatar_maxsize'], $xoopsModuleConfig['avatar_width'], $xoopsModuleConfig['avatar_height']);
+ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
+ $uploader->setPrefix('cavt');
+ if ($uploader->upload()) {
+ $avt_handler =& xoops_gethandler('avatar');
+ $avatar =& $avt_handler->create();
+ $avatar->setVar('avatar_file', $uploader->getSavedFileName());
+ $avatar->setVar('avatar_name', $xoopsUser->getVar('uname'));
+ $avatar->setVar('avatar_mimetype', $uploader->getMediaType());
+ $avatar->setVar('avatar_display', 1);
+ $avatar->setVar('avatar_type', 'C');
+ if (!$avt_handler->insert($avatar)) {
+ @unlink($uploader->getSavedDestination());
+ } else {
+ $oldavatar = $xoopsUser->getVar('user_avatar');
+ if (!empty($oldavatar) && $oldavatar != 'blank.gif' && !preg_match("/^savt/", strtolower($oldavatar))) {
+ $avatars =& $avt_handler->getObjects(new Criteria('avatar_file', $oldavatar));
+ $avt_handler->delete($avatars[0]);
+ $oldavatar_path = str_replace("\\", "/", realpath(XOOPS_UPLOAD_PATH.'/'.$oldavatar));
+ if (0 === strpos($oldavatar_path, XOOPS_UPLOAD_PATH) && is_file($oldavatar_path)) {
+ unlink($oldavatar_path);
+ }
+ }
+ $sql = sprintf("UPDATE %s SET user_avatar = %s WHERE uid = %u", $xoopsDB->prefix('users'), $xoopsDB->quoteString($uploader->getSavedFileName()), $xoopsUser->getVar('uid'));
+ $xoopsDB->query($sql);
+ $avt_handler->addUser($avatar->getVar('avatar_id'), $xoopsUser->getVar('uid'));
+ redirect_header('userinfo.php?t='.time().'&uid='.$xoopsUser->getVar('uid'),0, _PROFILE_MA_PROFUPDATED);
+ }
+ }
+ }
+ include XOOPS_ROOT_PATH.'/header.php';
+ echo $uploader->getErrors();
+ }
+}
+
+if ($op == 'avatarchoose') {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('index.php',3,_PROFILE_MA_NOEDITRIGHT."<br />".implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit;
+ }
+ $uid = 0;
+ if (!empty($_POST['uid'])) {
+ $uid = intval($_POST['uid']);
+ }
+ if (empty($uid) || $xoopsUser->getVar('uid') != $uid ) {
+ redirect_header('index.php', 3, _PROFILE_MA_NOEDITRIGHT);
+ exit();
+ }
+ $user_avatar = '';
+ if (!empty($_POST['user_avatar'])) {
+ $user_avatar = trim($_POST['user_avatar']);
+ }
+ $user_avatarpath = str_replace("\\", "/", realpath(XOOPS_UPLOAD_PATH.'/'.$user_avatar));
+ if (0 === strpos($user_avatarpath, XOOPS_UPLOAD_PATH) && is_file($user_avatarpath)) {
+ $oldavatar = $xoopsUser->getVar('user_avatar');
+ $xoopsUser->setVar('user_avatar', $user_avatar);
+ $member_handler =& xoops_gethandler('member');
+ if (!$member_handler->insertUser($xoopsUser)) {
+ include XOOPS_ROOT_PATH.'/header.php';
+ echo $xoopsUser->getHtmlErrors();
+ include XOOPS_ROOT_PATH.'/footer.php';
+ exit();
+ }
+ $avt_handler =& xoops_gethandler('avatar');
+ if ($oldavatar && $oldavatar != 'blank.gif' && !preg_match("/^savt/", strtolower($oldavatar))) {
+ $avatars =& $avt_handler->getObjects(new Criteria('avatar_file', $oldavatar));
+ if (is_object($avatars[0])) {
+ $avt_handler->delete($avatars[0]);
+ }
+ $oldavatar_path = str_replace("\\", "/", realpath(XOOPS_UPLOAD_PATH.'/'.$oldavatar));
+ if (0 === strpos($oldavatar_path, XOOPS_UPLOAD_PATH) && is_file($oldavatar_path)) {
+ unlink($oldavatar_path);
+ }
+ }
+ if ($user_avatar != 'blank.gif') {
+ $avatars =& $avt_handler->getObjects(new Criteria('avatar_file', $user_avatar));
+ if (is_object($avatars[0])) {
+ $avt_handler->addUser($avatars[0]->getVar('avatar_id'), $xoopsUser->getVar('uid'));
+ }
+ }
+ }
+ redirect_header('userinfo.php?uid='.$uid, 0, _PROFILE_MA_PROFUPDATED);
+}
+include XOOPS_ROOT_PATH.'/footer.php';
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/edituser.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/images/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/images/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/images/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/images/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/images/profile_logo.jpg
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/images/profile_logo.jpg
___________________________________________________________________
Name: svn:mime-type
+ image/jpeg
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/include/forms.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/include/forms.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/include/forms.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,500 @@
+<?php
+/**
+ * Get {@link XoopsThemeForm} for adding/editing fields
+ *
+ * @param object $field {@link XoopsProfileField} object to get edit form for
+ * @param mixed $action URL to submit to - or false for $_SERVER['REQUEST_URI']
+ *
+ * @return object
+ */
+function getFieldForm(&$field, $action = false) {
+ if ($action === false) {
+ $action = $_SERVER['REQUEST_URI'];
+ }
+ $title = $field->isNew() ? sprintf(_PROFILE_AM_ADD, _PROFILE_AM_FIELD) : sprintf(_PROFILE_AM_EDIT, _PROFILE_AM_FIELD);
+
+ include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
+ $form = new XoopsThemeForm($title, 'form', $action, 'post', true);
+
+ $form->addElement(new XoopsFormText(sprintf(_PROFILE_AM_TITLE, _PROFILE_AM_FIELD), 'field_title', 35, 255, $field->getVar('field_title', 'e')));
+ $form->addElement(new XoopsFormTextArea(_PROFILE_AM_DESCRIPTION, 'field_description', $field->getVar('field_description', 'e')));
+
+ if (!$field->isNew()) {
+ $fieldcat_handler =& xoops_getmodulehandler('fieldcategory');
+ $fieldcat =& $fieldcat_handler->get($field->getVar('fieldid'));
+ $fieldcatid = $fieldcat->getVar('catid');
+ }
+ else {
+ $fieldcatid = 0;
+ }
+ $category_handler =& xoops_getmodulehandler('category');
+ $cat_select = new XoopsFormSelect(_PROFILE_AM_CATEGORY, 'field_category', $fieldcatid);
+ $cat_select->addOption(0, _PROFILE_AM_DEFAULT);
+ $cat_select->addOptionArray($category_handler->getList());
+ $form->addElement($cat_select);
+ if ($field->getVar('field_config') || $field->isNew()) {
+ if (!$field->isNew()) {
+ $form->addElement(new XoopsFormLabel(sprintf(_PROFILE_AM_NAME, _PROFILE_AM_FIELD), $field->getVar('field_name')));
+ $form->addElement(new XoopsFormHidden('id', $field->getVar('fieldid')));
+ }
+ else {
+ $form->addElement(new XoopsFormText(sprintf(_PROFILE_AM_NAME, _PROFILE_AM_FIELD), 'field_name', 35, 255, $field->getVar('field_name', 'e')));
+ }
+
+ //autotext and theme left out of this one as fields of that type should never be changed (valid assumption, I think)
+ $fieldtypes = array('checkbox' => _PROFILE_AM_CHECKBOX,
+ 'date' => _PROFILE_AM_DATE,
+ 'datetime' => _PROFILE_AM_DATETIME,
+ 'group' => _PROFILE_AM_GROUP,
+ 'group_multi' => _PROFILE_AM_GROUPMULTI,
+ 'language' => _PROFILE_AM_LANGUAGE,
+ 'radio' => _PROFILE_AM_RADIO,
+ 'select' => _PROFILE_AM_SELECT,
+ 'select_multi' => _PROFILE_AM_SELECTMULTI,
+ 'textarea' => _PROFILE_AM_TEXTAREA,
+ 'dhtml' => _PROFILE_AM_DHTMLTEXTAREA,
+ 'textbox' => _PROFILE_AM_TEXTBOX,
+ 'timezone' => _PROFILE_AM_TIMEZONE,
+ 'yesno' => _PROFILE_AM_YESNO);
+
+ $element_select = new XoopsFormSelect(_PROFILE_AM_TYPE, 'field_type', $field->getVar('field_type', 'e'));
+ $element_select->addOptionArray($fieldtypes);
+
+ $form->addElement($type_select);
+ $form->addElement($element_select);
+
+ switch ($field->getVar('field_type')) {
+ case "textbox":
+ $valuetypes = array(XOBJ_DTYPE_ARRAY => _PROFILE_AM_ARRAY,
+ XOBJ_DTYPE_EMAIL => _PROFILE_AM_EMAIL,
+ XOBJ_DTYPE_INT => _PROFILE_AM_INT,
+ XOBJ_DTYPE_TXTAREA => _PROFILE_AM_TXTAREA,
+ XOBJ_DTYPE_TXTBOX => _PROFILE_AM_TXTBOX,
+ XOBJ_DTYPE_URL => _PROFILE_AM_URL,
+ XOBJ_DTYPE_OTHER => _PROFILE_AM_OTHER);
+ $type_select = new XoopsFormSelect(_PROFILE_AM_VALUETYPE, 'field_valuetype', $field->getVar('field_valuetype', 'e'));
+ $type_select->addOptionArray($valuetypes);
+ $form->addElement($valuetypes);
+ break;
+
+ case "select":
+ case "radio":
+ $valuetypes = array(XOBJ_DTYPE_ARRAY => _PROFILE_AM_ARRAY,
+ XOBJ_DTYPE_EMAIL => _PROFILE_AM_EMAIL,
+ XOBJ_DTYPE_INT => _PROFILE_AM_INT,
+ XOBJ_DTYPE_TXTAREA => _PROFILE_AM_TXTAREA,
+ XOBJ_DTYPE_TXTBOX => _PROFILE_AM_TXTBOX,
+ XOBJ_DTYPE_URL => _PROFILE_AM_URL,
+ XOBJ_DTYPE_OTHER => _PROFILE_AM_OTHER);
+ $type_select = new XoopsFormSelect(_PROFILE_AM_VALUETYPE, 'field_valuetype', $field->getVar('field_valuetype', 'e'));
+ $type_select->addOptionArray($valuetypes);
+ $form->addElement($valuetypes);
+ break;
+
+
+ }
+
+ //$form->addElement(new XoopsFormRadioYN(_PROFILE_AM_NOTNULL, 'field_notnull', $field->getVar('field_notnull', 'e')));
+
+ if ($field->getVar('field_type') == "select" || $field->getVar('field_type') == "select_multi" || $field->getVar('field_type') == "radio" || $field->getVar('field_type') == "checkbox") {
+ if (count($field->getVar('field_options')) > 0) {
+ $remove_options = new XoopsFormCheckBox(_PROFILE_AM_REMOVEOPTIONS, 'removeOptions');
+ $options = $field->getVar('field_options');
+ asort($options);
+ $remove_options->addOptionArray($options);
+ $form->addElement($remove_options);
+ }
+
+ $option_tray = new XoopsFormElementTray(_PROFILE_AM_ADDOPTION);
+ $option_tray->addElement(new XoopsFormText(_PROFILE_AM_KEY, 'addOption[key]', 15, 35));
+ $option_tray->addElement(new XoopsFormText(_PROFILE_AM_VALUE, 'addOption[value]', 35, 255));
+ $form->addElement($option_tray);
+ }
+ }
+
+ if ($field->getVar('field_edit')) {
+ switch ($field->getVar('field_type')) {
+ case "textbox":
+ //proceed to next cases
+ case "textarea":
+ case "dhtml":
+ $form->addElement(new XoopsFormText(_PROFILE_AM_MAXLENGTH, 'field_maxlength', 35, 35, $field->getVar('field_maxlength', 'e')));
+ $form->addElement(new XoopsFormTextArea(_PROFILE_AM_DEFAULT, 'field_default', $field->getVar('field_default', 'e')));
+ break;
+
+ case "checkbox":
+ case "select_multi":
+ $def_value = $field->getVar('field_default', 'e') != null ? unserialize($field->getVar('field_default', 'n')) : null;
+ $element = new XoopsFormSelect(_PROFILE_AM_DEFAULT, 'field_default', $def_value, 8, true);
+ $options = $field->getVar('field_options');
+ asort($options);
+ $element->addOptionArray($options);
+ $form->addElement($element);
+ break;
+
+ case "select":
+ case "radio":
+ $def_value = $field->getVar('field_default', 'e') != null ? $field->getVar('field_default') : null;
+ $element = new XoopsFormSelect(_PROFILE_AM_DEFAULT, 'field_default', $def_value);
+ $options = $field->getVar('field_options');
+ asort($options);
+ $element->addOptionArray($options);
+ $form->addElement($element);
+ break;
+
+ case "date":
+ $form->addElement(new XoopsFormTextDateSelect(_PROFILE_AM_DEFAULT, 'field_default', 15, $field->getVar('field_default', 'e')));
+ break;
+
+ case "datetime":
+ $form->addElement(new XoopsFormDateTime(_PROFILE_AM_DEFAULT, 'field_default', 15, $field->getVar('field_default', 'e')));
+ break;
+
+ case "yesno":
+ $form->addElement(new XoopsFormRadioYN(_PROFILE_AM_DEFAULT, 'field_default', $field->getVar('field_default', 'e')));
+ break;
+
+ case "timezone":
+ $form->addElement(new XoopsFormSelectTimezone(_PROFILE_AM_DEFAULT, 'field_default', $field->getVar('field_default', 'e')));
+ break;
+
+ case "language":
+ $form->addElement(new XoopsFormSelectLang(_PROFILE_AM_DEFAULT, 'field_default', $field->getVar('field_default', 'e')));
+ break;
+
+ case "group":
+ $form->addElement(new XoopsFormSelectGroup(_PROFILE_AM_DEFAULT, 'field_default', true, $field->getVar('field_default', 'e')));
+ break;
+
+ case "group_multi":
+ $form->addElement(new XoopsFormSelectGroup(_PROFILE_AM_DEFAULT, 'field_default', true, $field->getVar('field_default', 'e'), 5, true));
+ break;
+
+ case "theme":
+ $form->addElement(new XoopsFormSelectTheme(_PROFILE_AM_DEFAULT, 'field_default', $field->getVar('field_default', 'e')));
+ break;
+
+ case "autotext":
+ $form->addElement(new XoopsFormTextArea(_PROFILE_AM_DEFAULT, 'field_default', $field->getVar('field_default', 'e')));
+ break;
+ }
+ }
+
+ $groupperm_handler =& xoops_gethandler('groupperm');
+ $searchable_types = array('textbox',
+ 'select',
+ 'radio',
+ 'yesno',
+ 'date',
+ 'datetime',
+ 'timezone',
+ 'language');
+ if (in_array($field->getVar('field_type'), $searchable_types)) {
+ $search_groups = $groupperm_handler->getGroupIds('profile_search', $field->getVar('fieldid'), $GLOBALS['xoopsModule']->getVar('mid'));
+ $form->addElement(new XoopsFormSelectGroup(_PROFILE_AM_PROF_SEARCH, 'profile_search', true, $search_groups, 5, true));
+ }
+ if ($field->getVar('field_show') || $field->getVar('field_edit')) {
+ //$form->addElement(new XoopsFormText(_PROFILE_AM_FIELD." "._PROFILE_AM_WEIGHT, 'field_weight', 35, 35, $field->getVar('field_weight', 'e')));
+ if (!$field->isNew()) {
+ //Load groups
+ $show_groups = $groupperm_handler->getGroupIds('profile_show', $field->getVar('fieldid'), $GLOBALS['xoopsModule']->getVar('mid'));
+ $editable_groups = $groupperm_handler->getGroupIds('profile_edit', $field->getVar('fieldid'), $GLOBALS['xoopsModule']->getVar('mid'));
+ $visible_groups = $groupperm_handler->getGroupIds('profile_visible', $field->getVar('fieldid'), $GLOBALS['xoopsModule']->getVar('mid'));
+
+ }
+ else {
+ $visible_groups = array();
+ $show_groups = array();
+ $editable_groups = array();
+ }
+ if ($field->getVar('field_show')) {
+// Leave out categories for now
+// $cat_select = new XoopsFormSelect(_PROFILE_AM_CATEGORY, 'catid', $field->getVar('catid'));
+// $category_handler =& xoops_getmodulehandler('category');
+// $categories =& $category_handler->getObjects(null, true);
+// foreach (array_keys($categories) as $i) {
+// $cat_select->addOption($i, $categories[$i]->getVar('cat_title'));
+// }
+// $form->addElement($cat_select);
+
+ $form->addElement(new XoopsFormSelectGroup(_PROFILE_AM_PROF_VISIBLE_ON, 'profile_show', false, $show_groups, 5, true));
+ $form->addElement(new XoopsFormSelectGroup(_PROFILE_AM_PROF_VISIBLE_FOR, 'profile_visible', true, $visible_groups, 5, true));
+
+ }
+ if ($field->getVar('field_edit')) {
+ $form->addElement(new XoopsFormSelectGroup(_PROFILE_AM_PROF_EDITABLE, 'profile_edit', false, $editable_groups, 5, true));
+ $form->addElement(new XoopsFormRadioYN(_PROFILE_AM_REQUIRED, 'field_required', $field->getVar('field_required', 'e')));
+ $form->addElement(new XoopsFormRadioYN(_PROFILE_AM_PROF_REGISTER, 'field_register', $field->getVar('field_register', 'e')));
+ }
+ }
+ $form->addElement(new XoopsFormHidden('op', 'save'));
+ $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
+
+ return $form;
+}
+/**
+* Get {@link XoopsThemeForm} for registering new users
+*
+* @param object $user {@link XoopsUser} to register
+* @param mixed $action URL to submit to or false for $_SERVER['REQUEST_URI']
+*
+* @return object
+*/
+function getRegisterForm(&$user, $action = false) {
+ if ($action === false) {
+ $action = $_SERVER['REQUEST_URI'];
+ }
+ global $xoopsModuleConfig, $xoopsConfig;
+ include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+
+ $reg_form = new XoopsThemeForm(_PROFILE_MA_USERREG, "userinfo", $action, "post", true);
+
+ $elements[0][] = array('element' => new XoopsFormText(_PROFILE_MA_EMAIL, "email", 25, 60, $user->getVar('email', 'e')), 'required' => true);
+ $weights[0][] = 0;
+
+ $uname_size = $xoopsModuleConfig['max_uname'] < 35 ? $xoopsModuleConfig['max_uname'] : 35;
+ $elements[0][] = array('element' => new XoopsFormText(_PROFILE_MA_NICKNAME, "loginname", $uname_size, $uname_size, $user->getVar('loginname', 'e')), 'required' => true);
+ $weights[0][] = 0;
+
+ $elements[0][] = array('element' => new XoopsFormText(_PROFILE_MA_DISPLAYNAME, "uname", $uname_size, 75, $user->getVar('uname', 'e')), 'required' => true);
+ $weights[0][] = 0;
+
+ // Dynamic fields
+ $profile_handler =& xoops_gethandler('profile');
+ // Get fields
+ $fields =& $profile_handler->loadFields();
+
+ $profile_fieldcat_handler =& xoops_getmodulehandler('fieldcategory');
+ /* @var $profile_fieldcat_handler ProfileFieldCategoryHandler */
+ $profile_cat_handler =& xoops_getmodulehandler('category');
+ /* @var $profile_cat_handler ProfileCategoryHandler */
+
+ $fieldcats =& $profile_fieldcat_handler->getObjects(null, true);
+ if (count($fieldcats) > 0) {
+ foreach (array_keys($fieldcats) as $i) {
+ $catids[] = $fieldcats[$i]->getVar('catid');
+ }
+ $categories =& $profile_cat_handler->getObjects(new Criteria('catid', "(".implode(',', array_unique($catids)).")", "IN"), true, false);
+ }
+ $fieldcat_handler =& xoops_getmodulehandler('fieldcategory');
+ $fieldcats =& $fieldcat_handler->getObjects(null, true);
+
+ foreach (array_keys($fields) as $i) {
+ if ($fields[$i]->getVar('field_register')) {
+ $fieldinfo['element'] = $fields[$i]->getEditElement($user);
+ $fieldinfo['required'] = $fields[$i]->getVar('field_required');
+
+ if (isset($fieldcats[$fields[$i]->getVar('fieldid')])) {
+ $key = $fieldcats[$fields[$i]->getVar('fieldid')]->getVar('catid');
+ }
+ else {
+ $key = 0;
+ }
+ $elements[$key][] = $fieldinfo;
+ $weights[$key][] = isset($fieldcats[$fields[$i]->getVar('fieldid')]) ? intval($fieldcats[$fields[$i]->getVar('fieldid')]->getVar('field_weight')) : 1;
+ }
+ }
+ ksort($elements);
+ foreach (array_keys($elements) as $k) {
+ array_multisort($weights[$k], SORT_ASC, array_keys($elements[$k]), SORT_ASC, $elements[$k]);
+ $title = isset($categories[$k]) ? $categories[$k]['cat_title'] : _PROFILE_MA_DEFAULT;
+ $reg_form->insertBreak($title, 'head');
+ foreach (array_keys($elements[$k]) as $i) {
+ $reg_form->addElement($elements[$k][$i]['element'], $elements[$k][$i]['required']);
+ }
+ }
+ //end of Dynamic User fields
+ $reg_form->addElement(new XoopsFormPassword(_PROFILE_MA_PASSWORD, "pass", 10, 32, ""), true);
+ $reg_form->addElement(new XoopsFormPassword(_PROFILE_MA_VERIFYPASS, "vpass", 10, 32, ""), true);
+
+ if ($xoopsModuleConfig['display_disclaimer'] != 0 && $xoopsModuleConfig['disclaimer'] != '') {
+ $disc_tray = new XoopsFormElementTray(_PROFILE_MA_DISCLAIMER, '<br />');
+ $disc_text = new XoopsFormLabel("", "<div style=\"padding: 5px;\">".$GLOBALS["myts"]->displayTarea($xoopsModuleConfig['disclaimer'],1)."</div>");
+ // Should we define a div.xoopsStatement class in style.css?
+ $disc_tray->addElement($disc_text);
+ $agree_chk = new XoopsFormCheckBox('', 'agree_disc');
+ $agree_chk->addOption(1, _PROFILE_MA_IAGREE);
+ $disc_tray->addElement($agree_chk);
+ $reg_form->addElement($disc_tray);
+ }
+ $reg_form->addElement(new XoopsFormHidden("op", "newuser"));
+ $reg_form->addElement(new XoopsFormButton("", "submit", _PROFILE_MA_SUBMIT, "submit"));
+ return $reg_form;
+}
+
+/**
+* Get {@link XoopsSimpleForm} for finishing registration
+*
+* @param object $user {@link XoopsUser} object to finish registering
+* @param string $vpass Password verification field
+* @param mixed $action URL to submit to or false for $_SERVER['REQUEST_URI']
+*
+* @return object
+*/
+function getFinishForm(&$user, $vpass, $action = false) {
+ if ($action === false) {
+ $action = $_SERVER['REQUEST_URI'];
+ }
+ include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+
+ $form = new XoopsSimpleForm(_PROFILE_MA_USERREG, "userinfo", $action, "post", true);
+ $profile = $user->getProfile();
+ $array = array_merge(array_keys($user->getVars()), array_keys($profile->getVars()));
+ foreach ($array as $field) {
+ $value = $user->getVar($field, 'e');
+ if (is_array($value)) {
+ foreach ($value as $thisvalue) {
+ $form->addElement(new XoopsFormHidden($field."[]", $thisvalue));
+ }
+ }
+ else {
+ $form->addElement(new XoopsFormHidden($field, $value));
+ }
+ }
+ $myts =& MyTextSanitizer::getInstance();
+ $form->addElement(new XoopsFormHidden('vpass', $myts->htmlSpecialChars($vpass)));
+ $form->addElement(new XoopsFormHidden('op', 'finish'));
+ $form->addElement(new XoopsFormButton('', 'submit', _PROFILE_MA_FINISH, 'submit'));
+ return $form;
+}
+
+/**
+* Get {@link XoopsThemeForm} for editing a user
+*
+* @param object $user {@link XoopsUser} to edit
+*
+* @return object
+*/
+function getUserForm(&$user, $action = false) {
+ global $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsUser;
+ if ($action === false) {
+ $action = $_SERVER['REQUEST_URI'];
+ }
+ include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+ $title = $user->isNew() ? _PROFILE_AM_ADDUSER : _PROFILE_MA_EDITPROFILE;
+
+ $form = new XoopsThemeForm($title, 'userinfo', $action, 'post', true);
+ if ($user->isNew() || $xoopsUser->isAdmin()) {
+ $elements[0][] = array('element' => new XoopsFormText(_PROFILE_MA_NICKNAME, 'loginname', 25, 255, $user->getVar('loginname', 'e')), 'required' => 1);
+ }
+ else {
+ $elements[0][] = array('element' => new XoopsFormLabel(_PROFILE_MA_NICKNAME, $user->getVar('loginname')), 'required' => 0);
+ }
+ $weights[0][] = 0;
+
+ $elements[0][] = array('element' => new XoopsFormText(_PROFILE_MA_DISPLAYNAME, 'uname', 25, 75, $user->getVar('uname', 'e')), 'required' => 1);
+ $weights[0][] = 0;
+
+ $elements[0][] = array('element' => new XoopsFormText(_PROFILE_MA_REALNAME, 'name', 25, 75, $user->getVar('name', 'e')), 'required' => 0);
+ $weights[0][] = 0;
+
+ $email_tray = new XoopsFormElementTray(_PROFILE_MA_EMAIL, '<br />');
+ if ($user->isNew() || $xoopsUser->isAdmin()) {
+ $email_text = new XoopsFormText('', 'email', 30, 60, $user->getVar('email'));
+ } else {
+ $email_text = new XoopsFormLabel('', $user->getVar('email'));
+ }
+ $email_tray->addElement($email_text, ($user->isNew() || $xoopsModuleConfig['allow_chgmail'] == 1));
+ $elements[0][] = array('element' => $email_tray, 'required' => 0);
+ $weights[0][] = 0;
+
+ if ($xoopsUser->isAdmin() && $user->getVar('uid') != $xoopsUser->getVar('uid')) {
+ //If the user is an admin and is editing someone else
+ $pwd_text = new XoopsFormPassword('', 'password', 10, 32);
+ $pwd_text2 = new XoopsFormPassword('', 'vpass', 10, 32);
+ $pwd_tray = new XoopsFormElementTray(_PROFILE_MA_PASSWORD.'<br />'._PROFILE_MA_TYPEPASSTWICE);
+ $pwd_tray->addElement($pwd_text);
+ $pwd_tray->addElement($pwd_text2);
+ $elements[0][] = array('element' => $pwd_tray, 'required' => 0); //cannot set an element tray required
+ $weights[0][] = 0;
+
+ $level_radio = new XoopsFormRadio(_PROFILE_MA_ACTIVEUSER, 'level', $user->getVar('level'));
+ $level_radio->addOption(1, _PROFILE_MA_ACTIVE);
+ $level_radio->addOption(0, _PROFILE_MA_INACTIVE);
+ $level_radio->addOption(-1, _PROFILE_MA_DISABLED);
+ $elements[0][] = array('element' => $level_radio, 'required' => 0);
+ $weights[0][] = 0;
+ }
+
+ $elements[0][] = array('element' => new XoopsFormHidden('uid', $user->getVar('uid')), 'required' => 0);
+ $weights[0][] = 0;
+ $elements[0][] = array('element' => new XoopsFormHidden('op', 'save'), 'required' => 0);
+ $weights[0][] = 0;
+
+ if ($xoopsUser && $xoopsUser->isAdmin()) {
+ $xoopsModule->loadLanguage("admin");
+ $rank_select = new XoopsFormSelect(_PROFILE_AM_RANK, "rank", $user->getVar('rank'));
+ $ranklist = XoopsLists::getUserRankList();
+ if ( count($ranklist) > 0 ) {
+ $rank_select->addOption(0, _PROFILE_AM_NSRA);
+ $rank_select->addOption(0, "--------------");
+ $rank_select->addOptionArray($ranklist);
+ } else {
+ $rank_select->addOption(0, _PROFILE_AM_NSRID);
+ }
+ $elements[0][] = array('element' => $rank_select, 'required' => 0);
+ $weights[0][] = 0;
+ $gperm_handler =& xoops_gethandler('groupperm');
+ //If user has admin rights on groups
+ include_once XOOPS_ROOT_PATH."/modules/system/constants.php";
+ if ($gperm_handler->checkRight("system_admin", XOOPS_SYSTEM_GROUP, $xoopsUser->getGroups(), 1)) {
+ //add group selection
+ $group_select = new XoopsFormSelectGroup(_PROFILE_AM_GROUP, 'groups', false, $user->getGroups(), 5, true);
+ $elements[0][] = array('element' => $group_select, 'required' => 0);
+ $weights[0][] = 0;
+ }
+ }
+
+
+ // Dynamic fields
+ $profile_handler =& xoops_gethandler('profile');
+ // Get fields
+ $fields =& $profile_handler->loadFields();
+ // Get ids of fields that can be edited
+ $gperm_handler =& xoops_gethandler('groupperm');
+ $editable_fields =& $gperm_handler->getItemIds('profile_edit', $xoopsUser->getGroups(), $xoopsModule->getVar('mid'));
+
+ $profile_fieldcat_handler =& xoops_getmodulehandler('fieldcategory');
+ /* @var $profile_fieldcat_handler ProfileFieldCategoryHandler */
+ $profile_cat_handler =& xoops_getmodulehandler('category');
+ /* @var $profile_cat_handler ProfileCategoryHandler */
+
+ $fieldcats =& $profile_fieldcat_handler->getObjects(null, true);
+ if (count($fieldcats) > 0) {
+ foreach (array_keys($fieldcats) as $i) {
+ $catids[] = $fieldcats[$i]->getVar('catid');
+ }
+ $categories =& $profile_cat_handler->getObjects(new Criteria('catid', "(".implode(',', array_unique($catids)).")", "IN"), true, false);
+ }
+ $fieldcat_handler =& xoops_getmodulehandler('fieldcategory');
+ $fieldcats =& $fieldcat_handler->getObjects(null, true);
+
+ foreach (array_keys($fields) as $i) {
+ if (in_array($fields[$i]->getVar('fieldid'), $editable_fields)) {
+ $fieldinfo['element'] = $fields[$i]->getEditElement($user);
+ $fieldinfo['required'] = $fields[$i]->getVar('field_required');
+
+ if (isset($fieldcats[$fields[$i]->getVar('fieldid')])) {
+ $key = $fieldcats[$fields[$i]->getVar('fieldid')]->getVar('catid');
+ }
+ else {
+ $key = 0;
+ }
+ $elements[$key][] = $fieldinfo;
+ $weights[$key][] = isset($fieldcats[$fields[$i]->getVar('fieldid')]) ? intval($fieldcats[$fields[$i]->getVar('fieldid')]->getVar('field_weight')) : 1;
+ }
+ }
+ ksort($elements);
+ foreach (array_keys($elements) as $k) {
+ array_multisort($weights[$k], SORT_ASC, array_keys($elements[$k]), SORT_ASC, $elements[$k]);
+ $title = isset($categories[$k]) ? $categories[$k]['cat_title'] : _PROFILE_MA_DEFAULT;
+ $form->insertBreak($title, 'head');
+ foreach (array_keys($elements[$k]) as $i) {
+ $form->addElement($elements[$k][$i]['element'], $elements[$k][$i]['required']);
+ }
+ }
+
+ $form->addElement(new XoopsFormButton('', 'submit', _PROFILE_MA_SAVECHANGES, 'submit'));
+ return $form;
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/include/forms.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/include/functions.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/include/functions.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/include/functions.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,152 @@
+<?php
+
+/**
+* Check a user's uname, email, password and password verification
+*
+* @param object $user {@link XoopsUser} to check
+*
+* @return string
+*/
+function userCheck($user)
+{
+ global $xoopsModuleConfig;
+ $stop = '';
+ if (!checkEmail($user->getVar('email'))) {
+ $stop .= _PROFILE_MA_INVALIDMAIL.'<br />'.print_r($user->getVar('email'));
+ }
+ foreach ($xoopsModuleConfig['bad_emails'] as $be) {
+ if (!empty($be) && preg_match("/".$be."/i", $user->getVar('email'))) {
+ $stop .= _PROFILE_MA_INVALIDMAIL.'<br />'.print_r($user->getVar('email'));
+ break;
+ }
+ }
+ if (strrpos($user->getVar('email'),' ') > 0) {
+ $stop .= _PROFILE_MA_EMAILNOSPACES.'<br />';
+ }
+ switch ($xoopsModuleConfig['uname_test_level']) {
+ case 0:
+ // strict
+ $restriction = '/[^a-zA-Z0-9\_\-]/';
+ break;
+ case 1:
+ // medium
+ $restriction = '/[^a-zA-Z0-9\_\-\<\>\,\.\$\%\#\@\!\\\'\"]/';
+ break;
+ case 2:
+ // loose
+ $restriction = '/[\000-\040]/';
+ break;
+ }
+ if ($user->getVar('loginname') == "" || preg_match($restriction, $user->getVar('loginname'))) {
+ $stop .= _PROFILE_MA_INVALIDNICKNAME."<br />";
+ }
+// if ($user->getVar('name') == "" || preg_match($restriction, $user->getVar('name'))) {
+// $stop .= _PROFILE_MA_INVALIDDISPLAYNAME."<br />";
+// }
+ if (strlen($user->getVar('loginname')) > $xoopsModuleConfig['max_uname']) {
+ $stop .= sprintf(_PROFILE_MA_NICKNAMETOOLONG, $xoopsModuleConfig['max_uname'])."<br />";
+ }
+ if (strlen($user->getVar('uname')) > $xoopsModuleConfig['max_uname']) {
+ $stop .= sprintf(_PROFILE_MA_DISPLAYNAMETOOLONG, $xoopsModuleConfig['max_uname'])."<br />";
+ }
+ if (strlen($user->getVar('loginname')) < $xoopsModuleConfig['min_uname']) {
+ $stop .= sprintf(_PROFILE_MA_NICKNAMETOOSHORT, $xoopsModuleConfig['min_uname'])."<br />";
+ }
+ if (strlen($user->getVar('uname')) < $xoopsModuleConfig['min_uname']) {
+ $stop .= sprintf(_PROFILE_MA_DISPLAYNAMETOOSHORT, $xoopsModuleConfig['min_uname'])."<br />";
+ }
+ foreach ($xoopsModuleConfig['bad_unames'] as $bu) {
+ if(empty($bu) ||$user->isAdmin()) continue;
+ if (preg_match("/".$bu."/i", $user->getVar('loginname'))) {
+ $stop .= _PROFILE_MA_NAMERESERVED."<br />";
+ break;
+ }
+ if (preg_match("/".$bu."/i", $user->getVar('uname'))) {
+ $stop .= _PROFILE_MA_DISPLAYNAMERESERVED."<br />";
+ break;
+ }
+ }
+ if (strrpos($user->getVar('loginname'), ' ') > 0) {
+ $stop .= _PROFILE_MA_NICKNAMENOSPACES."<br />";
+ }
+// if (strrpos($user->getVar('name'), ' ') > 0) {
+// $stop .= _PROFILE_MA_DISPLAYNAMENOSPACES."<br />";
+// }
+ $member_handler =& xoops_gethandler('member');
+ $count_criteria = new Criteria('loginname', $user->getVar('loginname'));
+ $display_criteria = new Criteria('uname', $user->getVar('uname'));
+ if ($user->getVar('uid') > 0) {
+ //existing user, so let's keep the user's own row out of this
+ $count_criteria = new CriteriaCompo($count_criteria);
+ $display_criteria = new CriteriaCompo($display_criteria);
+
+ $useridcount_criteria = new Criteria('uid', $user->getVar('uid'), '!=');
+ $useriddisplay_criteria = new Criteria('uid', $user->getVar('uid'), '!=');
+
+ $count_criteria->add($useridcount_criteria);
+ $display_criteria->add($useriddisplay_criteria);
+ }
+ $count = $member_handler->getUserCount($count_criteria);
+ $display_count = $member_handler->getUserCount($display_criteria);
+ unset($count_criteria);
+ unset($display_criteria);
+ if ($count > 0) {
+ $stop .= _PROFILE_MA_NICKNAMETAKEN."<br />";
+ }
+ if ($display_count > 0) {
+ $stop .= _PROFILE_MA_DISPLAYNAMETAKEN."<br />";
+ }
+ $count = 0;
+ if ( $user->getVar('email')) {
+ $count_criteria = new Criteria('email', $user->getVar('email'));
+ if ($user->getVar('uid') > 0) {
+ //existing user, so let's keep the user's own row out of this
+ $count_criteria = new CriteriaCompo($count_criteria);
+ $count_criteria->add(new Criteria('uid', $user->getVar('uid'), '!='));
+ }
+ $count = $member_handler->getUserCount($count_criteria);
+ unset($count_criteria);
+ if ( $count > 0 ) {
+ $stop .= _PROFILE_MA_EMAILTAKEN."<br />";
+ }
+ }
+
+ return $stop;
+}
+
+/**
+* Check password - used when changing password
+*
+* @param string $uname username of the user changing password
+* @param string $oldpass old password
+* @param string $newpass new password
+* @param string $vpass verification of new password (must be the same as $newpass)
+*
+* @return string
+**/
+function checkPassword($uname, $oldpass, $newpass, $vpass) {
+ $stop = "";
+ $uname = trim($uname);
+ $myts = MyTextSanitizer::getInstance();
+ if ($oldpass == "") {
+ $stop .= _PROFILE_MA_ENTERPWD;
+ }
+ else {
+ //check if $oldpass is correct
+ $member_handler =& xoops_gethandler('member');
+ if (!$member_handler->loginUser($myts->addSlashes($uname), $myts->addSlashes($oldpass))) {
+ $stop .= _PROFILE_MA_WRONGPASSWORD;
+ }
+ }
+ if ( $newpass == '' || !$vpass || $vpass == '' ) {
+ $stop .= _PROFILE_MA_ENTERPWD.'<br />';
+ }
+ global $xoopsModuleConfig;
+ if ( ($newpass != $vpass) ) {
+ $stop .= _PROFILE_MA_PASSNOTSAME.'<br />';
+ } elseif ( ($newpass != '') && (strlen($myts->stripSlashesGPC($newpass)) < $xoopsModuleConfig['minpass']) ) {
+ $stop .= sprintf(_PROFILE_MA_PWDTOOSHORT,$xoopsModuleConfig['minpass'])."<br />";
+ }
+ return $stop;
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/include/functions.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/include/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/include/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/include/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/include/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/index.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/index.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/index.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,36 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include '../../mainfile.php';
+
+if ($xoopsUser) {
+ header('location: userinfo.php?uid='.$xoopsUser->getVar('uid'));
+}
+else {
+ header('location: register.php');
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/index.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/admin.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/admin.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/admin.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,112 @@
+<?php
+// $Id$
+define("_PROFILE_AM_FIELD", "Field");
+define("_PROFILE_AM_FIELDS", "Fields");
+define("_PROFILE_AM_CATEGORY", "Category");
+
+define("_PROFILE_AM_SAVEDSUCCESS", "%s Saved Successfully");
+define("_PROFILE_AM_DELETEDSUCCESS", "%s Deleted Successfully");
+define("_PROFILE_AM_RUSUREDEL", "Are you sure you want to delete %s");
+
+define("_PROFILE_AM_ADD", "Add");
+define("_PROFILE_AM_EDIT", "Edit");
+define("_PROFILE_AM_TYPE", "Field Type");
+define("_PROFILE_AM_VALUETYPE", "Value Type");
+define("_PROFILE_AM_NAME", "Name");
+define("_PROFILE_AM_TITLE", "Title");
+define("_PROFILE_AM_DESCRIPTION", "Description");
+define("_PROFILE_AM_REQUIRED", "Required?");
+define("_PROFILE_AM_MAXLENGTH", "Maximum Length");
+define("_PROFILE_AM_WEIGHT", "Weight");
+define("_PROFILE_AM_DEFAULT", "Default");
+define("_PROFILE_AM_NOTNULL", "Not Null?");
+define("_PROFILE_AM_MODULE", "Module");
+
+define("_PROFILE_AM_ARRAY", "Array");
+define("_PROFILE_AM_EMAIL", "Email");
+define("_PROFILE_AM_INT", "Integer");
+define("_PROFILE_AM_TXTAREA", "Text Area");
+define("_PROFILE_AM_TXTBOX", "Text field");
+define("_PROFILE_AM_URL", "URL");
+define("_PROFILE_AM_OTHER", "Other");
+
+define("_PROFILE_AM_PROF_VISIBLE_ON", "Field visible on these groups' profile");
+define("_PROFILE_AM_PROF_VISIBLE_FOR", "Field visible on profile for these groups");
+define("_PROFILE_AM_PROF_EDITABLE", "Field editable from profile");
+define("_PROFILE_AM_PROF_REGISTER", "Show in registration form");
+define("_PROFILE_AM_PROF_SEARCH", "Searchable by these groups");
+
+define("_PROFILE_AM_CHECKBOX", "Checkbox");
+define("_PROFILE_AM_GROUP", "Group Select");
+define("_PROFILE_AM_GROUPMULTI", "Group Multi Select");
+define("_PROFILE_AM_LANGUAGE", "Language Select");
+define("_PROFILE_AM_RADIO", "Radio Buttons");
+define("_PROFILE_AM_SELECT", "Select");
+define("_PROFILE_AM_SELECTMULTI", "Multi Select");
+define("_PROFILE_AM_TEXTAREA", "Text Area");
+define("_PROFILE_AM_DHTMLTEXTAREA", "DHTML Text Area");
+define("_PROFILE_AM_TEXTBOX", "Text Field");
+define("_PROFILE_AM_TIMEZONE", "Timezone");
+define("_PROFILE_AM_YESNO", "Radio Yes/No");
+define("_PROFILE_AM_DATE", "Date");
+define("_PROFILE_AM_AUTOTEXT", "Auto Text");
+define("_PROFILE_AM_DATETIME", "Date and Time");
+//define("_PROFILE_AM_LONGDATE", "Long Date");
+
+define("_PROFILE_AM_ADDOPTION", "Add Option");
+define("_PROFILE_AM_REMOVEOPTIONS", "Remove Options");
+define("_PROFILE_AM_KEY", "Key");
+define("_PROFILE_AM_VALUE", "Value");
+
+// User management
+define("_PROFILE_AM_EDITUSER", "Edit User");
+define("_PROFILE_AM_SELECTUSER", "Select User");
+define("_PROFILE_AM_AYSYWTDU","Are you sure you want to delete user %s?");
+define("_PROFILE_AM_BYTHIS","By doing this all the info for this user will be removed permanently.");
+define("_PROFILE_AM_YMCACF","You must complete all required fields");
+define("_PROFILE_AM_CNRNU","Could not register new user.");
+define("_PROFILE_AM_EDEUSER","Edit/Delete Users");
+define("_PROFILE_AM_NICKNAME","Nickname");
+define("_PROFILE_AM_MODIFYUSER","Modify User");
+define("_PROFILE_AM_DELUSER","Delete User");
+define("_PROFILE_AM_GO","Go!");
+define("_PROFILE_AM_ADDUSER","Add User");
+define("_PROFILE_AM_OPTION","Option");
+define("_PROFILE_AM_AVATAR","Avatar");
+define("_PROFILE_AM_THEME","Theme");
+define("_PROFILE_AM_AOUTVTEAD","Allow other users to view this email address");
+define("_PROFILE_AM_RANK","Rank");
+define("_PROFILE_AM_NSRA","No Special Rank Assigned");
+define("_PROFILE_AM_NSRID","No Special Ranks in Database");
+define("_PROFILE_AM_ACCESSLEV","Access Level");
+define("_PROFILE_AM_PASSWORD","Password");
+define("_PROFILE_AM_INDICATECOF","* indicates required fields");
+define("_PROFILE_AM_NOTACTIVE","This user has not been activated. Do you wish to activate this user?");
+define("_PROFILE_AM_UPDATEUSER","Update User");
+define("_PROFILE_AM_USERINFO","User Info");
+define("_PROFILE_AM_USERID","User ID");
+define("_PROFILE_AM_RETYPEPD","Retype Password");
+define("_PROFILE_AM_CHANGEONLY","(for changes only)");
+define("_PROFILE_AM_USERPOST","User Posts");
+define("_PROFILE_AM_COMMENTS","Comments");
+define("_PROFILE_AM_PTBBTSDIYT","Push the button below to synchronize data if you think the above user posts info does not seem to indicate the actual status");
+define("_PROFILE_AM_SYNCHRONIZE","Synchronize");
+define("_PROFILE_AM_USERDONEXIT","User doesn't exist!");
+define("_PROFILE_AM_STNPDNM","Sorry, the new passwords do not match. Click back and try again");
+define("_PROFILE_AM_CNGTCOM","Could not get total comments");
+define("_PROFILE_AM_CNUUSER","Could not update user");
+define("_PROFILE_AM_CNGUSERID","Could not get user IDS");
+define("_PROFILE_AM_LIST","List");
+define("_PROFILE_AM_NOUSERS", "No users selected");
+define("_PROFILE_MA_ACTIVEUSER", "User Level");
+
+define("_PROFILE_MA_ACTIVE", "Active");
+define("_PROFILE_MA_INACTIVE", "Inactive");
+define("_PROFILE_MA_DISABLED", "Disabled");
+define("_PROFILE_MA_USERDISABLED", "This user account is disabled and cannot be activated by the user");
+
+define("_PROFILE_AM_NOUSERNAME", "No Username Selected");
+define("_PROFILE_AM_USERCREATED", "User Created");
+
+define("_PROFILE_AM_CANNOTDELETESELF", "Deleting your own account is not allowed - use your profile page to delete your own account");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/admin.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/error.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/error.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/error.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,4 @@
+<?php
+// $Id$
+define("PROFILE_ERROR1", "The key is wrong");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/error.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/activated.tpl
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/activated.tpl 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/activated.tpl 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,12 @@
+Hello {X_UNAME},
+
+Your new account at {SITENAME} has been activated by the administrator.
+
+You can now login from the following URL with the password you have provided upon registration.
+
+{SITEURL}user.php
+
+-----------
+{SITENAME} ({SITEURL})
+webmaster
+{ADMINMAIL}
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/activated.tpl
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/adminactivate.tpl
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/adminactivate.tpl 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/adminactivate.tpl 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,11 @@
+Hello {X_UNAME},
+
+A new user {USERNAME} ({USEREMAIL}) has just registered an account at {SITENAME}.
+Clicking on the link below will activate the account of this user:
+
+{USERACTLINK}
+
+-----------
+{SITENAME} ({SITEURL})
+webmaster
+{ADMINMAIL}
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/adminactivate.tpl
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/changemail.tpl
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/changemail.tpl 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/changemail.tpl 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,15 @@
+Hello {X_UNAME},
+
+A web user from {IP} has just requested that the email address connected
+to your account at {SITENAME} would be changed to this email address.
+
+To complete the email change, click the link below (note that you may have to log in at the site first) :
+
+{NEWEMAIL_LINK}
+
+If you didn't ask for this, don't worry. Just delete this Email.
+
+-----------
+{SITENAME} ({SITEURL})
+webmaster
+{ADMINMAIL}
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/changemail.tpl
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/register.tpl
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/register.tpl 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/register.tpl 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,21 @@
+Hello {X_UNAME},
+
+Thanks for subscribing to {SITENAME}. As a registered member your can:
+- Send private messages among members
+- Participate in discussion boards
+- Get the latest news
+- Submit content
+- Much, much more....
+
+The email address ({X_UEMAIL}) has been used to register an account.
+
+To become a member of {SITENAME}, please confirm your
+request by clicking on the link below:
+
+{X_UACTLINK}
+
+-----------
+Best Regards
+{SITENAME}
+({SITEURL})
+{ADMINMAIL}
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/mail_template/register.tpl
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/main.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/main.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/main.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,154 @@
+<?php
+// $Id$
+define("_PROFILE_MA_ERRORDURINGSAVE", "Error during save");
+define('_PROFILE_MA_USERREG','User Registration');
+define('_PROFILE_MA_NICKNAME','Username');
+define('_PROFILE_MA_REALNAME', 'Real Name');
+define('_PROFILE_MA_EMAIL','Email');
+define('_PROFILE_MA_ALLOWVIEWEMAIL','Allow other users to view my email address');
+define('_PROFILE_MA_TIMEZONE','Time Zone');
+define('_PROFILE_MA_AVATAR','Avatar');
+define('_PROFILE_MA_VERIFYPASS','Verify Password');
+define('_PROFILE_MA_SUBMIT','Submit');
+define('_PROFILE_MA_USERNAME','Username');
+define('_PROFILE_MA_FINISH','Finish');
+define('_PROFILE_MA_REGISTERNG','Could not register new user.');
+define('_PROFILE_MA_MAILOK','Receive occasional email notices <br />from administrators and moderators?');
+define('_PROFILE_MA_DISCLAIMER','Disclaimer');
+define('_PROFILE_MA_IAGREE','I agree to the above');
+define('_PROFILE_MA_UNEEDAGREE', 'Sorry, you have to agree to our disclaimer to get registered.');
+define('_PROFILE_MA_NOREGISTER','Sorry, we are currently closed for new user registrations');
+
+// %s is username. This is a subject for email
+define('_PROFILE_MA_USERKEYFOR','User activation key for %s');
+define('_PROFILE_MA_ACTLOGIN','Your account has been activated. Please login with the registered password.');
+define('_PROFILE_MA_ACTKEYNOT','Activation key not correct!');
+define('_PROFILE_MA_ACONTACT','Selected account is already activated!');
+
+define('_PROFILE_MA_YOURREGISTERED','An email containing an user activation key has been sent to the email account you provided. Please follow the instructions in the mail to activate your account. ');
+define('_PROFILE_MA_YOURREGMAILNG','You are now registered. However, we were unable to send the activation mail to your email account due to an internal error that had occurred on our server. We are sorry for the inconvenience, please send the webmaster an email notifying him/her of the situation.');
+define('_PROFILE_MA_YOURREGISTERED2','You are now registered. Please wait for your account to be activated by the adminstrators. You will receive an email once you are activated. This could take a while so please be patient.');
+
+// %s is your site name
+define('_PROFILE_MA_NEWUSERREGAT','New user registration at %s');
+// %s is a username
+define('_PROFILE_MA_HASJUSTREG','%s has just registered!');
+
+define('_PROFILE_MA_INVALIDMAIL','ERROR: Invalid email');
+define('_PROFILE_MA_EMAILNOSPACES','ERROR: Email addresses do not contain spaces.');
+define('_PROFILE_MA_INVALIDNICKNAME','ERROR: Invalid Username');
+define("_PROFILE_MA_INVALIDDISPLAYNAME", "ERROR: Invalid Displayname");
+define('_PROFILE_MA_NICKNAMETOOLONG','Username is too long. It must be less than %s characters.');
+define('_PROFILE_MA_DISPLAYNAMETOOLONG','Displayname is too long. It must be less than %s characters.');
+define('_PROFILE_MA_NICKNAMETOOSHORT','Username is too short. It must be more than %s characters.');
+define('_PROFILE_MA_DISPLAYNAMETOOSHORT','Displayname is too short. It must be more than %s characters.');
+define('_PROFILE_MA_NAMERESERVED','ERROR: Name is reserved.');
+define('_PROFILE_MA_DISPLAYNAMERESERVED','ERROR: Displayname is reserved.');
+define('_PROFILE_MA_NICKNAMENOSPACES','There cannot be any spaces in the Username.');
+define('_PROFILE_MA_DISPLAYNAMENOSPACES','There cannot be any spaces in the Displayname.');
+define('_PROFILE_MA_NICKNAMETAKEN','ERROR: Username taken.');
+define('_PROFILE_MA_DISPLAYNAMETAKEN','ERROR: Displayname taken.');
+define('_PROFILE_MA_EMAILTAKEN','ERROR: Email address already registered.');
+define('_PROFILE_MA_ENTERPWD','ERROR: You must provide a password.');
+define('_PROFILE_MA_SORRYNOTFOUND','Sorry, no corresponding user info was found.');
+define("_PROFILE_MA_WRONGPASSWORD", "ERROR: Wrong Password");
+define("_PROFILE_MA_USERALREADYACTIVE", "User with email %s is already activated");
+
+// %s is your site name
+define('_PROFILE_MA_YOURACCOUNT', 'Your account at %s');
+
+// %s is a username
+define('_PROFILE_MA_ACTVMAILNG', 'Failed sending notification mail to %s');
+define('_PROFILE_MA_ACTVMAILOK', 'Notification mail to %s sent.');
+
+define("_PROFILE_MA_DEFAULT", "Default Settings");
+
+//%%%%%% File Name userinfo.php %%%%%
+define('_PROFILE_MA_SELECTNG','No User Selected! Please go back and try again.');
+define('_PROFILE_MA_PM','PM');
+define('_PROFILE_MA_ICQ','ICQ');
+define('_PROFILE_MA_AIM','AIM');
+define('_PROFILE_MA_YIM','YIM');
+define('_PROFILE_MA_MSNM','MSNM');
+define('_PROFILE_MA_LOCATION','Location');
+define('_PROFILE_MA_OCCUPATION','Occupation');
+define('_PROFILE_MA_INTEREST','Interest');
+define('_PROFILE_MA_SIGNATURE','Signature');
+define('_PROFILE_MA_EXTRAINFO','Extra Info');
+define('_PROFILE_MA_EDITPROFILE','Edit Profile');
+define('_PROFILE_MA_LOGOUT','Logout');
+define('_PROFILE_MA_INBOX','Inbox');
+define('_PROFILE_MA_MEMBERSINCE','Member Since');
+define('_PROFILE_MA_RANK','Rank');
+define('_PROFILE_MA_POSTS','Comments/Posts');
+define('_PROFILE_MA_LASTLOGIN','Last Login');
+define('_PROFILE_MA_ALLABOUT','All about %s');
+define('_PROFILE_MA_STATISTICS','Statistics');
+define('_PROFILE_MA_MYINFO','My Info');
+define('_PROFILE_MA_BASICINFO','Basic information');
+define('_PROFILE_MA_MOREABOUT','More About Me');
+define('_PROFILE_MA_SHOWALL','Show All');
+
+//%%%%%% File Name edituser.php %%%%%
+define('_PROFILE_MA_PROFILE','Profile');
+define('_PROFILE_MA_DISPLAYNAME','Displayname');
+define('_PROFILE_MA_SHOWSIG','Always attach my signature');
+define('_PROFILE_MA_CDISPLAYMODE','Comments Display Mode');
+define('_PROFILE_MA_CSORTORDER','Comments Sort Order');
+define('_PROFILE_MA_PASSWORD','Password');
+define('_PROFILE_MA_TYPEPASSTWICE','(type a new password twice to change it)');
+define('_PROFILE_MA_SAVECHANGES','Save Changes');
+define('_PROFILE_MA_NOEDITRIGHT',"Sorry, you don't have the right to edit this user's info.");
+define('_PROFILE_MA_PASSNOTSAME','Both passwords are different. They must be identical.');
+define('_PROFILE_MA_PWDTOOSHORT','Sorry, your password must be at least <b>%s</b> characters long.');
+define("_PROFILE_MA_NOPASSWORD", "Please input a password");
+define('_PROFILE_MA_PROFUPDATED','Your Profile Updated!');
+define('_PROFILE_MA_USECOOKIE','Store my user name in a cookie for 1 year');
+define('_PROFILE_MA_NO','No');
+define('_PROFILE_MA_DELACCOUNT','Delete Account');
+define('_PROFILE_MA_MYAVATAR', 'My Avatar');
+define('_PROFILE_MA_UPLOADMYAVATAR', 'Upload Avatar');
+define('_PROFILE_MA_MAXPIXEL','Max Pixels');
+define('_PROFILE_MA_MAXIMGSZ','Max Image Size (Bytes)');
+define('_PROFILE_MA_SELFILE','Select file');
+define('_PROFILE_MA_OLDDELETED','Your old avatar will be deleted!');
+define('_PROFILE_MA_CHOOSEAVT', 'Choose avatar from the available list');
+
+define('_PROFILE_MA_PRESSLOGIN', 'Press the button below to login');
+
+define('_PROFILE_MA_ADMINNO', 'User in the webmasters group cannot be removed');
+define('_PROFILE_MA_GROUPS', 'User\'s Groups');
+
+define('_PROFILE_MA_NOPERMISS','Sorry, you dont have the permission to perform this action!');
+define('_PROFILE_MA_SURETODEL','Are you sure you want to delete your account?');
+define('_PROFILE_MA_REMOVEINFO','This will remove all your info from our database.');
+define('_PROFILE_MA_BEENDELED','Your account has been deleted.');
+
+//changepass.php
+define("_PROFILE_MA_CHANGEPASSWORD", "Change Password");
+define("_PROFILE_MA_PASSWORDCHANGED", "Password Changed Successfully");
+define("_PROFILE_MA_OLDPASSWORD", "Current Password");
+define("_PROFILE_MA_NEWPASSWORD", "New Password");
+
+//search.php
+define("_PROFILE_MA_SORTBY", "Sort By");
+define("_PROFILE_MA_ORDER", "Order");
+define("_PROFILE_MA_PERPAGE", "Users per page");
+define("_PROFILE_MA_LATERTHAN", "%s is later than");
+define("_PROFILE_MA_EARLIERTHAN", "%s is earlier than");
+define("_PROFILE_MA_LARGERTHAN", "%s is larger than");
+define("_PROFILE_MA_SMALLERTHAN", "%s is smaller than");
+
+define("_PROFILE_MA_NOUSERSFOUND", "No users found");
+define("_PROFILE_MA_RESULTS", "Search Results");
+
+//changemail.php
+define("_PROFILE_MA_CHANGEMAIL", "Change Email");
+define("_PROFILE_MA_NEWMAIL", "New Email Address");
+
+define("_PROFILE_MA_NEWEMAILREQ", "New Email Address Request");
+define("_PROFILE_MA_NEWMAILMSGSENT", "An email with an activation link has been sent to the specified email address. Responding to the link will complete the email change procedure");
+define("_PROFILE_MA_EMAILCHANGED", "Your Email Address Has Been Changed");
+
+define("_PROFILE_MA_CONFCODEMISSING", "Confirmation Code Missing");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/main.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/modinfo.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/modinfo.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/modinfo.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,103 @@
+<?php
+// $Id$
+define("_PROFILE_MI_NAME", "Extended Profiles");
+define("_PROFILE_MI_DESC", "Module for managing custom user profile fields");
+
+//Main menu links
+define("_PROFILE_MI_EDITACCOUNT", "Edit Account");
+define("_PROFILE_MI_CHANGEPASS", "Change Password");
+define("_PROFILE_MI_CHANGEMAIL", "Change Email");
+
+//Admin links
+define("_PROFILE_MI_INDEX", "Index");
+define("_PROFILE_MI_CATEGORIES", "Categories");
+define("_PROFILE_MI_FIELDS", "Fields");
+define("_PROFILE_MI_USERS", "Users");
+define("_PROFILE_MI_PERMISSIONS", "Permissions");
+
+//User Profile Category
+define("_PROFILE_MI_CATEGORY_TITLE", "User Profile");
+define("_PROFILE_MI_CATEGORY_DESC", "For those user fields");
+
+//User Profile Fields
+define("_PROFILE_MI_AIM_TITLE", "AIM");
+define("_PROFILE_MI_AIM_DESCRIPTION", "America Online Instant Messenger Client ID");
+define("_PROFILE_MI_ICQ_TITLE", "ICQ");
+define("_PROFILE_MI_ICQ_DESCRIPTION", "ICQ Instant Messenger ID");
+define("_PROFILE_MI_YIM_TITLE", "YIM");
+define("_PROFILE_MI_YIM_DESCRIPTION", "Yahoo! Instant Messenger ID");
+define("_PROFILE_MI_MSN_TITLE", "MSN");
+define("_PROFILE_MI_MSN_DESCRIPTION", "Microsoft Messenger ID");
+define("_PROFILE_MI_FROM_TITLE", "Location");
+define("_PROFILE_MI_FROM_DESCRIPTION", "");
+define("_PROFILE_MI_SIG_TITLE", "Signature");
+define("_PROFILE_MI_SIG_DESCRIPTION", "Here, you can write a signature that can be displayed in your forum posts, comments etc.");
+define("_PROFILE_MI_VIEWEMAIL_TITLE", "Allow other users to view my email address");
+define("_PROFILE_MI_BIO_TITLE", "Extra Info");
+define("_PROFILE_MI_BIO_DESCRIPTION", "");
+define("_PROFILE_MI_INTEREST_TITLE", "Interests");
+define("_PROFILE_MI_INTEREST_DESCRIPTION", "");
+define("_PROFILE_MI_OCCUPATION_TITLE", "Occupation");
+define("_PROFILE_MI_OCCUPATION_DESCRIPTION", "");
+define("_PROFILE_MI_URL_TITLE", "Website");
+define("_PROFILE_MI_URL_DESCRIPTION", "");
+define("_PROFILE_MI_NEWEMAIL_TITLE", "New Email");
+define("_PROFILE_MI_NEWEMAIL_DESCRIPTION", "Variable for storing a proposed new email address until confirmation comes from a mail sent to the old one. See modules/profile/changemail.php");
+
+//Configuration categories
+define("_PROFILE_MI_CAT_SETTINGS", "General Settings");
+define("_PROFILE_MI_CAT_SETTINGS_DSC", "");
+define("_PROFILE_MI_CAT_USER", "User Settings");
+define("_PROFILE_MI_CAT_USER_DSC", "");
+
+//Configuration items
+define("_PROFILE_MI_PROFILE_SEARCH", "Show latest submissals by user on user profile");
+define("_PROFILE_MI_MAX_UNAME", "Maximum Username Length");
+define("_PROFILE_MI_MAX_UNAME_DESC", "This indicates the maximum number of characters, a username may have");
+define("_PROFILE_MI_MIN_UNAME", "Minimum Username Length");
+define("_PROFILE_MI_MIN_UNAME_DESC", "This indicates the minimum number of characters, a username must have");
+define("_PROFILE_MI_DISPLAY_DISCLAIMER", "Display Disclaimer");
+define("_PROFILE_MI_DISPLAY_DISCLAIMER_DESC", "If enabled, a disclaimer will be shown on the registration form");
+define("_PROFILE_MI_DISCLAIMER", "Disclaimer Text");
+define("_PROFILE_MI_DISCLAIMER_DESC", "This text will be shown on the registration form, if enabled above");
+define("_PROFILE_MI_BAD_UNAMES", "Enter names that should not be selected as username or displayname");
+define("_PROFILE_MI_BAD_UNAMES_DESC", "Separate each with a <b>|</b>, case insensitive, regex enabled.");
+define("_PROFILE_MI_BAD_EMAILS", "Enter emails that should not be selected");
+define("_PROFILE_MI_BAD_EMAILS_DESC", "Separate each with a <b>|</b>, case insensitive, regex enabled.");
+define("_PROFILE_MI_MINPASS", "Minimum password length");
+define("_PROFILE_MI_NEWUNOTIFY", "Notify by mail when a new user is registered?");
+define("_PROFILE_MI_NOTIFYTO", "Select group to which new user notification mail will be sent");
+define("_PROFILE_MI_ACTVTYPE", "Select activation type of newly registered users");
+define("_PROFILE_MI_USERACTV","Requires activation by user (recommended)");
+define("_PROFILE_MI_AUTOACTV","Activate automatically");
+define("_PROFILE_MI_ADMINACTV","Activation by administrators");
+define("_PROFILE_MI_ACTVGROUP", "Select group to which activation mail will be sent");
+define("_PROFILE_MI_ACTVGROUP_DESC", "Valid only when 'Activation by administrators' is selected");
+define("_PROFILE_MI_UNAMELVL","Select the level of strictness for username filtering");
+define("_PROFILE_MI_STRICT","Strict (only alphabets and numbers)");
+define("_PROFILE_MI_MEDIUM","Medium");
+define("_PROFILE_MI_LIGHT","Light (recommended for multi-byte chars)");
+define("_PROFILE_MI_ALLOWREG", "Allow new user registration?");
+define("_PROFILE_MI_ALLOWREG_DESC", "Select yes to accept new user registration");
+define("_PROFILE_MI_AVATARALLOW", "Allow custom avatar upload?");
+define("_PROFILE_MI_AVATARALLOW_DESC", "");
+define("_PROFILE_MI_AVATARWIDTH", "Avatar image max width (pixel)");
+define("_PROFILE_MI_AVATARWIDTH_DESC", "");
+define("_PROFILE_MI_AVATARHEIGHT", "Avatar image max height (pixel)");
+define("_PROFILE_MI_AVATARHEIGHT_DESC", "");
+define("_PROFILE_MI_AVATARMAX", "Avatar image max filesize (bytes)");
+define("_PROFILE_MI_AVATARMAX_DESC", "");
+define("_PROFILE_MI_SELFDELETE", "Allow users to delete own account?");
+define("_PROFILE_MI_SELFDELETE_DESC", "");
+define("_PROFILE_MI_AVATARMINPOSTS", "Minimum posts required");
+define("_PROFILE_MI_AVATARMINPOSTS_DESC", "Enter the minimum number of posts required to upload a custom avatar");
+define("_PROFILE_MI_ALLOWCHGMAIL", "Allow users to change email address?");
+define("_PROFILE_MI_ALLOWCHGMAIL_DESC", "");
+define("_PROFILE_MI_ALLOWVIEWACC", "Allow to view account");
+define("_PROFILE_MI_ALLOWVIEWACC_DESC", "Individual fields can be set visible or invisible to users in fields administration,<br />but if you want to allow access to other users' accounts for certain groups only,<br /> while still allowing anonymous users to register,<br /> select the groups here");
+
+//Pages
+define("_PROFILE_MI_PAGE_INFO", "User Info");
+define("_PROFILE_MI_PAGE_EDIT", "Edit User");
+define("_PROFILE_MI_PAGE_SEARCH", "Search");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/english/modinfo.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/language/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/register.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/register.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/register.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,229 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+include '../../mainfile.php';
+include_once 'include/functions.php';
+$myts =& MyTextSanitizer::getInstance();
+
+
+if (empty($xoopsModuleConfig['allow_register'])) {
+ redirect_header('../../index.php', 6, _PROFILE_MA_NOREGISTER);
+ exit();
+}
+include XOOPS_ROOT_PATH.'/header.php';
+
+$member_handler =& xoops_gethandler('member');
+$newuser =& $member_handler->createUser();
+$op = !isset($_POST['op']) ? 'register' : $_POST['op'];
+if ($op != "register") {
+ $newuser->setVar('uname', isset($_POST['uname']) ? trim($_POST['uname']) : '');
+ $newuser->setVar('loginname', isset($_POST['loginname']) ? trim($_POST['loginname']) : '');
+ $newuser->setVar('email', isset($_POST['email']) ? trim($_POST['email']) : '');
+
+ //Dynamic fields
+ $profile_handler =& xoops_gethandler('profile');
+ // Get fields
+ $fields =& $profile_handler->loadFields();
+ if (count($fields) > 0) {
+ foreach (array_keys($fields) as $i) {
+ $fieldname = $fields[$i]->getVar('field_name');
+ if ($fields[$i]->getVar('field_register') && isset($_POST[$fieldname])) {
+ $newuser->setVar($fieldname, $_POST[$fieldname]);
+ }
+ }
+ }
+
+ $vpass = isset($_POST['vpass']) ? $myts->stripSlashesGPC($_POST['vpass']) : '';
+ $agree_disc = (isset($_POST['agree_disc']) && intval($_POST['agree_disc'])) ? 1 : 0;
+}
+switch ( $op ) {
+ case 'newuser':
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ echo implode('<br />', $GLOBALS['xoopsSecurity']->getErrors());
+ break;
+ }
+ $newuser->setVar('pass', isset($_POST['pass']) ? md5(trim($_POST['pass'])) : '');
+ $stop = '';
+ if ($xoopsModuleConfig['display_disclaimer'] != 0 && $xoopsModuleConfig['disclaimer'] != '') {
+ if (empty($agree_disc)) {
+ $stop .= _PROFILE_MA_UNEEDAGREE.'<br />';
+ }
+ }
+ if (!empty($xoopsModuleConfig['minpass']) && strlen(trim($_POST['pass'])) < $xoopsModuleConfig['minpass']) {
+ $stop .= sprintf(_PROFILE_MA_PWDTOOSHORT,$xoopsModuleConfig['minpass'])."<br />";
+ }
+ $stop .= userCheck($newuser);
+ if (empty($stop)) {
+ echo _PROFILE_MA_USERNAME.": ".$newuser->getVar('loginname')."<br />";
+ echo _PROFILE_MA_EMAIL.": ".$newuser->getVar('email')."<br />";
+ echo _PROFILE_MA_DISPLAYNAME.": ".$newuser->getVar('uname')."<br />";
+ $profile_handler =& xoops_gethandler('profile');
+ // Get fields
+ $fields =& $profile_handler->loadFields();
+ if (count($fields) > 0) {
+ foreach (array_keys($fields) as $i) {
+ $fieldname = $fields[$i]->getVar('field_name');
+ if ($fields[$i]->getVar('field_register') && isset($_POST[$fieldname])) {
+ $value = $newuser->getVar($fieldname);
+ if (is_array($value)) {
+ $values = array();
+ $options = $fields[$i]->getVar('field_options');
+ foreach ($value as $thisvalue) {
+ $values = $options[$thisvalue];
+ }
+ $value = implode(', ', $values);
+ }
+ echo $fields[$i]->getVar('field_title').": ".$value."<br />";
+ }
+ }
+ }
+ //hidden POST form with variables
+ include_once 'include/forms.php';
+ $finish_form =& getFinishForm($newuser, $vpass);
+ $finish_form->display();
+ } else {
+ echo "<div class='errorMsg'>$stop</div><br clear='both'>";
+ include_once 'include/forms.php';
+ $reg_form =& getRegisterForm($newuser);
+ $reg_form->display();
+ }
+ break;
+
+ case 'finish':
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ echo implode('<br />', $GLOBALS['xoopsSecurity']->getErrors());
+ break;
+ }
+
+ $stop = '';
+ if ($xoopsModuleConfig['display_disclaimer'] != 0 && $xoopsModuleConfig['disclaimer'] != '') {
+ if (empty($agree_disc)) {
+ $stop .= _PROFILE_MA_UNEEDAGREE.'<br />';
+ }
+ }
+ $stop = userCheck($newuser);
+ if ( empty($stop) ) {
+ $newuser->setVar('pass', $_POST['pass']);
+ $newuser->setVar('user_avatar','blank.gif');
+ $actkey = substr(md5(uniqid(mt_rand(), 1)), 0, 8);
+ $newuser->setVar('actkey', $actkey);
+ $newuser->setVar('user_regdate', time());
+ if ($xoopsModuleConfig['activation_type'] == 1) {
+ $newuser->setVar('level', 1);
+ }
+
+ $profile_handler =& xoops_gethandler('profile');
+ // Get fields
+ $fields =& $profile_handler->loadFields();
+ if (count($fields) > 0) {
+ foreach (array_keys($fields) as $i) {
+ $fieldname = $fields[$i]->getVar('field_name');
+ if ($fields[$i]->getVar('field_register') && isset($_POST[$fieldname])) {
+ $newuser->setVar($fieldname, $_POST[$fieldname]);
+ }
+ }
+ }
+ if (!$member_handler->insertUser($newuser)) {
+ echo _PROFILE_MA_REGISTERNG;
+ echo implode('<br />', $newuser->getErrors());
+ break;
+ }
+ $newid = $newuser->getVar('uid');
+ if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newid)) {
+ echo _PROFILE_MA_REGISTERNG;
+ break;
+ }
+ if ($xoopsModuleConfig['activation_type'] == 1) {
+ redirect_header(XOOPS_URL.'/index.php', 4, _PROFILE_MA_ACTLOGIN);
+ }
+ if ($xoopsModuleConfig['activation_type'] == 0) {
+ $xoopsMailer =& getMailer();
+ $xoopsMailer->useMail();
+ $xoopsMailer->setTemplate('register.tpl');
+ $xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH."/modules/profile/language/".$xoopsConfig['language']."/mail_template");
+ $xoopsMailer->assign('SITENAME', $xoopsConfig['sitename']);
+ $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
+ $xoopsMailer->assign('SITEURL', XOOPS_URL."/");
+ $xoopsMailer->setToUsers(new XoopsUser($newid));
+ $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
+ $xoopsMailer->setFromName($xoopsConfig['sitename']);
+ $xoopsMailer->setSubject(sprintf(_PROFILE_MA_USERKEYFOR, $newuser->getVar('uname')));
+ if ( !$xoopsMailer->send() ) {
+ echo _PROFILE_MA_YOURREGMAILNG;
+ } else {
+ echo _PROFILE_MA_YOURREGISTERED;
+ }
+ } elseif ($xoopsModuleConfig['activation_type'] == 2) {
+ $xoopsMailer =& getMailer();
+ $xoopsMailer->useMail();
+ $xoopsMailer->setTemplate('adminactivate.tpl');
+ $xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH."/modules/profile/language/".$xoopsConfig['language']."/mail_template");
+ $xoopsMailer->assign('USERNAME', $newuser->getVar('uname'));
+ $xoopsMailer->assign('USEREMAIL', $newuser->getVar('email'));
+ $xoopsMailer->assign('USERACTLINK', XOOPS_URL.'/modules/profile/activate.php?op=actv&id='.$newid.'&actkey='.$actkey);
+ $xoopsMailer->assign('SITENAME', $xoopsConfig['sitename']);
+ $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
+ $xoopsMailer->assign('SITEURL', XOOPS_URL."/");
+ $member_handler =& xoops_gethandler('member');
+ $xoopsMailer->setToGroups($member_handler->getGroup($xoopsModuleConfig['activation_group']));
+ $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
+ $xoopsMailer->setFromName($xoopsConfig['sitename']);
+ $xoopsMailer->setSubject(sprintf(_PROFILE_MA_USERKEYFOR, $newuser->getVar('uname')));
+ if ( !$xoopsMailer->send() ) {
+ echo _PROFILE_MA_YOURREGMAILNG;
+ } else {
+ echo _PROFILE_MA_YOURREGISTERED2;
+ }
+ }
+ if ($xoopsModuleConfig['new_user_notify'] == 1 && !empty($xoopsModuleConfig['new_user_notify_group'])) {
+ $xoopsMailer =& getMailer();
+ $xoopsMailer->useMail();
+ $member_handler =& xoops_gethandler('member');
+ $xoopsMailer->setToGroups($member_handler->getGroup($xoopsModuleConfig['new_user_notify_group']));
+ $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
+ $xoopsMailer->setFromName($xoopsConfig['sitename']);
+ $xoopsMailer->setSubject(sprintf(_PROFILE_MA_NEWUSERREGAT,$xoopsConfig['sitename']));
+ $xoopsMailer->setBody(sprintf(_PROFILE_MA_HASJUSTREG, $newuser->getVar('uname')));
+ $xoopsMailer->send();
+ }
+ } else {
+ echo "<div class='errorMsg'>$stop</div><br clear='both'>";
+ include_once 'include/forms.php';
+ $reg_form =& getRegisterForm($newuser);
+ $reg_form->display();
+ }
+ break;
+
+ case 'register':
+ default:
+ include_once 'include/forms.php';
+ $reg_form =& getRegisterForm($newuser);
+ $reg_form->display();
+
+ break;
+}
+include XOOPS_ROOT_PATH.'/footer.php';
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/register.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/search.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/search.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/search.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,412 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include '../../mainfile.php';
+$myts =& MyTextSanitizer::getInstance();
+$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : "search";
+$groups = $xoopsUser ? $xoopsUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS);
+switch ($op) {
+ default:
+ case "search":
+ $xoopsOption['cache_group'] = implode('', $groups);
+ $xoopsOption['template_main'] = "profile_search.html";
+ include XOOPS_ROOT_PATH."/header.php";
+
+ // Dynamic fields
+ $profile_handler =& xoops_gethandler('profile');
+ // Get fields
+ $fields =& $profile_handler->loadFields();
+ // Get ids of fields that can be searched
+ $gperm_handler =& xoops_gethandler('groupperm');
+ $searchable_fields =& $gperm_handler->getItemIds('profile_search', $groups, $xoopsModule->getVar('mid'));
+
+ include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+ $searchform = new XoopsThemeForm("", "searchform", "search.php", "post");
+
+ $name_tray = new XoopsFormElementTray(_PROFILE_MA_DISPLAYNAME);
+ $name_tray->addElement(new XoopsFormSelectMatchOption('', 'uname_match'));
+ $name_tray->addElement(new XoopsFormText('', 'uname', 35, 255));
+ $searchform->addElement($name_tray);
+ $sortby_arr['uname'] = _PROFILE_MA_DISPLAYNAME;
+
+ $realname_tray = new XoopsFormElementTray(_PROFILE_MA_REALNAME);
+ $realname_tray->addElement(new XoopsFormSelectMatchOption('', 'name_match'));
+ $realname_tray->addElement(new XoopsFormText('', 'name', 35, 255));
+ $searchform->addElement($realname_tray);
+ $sortby_arr['name'] = _PROFILE_MA_REALNAME;
+
+ $email_tray = new XoopsFormElementTray(_PROFILE_MA_EMAIL);
+ $email_tray->addElement(new XoopsFormSelectMatchOption('', 'email_match'));
+ $email_tray->addElement(new XoopsFormText('', 'email', 35, 255));
+ $searchform->addElement($email_tray);
+ $sortby_arr['email'] = _PROFILE_MA_EMAIL;
+
+ $searchable_types = array('textbox',
+ 'select',
+ 'radio',
+ 'yesno',
+ 'date',
+ 'datetime',
+ 'timezone',
+ 'language');
+ foreach (array_keys($fields) as $i) {
+ if (in_array($fields[$i]->getVar('fieldid'), $searchable_fields) && in_array($fields[$i]->getVar('field_type'), $searchable_types)) {
+ $sortby_arr[$fields[$i]->getVar('fieldid')] = $fields[$i]->getVar('field_title');
+ switch ($fields[$i]->getVar('field_type')) {
+ case "textbox":
+ if ($fields[$i]->getVar('field_valuetype') == XOBJ_DTYPE_INT) {
+ $searchform->addElement(new XoopsFormText(sprintf(_PROFILE_MA_LARGERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name')."_larger", 35, 35));
+ $searchform->addElement(new XoopsFormText(sprintf(_PROFILE_MA_SMALLERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name')."_smaller", 35, 35));
+ }
+ else {
+ $tray = new XoopsFormElementTray($fields[$i]->getVar('field_title'));
+ $tray->addElement(new XoopsFormSelectMatchOption('', $fields[$i]->getVar('field_name')."_match"));
+ $tray->addElement(new XoopsFormText('', $fields[$i]->getVar('field_name'), 35, $fields[$i]->getVar('field_maxlength')));
+ $searchform->addElement($tray);
+ unset($tray);
+ }
+ break;
+
+ case "radio":
+ case "select":
+ $size = count($fields[$i]->getVar('field_options')) > 10 ? 10 : count($fields[$i]->getVar('field_options'));
+ $element = new XoopsFormSelect($fields[$i]->getVar('field_title'), $fields[$i]->getVar('field_name'), null, $size, true);
+ $options = $fields[$i]->getVar('field_options');
+ asort($options);
+ $element->addOptionArray($options);
+ $searchform->addElement($element);
+ unset($element);
+ break;
+
+ case "yesno":
+ $element = new XoopsFormSelect($fields[$i]->getVar('field_title'), $fields[$i]->getVar('field_name'), null, 2, true);
+ $element->addOption(1, _YES);
+ $element->addOption(0, _NO);
+ $searchform->addElement($element);
+ unset($element);
+ break;
+
+ case "date":
+ $searchform->addElement(new XoopsFormTextDateSelect(sprintf(_PROFILE_MA_LATERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name')."_larger"));
+ $searchform->addElement(new XoopsFormTextDateSelect(sprintf(_PROFILE_MA_EARLIERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name')."_smaller"));
+ break;
+
+ case "datetime":
+ $searchform->addElement(new XoopsFormDateTime(sprintf(_PROFILE_MA_LATERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name')."_larger"));
+ $searchform->addElement(new XoopsFormDateTime(sprintf(_PROFILE_MA_EARLIERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name')."_smaller"));
+ break;
+
+ case "timezone":
+ $element = new XoopsFormSelectTimezone($fields[$i]->getVar('field_title'), $fields[$i]->getVar('field_name'), null, 6);
+ $searchform->addElement($element);
+ unset($element);
+ break;
+
+ case "language":
+ $element = new XoopsFormSelectLang($fields[$i]->getVar('field_title'), $fields[$i]->getVar('field_name'), null, 6);
+ $searchform->addElement($element);
+ unset($element);
+ break;
+ }
+ }
+ }
+ asort($sortby_arr);
+ $sortby_select = new XoopsFormSelect(_PROFILE_MA_SORTBY, 'sortby');
+ $sortby_select->addOptionArray($sortby_arr);
+ $searchform->addElement($sortby_select);
+
+ $order_select = new XoopsFormRadio(_PROFILE_MA_ORDER, 'order', 0);
+ $order_select->addOption(0, _ASCENDING);
+ $order_select->addOption(1, _DESCENDING);
+ $searchform->addElement($order_select);
+
+ $limit_text = new XoopsFormText(_PROFILE_MA_PERPAGE, 'limit', 15, 10);
+ $searchform->addElement($limit_text);
+ $searchform->addElement(new XoopsFormHidden('op', 'results'));
+
+ $searchform->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
+
+ $searchform->assign($xoopsTpl);
+ break;
+
+ case "results":
+ $xoopsOption['template_main'] = "profile_results.html";
+ include_once XOOPS_ROOT_PATH."/header.php";
+
+ $member_handler =& xoops_gethandler('member');
+ // Dynamic fields
+ $profile_handler =& xoops_gethandler('profile');
+ // Get fields
+ $fields =& $profile_handler->loadFields();
+ // Get ids of fields that can be searched
+ $gperm_handler =& xoops_gethandler('groupperm');
+ $searchable_fields =& $gperm_handler->getItemIds('profile_search', $groups, $xoopsModule->getVar('mid'));
+ $searchvars = array();
+
+ $criteria = new CriteriaCompo(new Criteria('level', 0, ">"));
+ if (isset($_REQUEST['uname']) && $_REQUEST['uname'] != "") {
+ $string = $myts->addSlashes(trim($_REQUEST['uname']));
+ switch ($_REQUEST['uname_match']) {
+ case XOOPS_MATCH_START:
+ $string .= "%";
+ break;
+
+ case XOOPS_MATCH_END:
+ $string = "%".$string;
+ break;
+
+ case XOOPS_MATCH_CONTAIN:
+ $string = "%".$string."%";
+ break;
+ }
+ $criteria->add(new Criteria('u.uname', $string, "LIKE"));
+ $searchvars[] = "uname";
+ }
+ if (isset($_REQUEST['name']) && $_REQUEST['name'] != "") {
+ $string = $myts->addSlashes(trim($_REQUEST['name']));
+ switch ($_REQUEST['name_match']) {
+ case XOOPS_MATCH_START:
+ $string .= "%";
+ break;
+
+ case XOOPS_MATCH_END:
+ $string = "%".$string;
+ break;
+
+ case XOOPS_MATCH_CONTAIN:
+ $string = "%".$string."%";
+ break;
+ }
+ $criteria->add(new Criteria('u.name', $string, "LIKE"));
+ $searchvars[] = "name";
+ }
+ if (isset($_REQUEST['email']) && $_REQUEST['email'] != "") {
+ $string = $myts->addSlashes(trim($_REQUEST['email']));
+ switch ($_REQUEST['email_match']) {
+ case XOOPS_MATCH_START:
+ $string .= "%";
+ break;
+
+ case XOOPS_MATCH_END:
+ $string = "%".$string;
+ break;
+
+ case XOOPS_MATCH_CONTAIN:
+ $string = "%".$string."%";
+ break;
+ }
+ $searchvars[] = "email";
+ $criteria->add(new Criteria('u.email', $string, "LIKE"));
+ $criteria->add(new Criteria('p.user_viewemail', 1));
+ }
+ $searchable_types = array('textbox',
+ 'select',
+ 'radio',
+ 'yesno',
+ 'date',
+ 'datetime',
+ 'timezone',
+ 'language');
+
+ foreach (array_keys($fields) as $i) {
+ if (in_array($fields[$i]->getVar('fieldid'), $searchable_fields) && in_array($fields[$i]->getVar('field_type'), $searchable_types)) {
+ $fieldname = $fields[$i]->getVar('field_name');
+
+ if (in_array($fields[$i]->getVar('field_type'), array("select", "radio"))) {
+ if (isset($_REQUEST[$fieldname]) && $_REQUEST[$fieldname]) {
+ //If field value is sent through request and is not an empty value
+ switch ($fields[$i]->getVar('field_valuetype')) {
+ case XOBJ_DTYPE_OTHER:
+ case XOBJ_DTYPE_INT:
+ $value = array_map('intval', $_REQUEST[$fieldname]);
+ $searchvars[] = $fieldname;
+ $criteria->add(new Criteria($fieldname, "(".implode(',', $value).")", "IN"));
+ break;
+
+ case XOBJ_DTYPE_URL:
+ case XOBJ_DTYPE_TXTBOX:
+ case XOBJ_DTYPE_TXTAREA:
+ $value = array_map(array($xoopsDB, "quoteString"), $_REQUEST[$fieldname]);
+ $searchvars[] = $fieldname;
+ $criteria->add(new Criteria($fieldname, "(".implode(',', $value).")", "IN"));
+ break;
+ }
+ }
+ }
+ else {
+ switch ($fields[$i]->getVar('field_valuetype')) {
+ case XOBJ_DTYPE_OTHER:
+ case XOBJ_DTYPE_INT:
+
+ if (isset($_REQUEST[$fieldname."_larger"]) && trim($_REQUEST[$fieldname."_larger"]) != "" && $_REQUEST[$fieldname."_larger"] != "YYYY/MM/DD") {
+ if ($fields[$i]->getVar('field_type') == "date" || $fields[$i]->getVar('field_type') == "date") {
+ if (intval($_REQUEST[$fieldname."_smaller"]) < 0) { //intval() of a date string is -1
+ $value = strtotime($_REQUEST[$fieldname."_larger"]);
+ }
+ else {
+ $value = intval($_REQUEST[$fieldname."_larger"]);
+ }
+ }
+ else {
+ $value = intval($_REQUEST[$fieldname."_larger"]);
+ }
+ $search_url[] = $fieldname."_larger=".$value;
+ $searchvars[] = $fieldname;
+ $criteria->add(new Criteria($fieldname, $value, ">="));
+ }
+ if (isset($_REQUEST[$fieldname."_smaller"]) && trim($_REQUEST[$fieldname."_smaller"]) != "" && $_REQUEST[$fieldname."_smaller"] != "YYYY/MM/DD") {
+ if ($fields[$i]->getVar('field_type') == "date" || $fields[$i]->getVar('field_type') == "date") {
+ if (intval($_REQUEST[$fieldname."_smaller"]) < 0) { //intval() of a date string is -1
+ $value = strtotime($_REQUEST[$fieldname."_smaller"]);
+ }
+ else {
+ $value = intval($_REQUEST[$fieldname."_smaller"]);
+ }
+ }
+ else {
+ $value = intval($_REQUEST[$fieldname."_smaller"]);
+ }
+ $search_url[] = $fieldname."_smaller=".$value;
+ $searchvars[] = $fieldname;
+ $criteria->add(new Criteria($fieldname, $value, "<="));
+ }
+ if (isset($_REQUEST[$fieldname]) && !isset($_REQUEST[$fieldname."_smaller"]) && !isset($_REQUEST[$fieldname."_larger"])) {
+ if (!is_array($_REQUEST[$fieldname])) {
+ $value = intval($_REQUEST[$fieldname]);
+ $search_url[] = $fieldname."=".$value;
+ $criteria->add(new Criteria($fieldname, $value, "="));
+ }
+ else {
+ $value = array_map("intval", $_REQUEST[$fieldname]);
+ foreach ($value as $thisvalue) {
+ $search_url[] = $fieldname."[]=".$thisvalue;
+ }
+ $criteria->add(new Criteria($fieldname, "(".implode(',', $value).")", "IN"));
+ }
+
+ $searchvars[] = $fieldname;
+ }
+ break;
+
+ case XOBJ_DTYPE_URL:
+ case XOBJ_DTYPE_TXTBOX:
+ case XOBJ_DTYPE_TXTAREA:
+ if (isset($_REQUEST[$fieldname]) && $_REQUEST[$fieldname] != "") {
+ $value = $myts->addSlashes(trim($_REQUEST[$fieldname]));
+ switch ($_REQUEST[$fieldname.'_match']) {
+ case XOOPS_MATCH_START:
+ $value .= "%";
+ break;
+
+ case XOOPS_MATCH_END:
+ $value = "%".$value;
+ break;
+
+ case XOOPS_MATCH_CONTAIN:
+ $value = "%".$value."%";
+ break;
+ }
+ $search_url[] = $fieldname."=".$value;
+ $operator = "LIKE";
+ $criteria->add(new Criteria($fieldname, $value, $operator));
+ $searchvars[] = $fieldname;
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ if ($searchvars == array()) {
+ break;
+ }
+
+ if ($_REQUEST['sortby'] == "name") {
+ $criteria->setSort("name");
+ }
+ elseif ($_REQUEST['sortby'] == "email") {
+ $criteria->setSort("email");
+ }
+ elseif ($_REQUEST['sortby'] == "uname") {
+ $criteria->setSort("uname");
+ }
+ elseif (isset($fields[$_REQUEST['sortby']])) {
+ $criteria->setSort($fields[$_REQUEST['sortby']]->getVar('field_name'));
+ }
+ $order = $_REQUEST['order'] == 0 ? "ASC" : "DESC";
+ $criteria->setOrder($order);
+
+ $limit = isset($_REQUEST['limit']) && intval($_REQUEST['limit']) > 0 ? intval($_REQUEST['limit']) : 20;
+ $criteria->setLimit($limit);
+
+ $start = isset($_REQUEST['start']) ? intval($_REQUEST['start']) : 0;
+ $criteria->setStart($start);
+
+ //Get users based on criteria
+ $users =& $member_handler->getUsers($criteria, true);
+ $total_users = $member_handler->getUserCount($criteria);
+
+ //Sort information
+ foreach (array_keys($users) as $k) {
+ $userarray["output"][] = "<a href='userinfo.php?uid=".$users[$k]->getVar('uid')."'>".$users[$k]->getVar('uname')."</a>";
+ $userarray["output"][] = $users[$k]->getVar('user_viewemail') == 1 ? $users[$k]->getVar('email') : "";
+
+ foreach (array_keys($fields) as $i) {
+ if (in_array($fields[$i]->getVar('fieldid'), $searchable_fields) && in_array($fields[$i]->getVar('field_type'), $searchable_types) && in_array($fields[$i]->getVar('field_name'), $searchvars)) {
+ $userarray["output"][] = $fields[$i]->getOutputValue($users[$k]);
+ }
+ }
+ $xoopsTpl->append('users', $userarray);
+ unset($userarray);
+ }
+
+ //Get captions
+ $captions[] = _PROFILE_MA_DISPLAYNAME;
+ $captions[] = _PROFILE_MA_EMAIL;
+ foreach (array_keys($fields) as $i) {
+ if (in_array($fields[$i]->getVar('fieldid'), $searchable_fields) && in_array($fields[$i]->getVar('field_type'), $searchable_types) && in_array($fields[$i]->getVar('field_name'), $searchvars)) {
+ $captions[] = $fields[$i]->getVar('field_title');
+ }
+ }
+ $xoopsTpl->assign('captions', $captions);
+
+ if ($total_users > $limit) {
+ $search_url[] = "op=results";
+ $search_url[] = "order=".$order;
+ $search_url[] = "sortby=".$_REQUEST['sortby'];
+ $search_url[] = "limit=".$limit;
+ if (isset($search_url)) {
+ $args = implode("&", $search_url);
+ }
+ include_once XOOPS_ROOT_PATH."/class/pagenav.php";
+ $nav = new XoopsPageNav($total_users, $limit, $start, "start", $args);
+ $xoopsTpl->assign('nav', $nav->renderNav(5));
+ }
+ break;
+}
+include XOOPS_ROOT_PATH."/footer.php";
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/search.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/sql/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/sql/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/sql/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/sql/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/sql/mysql.sql
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/sql/mysql.sql 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/sql/mysql.sql 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,14 @@
+CREATE TABLE `profile_category` (
+ `catid` int(12) unsigned NOT NULL auto_increment,
+ `cat_title` varchar(255) NOT NULL default '',
+ `cat_description` text NOT NULL,
+ `cat_weight` tinyint(4) unsigned NOT NULL default '0',
+ PRIMARY KEY (`catid`)
+) TYPE=MyISAM;
+
+CREATE TABLE `profile_fieldcategory` (
+ `fieldid` int(12) unsigned NOT NULL,
+ `catid` int(12) unsigned NOT NULL,
+ `field_weight` tinyint(6) unsigned NOT NULL default '0',
+ PRIMARY KEY (`fieldid`)
+) TYPE=MyISAM;
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/sql/mysql.sql
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_admin_categorylist.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_admin_categorylist.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_admin_categorylist.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,18 @@
+<div><a href="category.php?op=new"><{$smarty.const._ADD}> <{$smarty.const._PROFILE_AM_CATEGORY}></a></div>
+<table>
+ <th><{$smarty.const._PROFILE_AM_TITLE}></th>
+ <th><{$smarty.const._PROFILE_AM_DESCRIPTION}></th>
+ <th><{$smarty.const._PROFILE_AM_WEIGHT}></th>
+ <th></th>
+ <{foreach item=category from=$categories}>
+ <tr class="<{cycle values='odd, even'}>">
+ <td><{$category.cat_title}></td>
+ <td><{$category.cat_description}></td>
+ <td><{$category.cat_weight}></td>
+ <td>
+ <a href="category.php?id=<{$category.catid}>" title="<{$smarty.const._EDIT}>"><{$smarty.const._EDIT}></a>
+ <a href="category.php?op=delete&id=<{$category.catid}>" title="<{$smarty.const._DELETE}>"><{$smarty.const._DELETE}></a>
+ </td>
+ </tr>
+ <{/foreach}>
+</table>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_admin_categorylist.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_admin_fieldlist.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_admin_fieldlist.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_admin_fieldlist.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,56 @@
+<div><a href="field.php?op=new"><{$smarty.const._ADD}> <{$smarty.const._PROFILE_AM_FIELD}></a></div>
+<form action="field.php" method="post" id="fieldform">
+ <table>
+ <th><{$smarty.const._PROFILE_AM_NAME}></th>
+ <th><{$smarty.const._PROFILE_AM_TITLE}></th>
+ <th><{$smarty.const._PROFILE_AM_DESCRIPTION}></th>
+ <th><{$smarty.const._PROFILE_AM_MODULE}></th>
+ <th><{$smarty.const._PROFILE_AM_TYPE}></th>
+ <th><{$smarty.const._PROFILE_AM_CATEGORY}></th>
+ <th><{$smarty.const._PROFILE_AM_WEIGHT}></th>
+ <th></th>
+ <{foreach item=category from=$fieldcategories}>
+ <{foreach item=field from=$category}>
+ <tr class="<{cycle values='odd, even'}>">
+ <td><{$field.field_name}></td>
+ <td><{$field.field_title}></td>
+ <td><{$field.field_description}></td>
+ <td><{$field.module}></td>
+ <td><{$field.fieldtype}></td>
+ <td>
+ <{if $field.canEdit}>
+ <select name="category[<{$field.fieldid}>]"><{html_options options=$categories selected=$field.catid}></select>
+ <{/if}>
+ </td>
+ <td>
+ <{if $field.canEdit}>
+ <input type="text" name="weight[<{$field.fieldid}>]" size="5" maxlength="5" value="<{$field.field_weight}>" />
+ <{/if}>
+ </td>
+ <td>
+ <{if $field.canEdit}>
+ <input type="hidden" name="oldweight[<{$field.fieldid}>]" value="<{$field.field_weight}>" />
+ <input type="hidden" name="oldcat[<{$field.fieldid}>]" value="<{$field.catid}>" />
+ <input type="hidden" name="fieldids[]" value="<{$field.fieldid}>" />
+ <a href="field.php?id=<{$field.fieldid}>" title="<{$smarty.const._EDIT}>"><{$smarty.const._EDIT}></a>
+ <{/if}>
+ <{if $field.canDelete}>
+ <a href="field.php?op=delete&id=<{$field.fieldid}>" title="<{$smarty.const._DELETE}>"><{$smarty.const._DELETE}></a>
+ <{/if}>
+ </td>
+ </tr>
+ <{/foreach}>
+ <{/foreach}>
+ <tr class="<{cycle values='odd, even'}>">
+ <td colspan="6">
+ </td>
+ <td>
+ <{$token}>
+ <input type="hidden" name="op" value="reorder" />
+ <input type="submit" name="submit" value="<{$smarty.const._SUBMIT}>" />
+ </td>
+ <td colspan="2">
+ </td>
+ </tr>
+ </table>
+</form>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_admin_fieldlist.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_results.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_results.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_results.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,26 @@
+<div>
+ <a href="<{$xoops_url}>/modules/profile/search.php" title="<{$smarty.const._BACK}>"><{$smarty.const._SEARCH}></a> >> <{$smarty.const._PROFILE_MA_RESULTS}>
+</div>
+<br />
+<{if $users}>
+ <table>
+ <tr>
+ <{foreach item=caption from=$captions}>
+ <th><{$caption}></th>
+ <{/foreach}>
+ </tr>
+ <{foreach item=user from=$users}>
+ <tr class="<{cycle values='odd, even'}>">
+ <{foreach item=fieldvalue from=$user.output}>
+ <td><{$fieldvalue}></td>
+ <{/foreach}>
+ </tr>
+ <{/foreach}>
+ </table>
+
+ <{$nav}>
+<{else}>
+ <div class="errorMsg">
+ <{$smarty.const._PROFILE_MA_NOUSERSFOUND}>
+ </div>
+<{/if}>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_results.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_search.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_search.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_search.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,19 @@
+<form name="<{$searchform.name}>" id="<{$searchform.name}>" action="<{$searchform.action}>" method="<{$searchform.method}>" <{$searchform.extra}> >
+ <table>
+ <!-- start of visible form elements loop -->
+ <{foreach item=element from=$searchform.elements}>
+ <{if $element.hidden != true}>
+ <tr valign="top">
+ <td class="head"><{$element.caption}></td>
+ <td class="odd" style="white-space: nowrap;"><{$element.body}></td>
+ </tr>
+ <{/if}>
+ <{/foreach}>
+ <!-- end of visible form elements loop -->
+ </table>
+ <{foreach item=element from=$searchform.elements}>
+ <{if $element.hidden == true}>
+ <{$element.body}>
+ <{/if}>
+ <{/foreach}>
+</form>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_search.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_userinfo.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_userinfo.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_userinfo.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,76 @@
+<{if $user_ownpage == true}>
+
+ <form name="usernav" action="user.php" method="post">
+
+ <br /><br />
+
+ <table width="70%" align="center" border="0">
+ <tr align="center">
+ <td><input type="button" value="<{$lang_editprofile}>" onclick="location='edituser.php'" />
+ <input type="button" value="<{$lang_changepassword}>" onclick="location='changepass.php'" />
+ <input type="button" value="<{$lang_avatar}>" onclick="location='edituser.php?op=avatarform'" />
+
+ <{if $user_candelete == true}>
+ <input type="button" value="<{$lang_deleteaccount}>" onclick="location='edituser.php?op=delete'" />
+ <{/if}>
+
+ <input type="button" value="<{$lang_logout}>" onclick="location='<{$xoops_url}>/user.php?op=logout'" /></td>
+ </tr>
+ </table>
+ </form>
+
+<br /><br />
+<{elseif $xoops_isadmin != false}>
+
+ <br /><br />
+
+ <table width="70%" align="center" border="0">
+ <tr align="center">
+ <td><input type="button" value="<{$lang_editprofile}>" onclick="location='<{$xoops_url}>/modules/profile/admin/user.php?op=edit&id=<{$user_uid}>'" />
+ <input type="button" value="<{$lang_deleteaccount}>" onclick="location='<{$xoops_url}>/modules/profile/admin/user.php?op=delete&id=<{$user_uid}>'" />
+ </tr>
+ </table>
+
+ <br /><br />
+<{/if}>
+
+<{foreach item=category from=$categories name=catcount}>
+ <{if isset($category.fields)}>
+ <div style="width: 48%; float: left; padding: 0px 5px 10px 5px;">
+ <table class="outer" cellpadding="4" cellspacing="1">
+ <tr>
+ <th colspan="2" align="center"><{$category.cat_title}></th>
+ </tr>
+ <{foreach item=field from=$category.fields}>
+ <tr>
+ <td class="head"><{$field.title}></td>
+ <td class="even"><{$field.value}></td>
+ </tr>
+ <{/foreach}>
+ </table>
+ </div>
+ <{/if}>
+<{/foreach}>
+
+<{if $modules}>
+ <br style="clear: both;"/>
+ <!-- start module search results loop -->
+ <{foreach item=module from=$modules}>
+
+ <p>
+ <h4><{$module.name}></h4>
+
+ <!-- start results item loop -->
+ <{foreach item=result from=$module.results}>
+
+ <img src="<{$result.image}>" alt="<{$module.name}>" /> <b><a href="<{$result.link}>"><{$result.title}></a></b><br /><small>(<{$result.time}>)</small><br />
+
+ <{/foreach}>
+ <!-- end results item loop -->
+
+ <{$module.showall_link}>
+ </p>
+
+ <{/foreach}>
+ <!-- end module search results loop -->
+<{/if}>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/templates/profile_userinfo.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/userinfo.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/userinfo.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/userinfo.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,205 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include '../../mainfile.php';
+
+include_once XOOPS_ROOT_PATH . '/modules/system/constants.php';
+
+$uid = intval($_GET['uid']);
+if ($uid <= 0) {
+ header('location: '.XOOPS_URL);
+ exit();
+}
+
+$gperm_handler = & xoops_gethandler( 'groupperm' );
+$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS);
+
+if (is_object($xoopsUser) && $uid == $xoopsUser->getVar('uid')) {
+ //disable cache
+ $xoopsConfig['module_cache'][$xoopsModule->getVar('mid')] = 0;
+ $xoopsOption['template_main'] = 'profile_userinfo.html';
+ include XOOPS_ROOT_PATH.'/header.php';
+
+ $xoopsTpl->assign('user_ownpage', true);
+ $xoopsTpl->assign('lang_editprofile', _PROFILE_MA_EDITPROFILE);
+ $xoopsTpl->assign('lang_changepassword', _PROFILE_MA_CHANGEPASSWORD);
+ $xoopsTpl->assign('lang_avatar', _PROFILE_MA_AVATAR);
+ $xoopsTpl->assign('lang_logout', _PROFILE_MA_LOGOUT);
+ if ($xoopsModuleConfig['self_delete'] == 1) {
+ $xoopsTpl->assign('user_candelete', true);
+ $xoopsTpl->assign('lang_deleteaccount', _PROFILE_MA_DELACCOUNT);
+ } else {
+ $xoopsTpl->assign('user_candelete', false);
+ }
+ $thisUser =& $xoopsUser;
+} else {
+ //Check user groups against groups allowed access
+ if (count(array_intersect($groups, $xoopsModuleConfig['allowed_groups'])) == 0) {
+ redirect_header(XOOPS_URL, 2, _NOPERM);
+ }
+
+ $member_handler =& xoops_gethandler('member');
+ $thisUser =& $member_handler->getUser($uid);
+ if (!is_object($thisUser) || !$thisUser->isActive()) {
+ redirect_header("index.php",3,_PROFILE_MA_SELECTNG);
+ exit();
+ }
+ $xoopsTpl->assign('user_ownpage', false);
+ $xoopsOption['template_main'] = 'profile_userinfo.html';
+ include(XOOPS_ROOT_PATH.'/header.php');
+}
+
+if ( is_object($xoopsUser) && $xoopsUser->isAdmin() ) {
+ $xoopsTpl->assign('lang_editprofile', _PROFILE_MA_EDITPROFILE);
+ $xoopsTpl->assign('lang_deleteaccount', _PROFILE_MA_DELACCOUNT);
+ $xoopsTpl->assign('user_uid', $thisUser->getVar('uid'));
+}
+
+// Dynamic User Profiles
+$thisUsergroups =& $thisUser->getGroups();
+$groupperm_handler =& xoops_gethandler('groupperm');
+$show_ids =& $groupperm_handler->getItemIds('profile_show', $thisUsergroups, $xoopsModule->getVar('mid'));
+if (!is_object($xoopsUser) || !$xoopsUser->isAdmin()) {
+ $visible_ids =& $groupperm_handler->getItemIds('profile_visible', $groups, $xoopsModule->getVar('mid'));
+ $fieldids = array_intersect($show_ids, $visible_ids);
+}
+else {
+ $fieldids =& $show_ids;
+}
+$profile_handler =& xoops_gethandler('profile');
+$fields =& $profile_handler->loadFields();
+$cat_handler =& xoops_getmodulehandler('category');
+$cat_crit = new CriteriaCompo();
+$cat_crit->setSort("cat_weight");
+$cats =& $cat_handler->getObjects($cat_crit, true, false);
+unset($cat_crit);
+$fieldcat_handler =& xoops_getmodulehandler('fieldcategory');
+$fieldcats =& $fieldcat_handler->getObjects(null, true, false);
+
+// Add core fields
+$categories[0]['cat_title'] = sprintf(_PROFILE_MA_ALLABOUT, $thisUser->getVar('uname'));
+if($thisUser->getVar('name')){
+ $categories[0]['fields'][] = array('title' => _PROFILE_MA_REALNAME, 'value' => $thisUser->getVar('name'));
+ $weights[0][] = 0;
+}
+if($thisUser->getVar('user_avatar') && "blank.gif" != $thisUser->getVar('user_avatar')){
+ $categories[0]['fields'][] = array('title' => _PROFILE_MA_AVATAR, 'value' => "<img src='".XOOPS_UPLOAD_URL."/".$thisUser->getVar('user_avatar')."' alt='".$thisUser->getVar('uname')."' />");
+ $weights[0][] = 0;
+}
+$userrank =& $thisUser->rank();
+$user_rankimage = "";
+if (isset($userrank['image']) && $userrank['image'] != "") {
+ $user_rankimage = '<img src="'.XOOPS_UPLOAD_URL.'/'.$userrank['image'].'" alt="'.$userrank['title'].'" /><br />';
+}
+$categories[0]['fields'][] = array('title' => _PROFILE_MA_RANK, 'value' => $user_rankimage.$userrank['title']);
+$weights[0][] = 0;
+if ($thisUser->getVar('user_viewemail') == 1) {
+ $email = $thisUser->getVar('email', 'E');
+} else {
+ $email = "";
+ if (is_object($xoopsUser)) {
+ // All admins will be allowed to see emails, even those that are not allowed to edit users (I think it's ok like this)
+ if ($xoopsUserIsAdmin || ($xoopsUser->getVar("uid") == $thisUser->getVar("uid"))) {
+ $email = $thisUser->getVar('email', 'E');
+ }
+ }
+}
+if ($email != "") {
+ $categories[0]['fields'][] = array('title' => _PROFILE_MA_EMAIL, 'value' => $email);
+ $weights[0][] = 0;
+}
+foreach (array_keys($cats) as $i) {
+ $categories[$i] = $cats[$i];
+}
+// Add dynamic fields
+foreach (array_keys($fields) as $i) {
+ //If field should be shown
+ if (in_array($fields[$i]->getVar('fieldid'), $fieldids)) {
+ $catid = isset($fieldcats[$fields[$i]->getVar('fieldid')]) ? $fieldcats[$fields[$i]->getVar('fieldid')]['catid'] : 0;
+ $value = $fields[$i]->getOutputValue($thisUser);
+ if (is_array($value)) {
+ $value = implode('<br />', array_values($value));
+ }
+ if($value){
+ $categories[$catid]['fields'][] = array('title' => $fields[$i]->getVar('field_title'), 'value' => $value);
+ $weights[$catid][] = isset($fieldcats[$fields[$i]->getVar('fieldid')]) ? intval($fieldcats[$fields[$i]->getVar('fieldid')]['field_weight']) : 1;
+ }
+ }
+}
+
+//sort fields order in categories
+foreach (array_keys($categories) as $i) {
+ if (isset($categories[$i]['fields'])) {
+ array_multisort($weights[$i], SORT_ASC, array_keys($categories[$i]['fields']), SORT_ASC, $categories[$i]['fields']);
+ }
+}
+
+//ksort($categories);
+$xoopsTpl->assign('categories', $categories);
+// Dynamic user profiles end
+
+if ($xoopsModuleConfig['profile_search']) {
+ $module_handler =& xoops_gethandler('module');
+ $criteria = new CriteriaCompo(new Criteria('hassearch', 1));
+ $criteria->add(new Criteria('isactive', 1));
+ $modules =& $module_handler->getObjects($criteria, true);
+ $mids =& array_keys($modules);
+
+ $myts =& MyTextSanitizer::getInstance();
+ $allowed_mids = $gperm_handler->getItemIds('module_read', $groups);
+ if (count($mids) > 0 && count($allowed_mids) > 0) {
+ foreach ($mids as $mid) {
+ if ( in_array($mid, $allowed_mids)) {
+ $results =& $modules[$mid]->search('', '', 5, 0, $thisUser->getVar('uid'));
+ $count = count($results);
+ if (is_array($results) && $count > 0) {
+ for ($i = 0; $i < $count; $i++) {
+ if (isset($results[$i]['image']) && $results[$i]['image'] != '') {
+ $results[$i]['image'] = XOOPS_URL.'/modules/'.$modules[$mid]->getVar('dirname').'/'.$results[$i]['image'];
+ } else {
+ $results[$i]['image'] = XOOPS_URL.'/images/icons/posticon2.gif';
+ }
+ if (!preg_match("/^http[s]*:\/\//i", $results[$i]['link'])) {
+ $results[$i]['link'] = XOOPS_URL."/modules/".$modules[$mid]->getVar('dirname')."/".$results[$i]['link'];
+ }
+ $results[$i]['title'] = $myts->makeTboxData4Show($results[$i]['title']);
+ $results[$i]['time'] = $results[$i]['time'] ? formatTimestamp($results[$i]['time']) : '';
+ }
+ if ($count == 5) {
+ $showall_link = '<a href="'.XOOPS_URL.'/search.php?action=showallbyuser&mid='.$mid.'&uid='.$thisUser->getVar('uid').'">'._PROFILE_MA_SHOWALL.'</a>';
+ } else {
+ $showall_link = '';
+ }
+ $xoopsTpl->append('modules', array('name' => $modules[$mid]->getVar('name'), 'results' => $results, 'showall_link' => $showall_link));
+ }
+ unset($modules[$mid]);
+ }
+ }
+ }
+}
+include XOOPS_ROOT_PATH.'/footer.php';
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/userinfo.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/xoops_version.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/xoops_version.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/xoops_version.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,452 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$modversion['name'] = _PROFILE_MI_NAME;
+$modversion['version'] = 0.1;
+$modversion['description'] = _PROFILE_MI_DESC;
+$modversion['author'] = "Jan Pedersen";
+$modversion['credits'] = "The XOOPS Project, Ackbarr";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 1;
+$modversion['image'] = "images/profile_logo.jpg";
+$modversion['dirname'] = "profile";
+
+// Admin things
+$modversion['hasAdmin'] = 1;
+$modversion['adminindex'] = "admin/admin.php";
+$modversion['adminmenu'] = "admin/menu.php";
+
+// Menu
+$modversion['hasMain'] = 1;
+global $xoopsUser;
+if ($xoopsUser) {
+ $modversion['sub'][1]['name'] = _PROFILE_MI_EDITACCOUNT;
+ $modversion['sub'][1]['url'] = "edituser.php";
+ $modversion['sub'][2]['name'] = _PROFILE_MI_PAGE_SEARCH;
+ $modversion['sub'][2]['url'] = "search.php";
+ $modversion['sub'][3]['name'] = _PROFILE_MI_CHANGEPASS;
+ $modversion['sub'][3]['url'] = "changepass.php";
+ if (isset($GLOBALS['xoopsModuleConfig']) && isset($GLOBALS['xoopsModuleConfig']['allow_chgmail']) && $GLOBALS['xoopsModuleConfig']['allow_chgmail'] == 1) {
+ $modversion['sub'][4]['name'] = _PROFILE_MI_CHANGEMAIL;
+ $modversion['sub'][4]['url'] = "changemail.php";
+ }
+}
+
+// Page Awareness
+$modversion['pages'][1]['name'] = _PROFILE_MI_PAGE_INFO;
+$modversion['pages'][1]['url'] = "userinfo.php";
+$modversion['pages'][2]['name'] = _PROFILE_MI_PAGE_EDIT;
+$modversion['pages'][2]['url'] = "edituser.php";
+$modversion['pages'][3]['name'] = _PROFILE_MI_PAGE_SEARCH;
+$modversion['pages'][3]['url'] = "search.php";
+
+$modversion['sqlfile']['mysql'] = "sql/mysql.sql";
+
+// Tables created by sql file (without prefix!)
+$modversion['tables'][1] = "profile_category";
+$modversion['tables'][2] = "profile_fieldcategory";
+
+//update things
+//$modversion['onUpdate'] = 'include/update.php';
+
+// Config categories
+$modversion['configcat'][1]['nameid'] = 'settings';
+$modversion['configcat'][1]['name'] = '_PROFILE_MI_CAT_SETTINGS';
+$modversion['configcat'][1]['description'] = '_PROFILE_MI_CAT_SETTINGS_DSC';
+
+$modversion['configcat'][2]['nameid'] = 'user';
+$modversion['configcat'][2]['name'] = '_PROFILE_MI_CAT_USER';
+$modversion['configcat'][2]['description'] = '_PROFILE_MI_CAT_USER_DSC';
+
+// Config items
+$modversion['config'][1]['name'] = 'profile_search';
+$modversion['config'][1]['title'] = '_PROFILE_MI_PROFILE_SEARCH';
+$modversion['config'][1]['description'] = '_PROFILE_MI_PROFILE_SEARCH_DSC';
+$modversion['config'][1]['formtype'] = 'yesno';
+$modversion['config'][1]['valuetype'] = 'int';
+$modversion['config'][1]['default'] = 1;
+$modversion['config'][1]['category'] = 'settings';
+
+$modversion['config'][2]['name'] = 'max_uname';
+$modversion['config'][2]['title'] = '_PROFILE_MI_MAX_UNAME';
+$modversion['config'][2]['description'] = '_PROFILE_MI_MAX_UNAME_DESC';
+$modversion['config'][2]['formtype'] = 'textbox';
+$modversion['config'][2]['valuetype'] = 'int';
+$modversion['config'][2]['default'] = 20;
+$modversion['config'][2]['category'] = 'user';
+
+$modversion['config'][3]['name'] = 'min_uname';
+$modversion['config'][3]['title'] = '_PROFILE_MI_MIN_UNAME';
+$modversion['config'][3]['description'] = '_PROFILE_MI_MIN_UNAME_DESC';
+$modversion['config'][3]['formtype'] = 'textbox';
+$modversion['config'][3]['valuetype'] = 'int';
+$modversion['config'][3]['default'] = 3;
+$modversion['config'][3]['category'] = 'user';
+
+$modversion['config'][4]['name'] = 'display_disclaimer';
+$modversion['config'][4]['title'] = '_PROFILE_MI_DISPLAY_DISCLAIMER';
+$modversion['config'][4]['description'] = '_PROFILE_MI_DISPLAY_DISCLAIMER_DESC';
+$modversion['config'][4]['formtype'] = 'yesno';
+$modversion['config'][4]['valuetype'] = 'int';
+$modversion['config'][4]['default'] = 0;
+$modversion['config'][4]['category'] = 'settings';
+
+$modversion['config'][5]['name'] = 'disclaimer';
+$modversion['config'][5]['title'] = '_PROFILE_MI_DISCLAIMER';
+$modversion['config'][5]['description'] = '_PROFILE_MI_DISCLAIMER_DESC';
+$modversion['config'][5]['formtype'] = 'textarea';
+$modversion['config'][5]['valuetype'] = 'text';
+$modversion['config'][5]['default'] = "";
+$modversion['config'][5]['category'] = 'settings';
+
+$modversion['config'][6]['name'] = 'bad_unames';
+$modversion['config'][6]['title'] = '_PROFILE_MI_BAD_UNAMES';
+$modversion['config'][6]['description'] = '_PROFILE_MI_BAD_UNAMES_DESC';
+$modversion['config'][6]['formtype'] = 'textarea';
+$modversion['config'][6]['valuetype'] = 'array';
+$modversion['config'][6]['default'] = "webmaster|^xoops|^admin";
+$modversion['config'][6]['category'] = 'user';
+
+$modversion['config'][7]['name'] = 'bad_emails';
+$modversion['config'][7]['title'] = '_PROFILE_MI_BAD_EMAILS';
+$modversion['config'][7]['description'] = '_PROFILE_MI_BAD_EMAILS_DESC';
+$modversion['config'][7]['formtype'] = 'textarea';
+$modversion['config'][7]['valuetype'] = 'array';
+$modversion['config'][7]['default'] = "xoops.org$";
+$modversion['config'][7]['category'] = 'user';
+
+$modversion['config'][8]['name'] = 'minpass';
+$modversion['config'][8]['title'] = '_PROFILE_MI_MINPASS';
+$modversion['config'][8]['description'] = '_PROFILE_MI_MINPASS_DESC';
+$modversion['config'][8]['formtype'] = 'textbox';
+$modversion['config'][8]['valuetype'] = 'int';
+$modversion['config'][8]['default'] = 3;
+$modversion['config'][8]['category'] = 'user';
+
+$modversion['config'][9]['name'] = 'new_user_notify';
+$modversion['config'][9]['title'] = '_PROFILE_MI_NEWUNOTIFY';
+$modversion['config'][9]['description'] = '_PROFILE_MI_NEWUNOTIFY_DESC';
+$modversion['config'][9]['formtype'] = 'yesno';
+$modversion['config'][9]['valuetype'] = 'int';
+$modversion['config'][9]['default'] = 1;
+$modversion['config'][9]['category'] = 'settings';
+
+$modversion['config'][10]['name'] = 'new_user_notify_group';
+$modversion['config'][10]['title'] = '_PROFILE_MI_NOTIFYTO';
+$modversion['config'][10]['description'] = '_PROFILE_MI_NOTIFYTO_DESC';
+$modversion['config'][10]['formtype'] = 'group';
+$modversion['config'][10]['valuetype'] = 'int';
+$modversion['config'][10]['default'] = 1;
+$modversion['config'][10]['category'] = 'settings';
+
+$modversion['config'][11]['name'] = 'activation_type';
+$modversion['config'][11]['title'] = '_PROFILE_MI_ACTVTYPE';
+$modversion['config'][11]['description'] = '_PROFILE_MI_ACTVTYPE_DESC';
+$modversion['config'][11]['formtype'] = 'select';
+$modversion['config'][11]['valuetype'] = 'int';
+$modversion['config'][11]['default'] = 0;
+$modversion['config'][11]['options'] = array('_PROFILE_MI_USERACTV' => 0, '_PROFILE_MI_AUTOACTV' => 1, '_PROFILE_MI_ADMINACTV' => 2);$modversion['config'][11]['category'] = 'settings';
+
+$modversion['config'][12]['name'] = 'activation_group';
+$modversion['config'][12]['title'] = '_PROFILE_MI_ACTVGROUP';
+$modversion['config'][12]['description'] = '_PROFILE_MI_ACTVGROUP_DESC';
+$modversion['config'][12]['formtype'] = 'group';
+$modversion['config'][12]['valuetype'] = 'int';
+$modversion['config'][12]['default'] = 1;
+$modversion['config'][12]['category'] = 'settings';
+
+$modversion['config'][13]['name'] = 'uname_test_level';
+$modversion['config'][13]['title'] = '_PROFILE_MI_UNAMELVL';
+$modversion['config'][13]['description'] = '_PROFILE_MI_UNAMELVL_DESC';
+$modversion['config'][13]['formtype'] = 'select';
+$modversion['config'][13]['valuetype'] = 'int';
+$modversion['config'][13]['default'] = 0;
+$modversion['config'][13]['options'] = array('_PROFILE_MI_STRICT' => 0, '_PROFILE_MI_MEDIUM' => 1, '_PROFILE_MI_LIGHT' => 2);
+$modversion['config'][13]['category'] = 'user';
+
+$modversion['config'][14]['name'] = 'allow_register';
+$modversion['config'][14]['title'] = '_PROFILE_MI_ALLOWREG';
+$modversion['config'][14]['description'] = '_PROFILE_MI_ALLOWREG_DESC';
+$modversion['config'][14]['formtype'] = 'yesno';
+$modversion['config'][14]['valuetype'] = 'int';
+$modversion['config'][14]['default'] = 1;
+$modversion['config'][14]['category'] = 'settings';
+
+$modversion['config'][15]['name'] = 'avatar_allow_upload';
+$modversion['config'][15]['title'] = '_PROFILE_MI_AVATARALLOW';
+$modversion['config'][15]['description'] = '_PROFILE_MI_AVATARALLOW_DESC';
+$modversion['config'][15]['formtype'] = 'yesno';
+$modversion['config'][15]['valuetype'] = 'int';
+$modversion['config'][15]['default'] = 0;
+$modversion['config'][15]['category'] = 'user';
+
+$modversion['config'][16]['name'] = 'avatar_width';
+$modversion['config'][16]['title'] = '_PROFILE_MI_AVATARWIDTH';
+$modversion['config'][16]['description'] = '_PROFILE_MI_AVATARWIDTH_DESC';
+$modversion['config'][16]['formtype'] = 'textbox';
+$modversion['config'][16]['valuetype'] = 'int';
+$modversion['config'][16]['default'] = 80;
+$modversion['config'][16]['category'] = 'user';
+
+$modversion['config'][17]['name'] = 'avatar_height';
+$modversion['config'][17]['title'] = '_PROFILE_MI_AVATARHEIGHT';
+$modversion['config'][17]['description'] = '_PROFILE_MI_AVATARHEIGHT_DESC';
+$modversion['config'][17]['formtype'] = 'textbox';
+$modversion['config'][17]['valuetype'] = 'int';
+$modversion['config'][17]['default'] = 80;
+$modversion['config'][17]['category'] = 'user';
+
+$modversion['config'][18]['name'] = 'avatar_maxsize';
+$modversion['config'][18]['title'] = '_PROFILE_MI_AVATARMAX';
+$modversion['config'][18]['description'] = '_PROFILE_MI_AVATARMAX_DESC';
+$modversion['config'][18]['formtype'] = 'textbox';
+$modversion['config'][18]['valuetype'] = 'int';
+$modversion['config'][18]['default'] = 35000;
+$modversion['config'][18]['category'] = 'user';
+
+$modversion['config'][19]['name'] = 'self_delete';
+$modversion['config'][19]['title'] = '_PROFILE_MI_SELFDELETE';
+$modversion['config'][19]['description'] = '_PROFILE_MI_SELFDELETE_DESC';
+$modversion['config'][19]['formtype'] = 'yesno';
+$modversion['config'][19]['valuetype'] = 'int';
+$modversion['config'][19]['default'] = 0;
+$modversion['config'][19]['category'] = 'settings';
+
+$modversion['config'][20]['name'] = 'avatar_minposts';
+$modversion['config'][20]['title'] = '_PROFILE_MI_AVATARMINPOSTS';
+$modversion['config'][20]['description'] = '_PROFILE_MI_AVATARMINPOSTS_DESC';
+$modversion['config'][20]['formtype'] = 'textbox';
+$modversion['config'][20]['valuetype'] = 'int';
+$modversion['config'][20]['default'] = 0;
+$modversion['config'][20]['category'] = 'user';
+
+$modversion['config'][21]['name'] = 'allow_chgmail';
+$modversion['config'][21]['title'] = '_PROFILE_MI_ALLOWCHGMAIL';
+$modversion['config'][21]['description'] = '_PROFILE_MI_ALLOWCHGMAIL_DESC';
+$modversion['config'][21]['formtype'] = 'yesno';
+$modversion['config'][21]['valuetype'] = 'int';
+$modversion['config'][21]['default'] = 0;
+$modversion['config'][21]['category'] = 'settings';
+
+$modversion['config'][22]['name'] = 'allowed_groups';
+$modversion['config'][22]['title'] = '_PROFILE_MI_ALLOWVIEWACC';
+$modversion['config'][22]['description'] = '_PROFILE_MI_ALLOWVIEWACC_DESC';
+$modversion['config'][22]['formtype'] = 'group_multi';
+$modversion['config'][22]['valuetype'] = 'array';
+$modversion['config'][22]['default'] = array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS);
+$modversion['config'][22]['category'] = 'settings';
+
+// Templates
+$modversion['templates'][1]['file'] = 'profile_admin_fieldlist.html';
+$modversion['templates'][1]['description'] = '';
+$modversion['templates'][2]['file'] = 'profile_userinfo.html';
+$modversion['templates'][2]['description'] = '';
+$modversion['templates'][3]['file'] = 'profile_admin_categorylist.html';
+$modversion['templates'][3]['description'] = '';
+$modversion['templates'][4]['file'] = 'profile_search.html';
+$modversion['templates'][4]['description'] = '';
+$modversion['templates'][5]['file'] = 'profile_results.html';
+$modversion['templates'][5]['description'] = '';
+
+// User Profile
+$modversion['hasProfile'] = 1;
+
+//$modversion['hasProfile'] = 1;
+//$modversion['profile']['field'][1]['name'] = 'profile_aim';
+// field name - can be referenced with $xoopsUser->getVar('user_aim')
+//$modversion['profile']['field'][1]['type'] = 'textbox';
+//type of form element for editing
+//$modversion['profile']['field'][1]['valuetype'] = XOBJ_DTYPE_TXTBOX;
+//type of field - use XoopsObject valuetypes found in kernel/object.php
+
+//$modversion['profile']['field'][1]['maxlength'] = 255;
+// maxlength of the field - Note: Mandatory when dealing with XOBJ_DTYPE_TXTBOX fields
+//$modversion['profile']['field'][1]['default'] = '';
+// Default value
+//
+//$modversion['profile']['field'][1]['show'] = 1;
+// can this field be shown in user profiles (still subject to group permissions)
+//$modversion['profile']['field'][1]['title'] = _PROFILE_AIM_TITLE;
+// Name of field, when displayed - such as in user profile or editing
+//
+//$modversion['profile']['field'][1]['edit'] = 1;
+//can this field be edited in user profile editing (still subject to group permissions)
+//$modversion['profile']['field'][1]['description'] = _PROFILE_AIM_DESCRIPTION;
+//description - such as when editing the profile, this will show up
+//$modversion['profile']['field'][1]['required'] = 0;
+// is field required when editing?
+//
+//$modversion['profile']['field'][1]['config'] = 1;
+// can this field be configured? Don't use this if you rely on this field's information in your module code as configuration can alter the field completely - or DELETE it - if this is enabled
+//$modversion['profile']['field'][1]['options'] = array();
+$modversion['profile']['field'][1]['name'] = 'user_aim';
+$modversion['profile']['field'][1]['type'] = 'textbox';
+$modversion['profile']['field'][1]['valuetype'] = XOBJ_DTYPE_TXTBOX;
+$modversion['profile']['field'][1]['maxlength'] = 255;
+$modversion['profile']['field'][1]['default'] = '';
+$modversion['profile']['field'][1]['show'] = 1;
+$modversion['profile']['field'][1]['title'] = _PROFILE_MI_AIM_TITLE;
+$modversion['profile']['field'][1]['edit'] = 1;
+$modversion['profile']['field'][1]['description'] = _PROFILE_MI_AIM_DESCRIPTION;
+$modversion['profile']['field'][1]['required'] = 0;
+$modversion['profile']['field'][1]['config'] = 1;
+$modversion['profile']['field'][1]['options'] = array();
+
+$modversion['profile']['field'][2]['name'] = 'user_icq';
+$modversion['profile']['field'][2]['type'] = 'textbox';
+$modversion['profile']['field'][2]['valuetype'] = XOBJ_DTYPE_TXTBOX;
+$modversion['profile']['field'][2]['maxlength'] = 255;
+$modversion['profile']['field'][2]['default'] = '';
+$modversion['profile']['field'][2]['show'] = 1;
+$modversion['profile']['field'][2]['title'] = _PROFILE_MI_ICQ_TITLE;
+$modversion['profile']['field'][2]['edit'] = 1;
+$modversion['profile']['field'][2]['description'] = _PROFILE_MI_ICQ_DESCRIPTION;
+$modversion['profile']['field'][2]['required'] = 0;
+$modversion['profile']['field'][2]['config'] = 1;
+
+$modversion['profile']['field'][3]['name'] = 'user_from';
+$modversion['profile']['field'][3]['type'] = 'textbox';
+$modversion['profile']['field'][3]['valuetype'] = XOBJ_DTYPE_TXTBOX;
+$modversion['profile']['field'][3]['maxlength'] = 255;
+$modversion['profile']['field'][3]['default'] = '';
+$modversion['profile']['field'][3]['show'] = 1;
+$modversion['profile']['field'][3]['title'] = _PROFILE_MI_FROM_TITLE;
+$modversion['profile']['field'][3]['edit'] = 1;
+$modversion['profile']['field'][3]['description'] = _PROFILE_MI_FROM_DESCRIPTION;
+$modversion['profile']['field'][3]['required'] = 0;
+$modversion['profile']['field'][3]['config'] = 1;
+
+$modversion['profile']['field'][4]['name'] = 'user_sig';
+$modversion['profile']['field'][4]['title'] = _PROFILE_MI_SIG_TITLE;
+$modversion['profile']['field'][4]['description'] = _PROFILE_MI_SIG_DESCRIPTION;
+$modversion['profile']['field'][4]['type'] = 'dhtml';
+$modversion['profile']['field'][4]['valuetype'] = XOBJ_DTYPE_TXTAREA;
+$modversion['profile']['field'][4]['default'] = '';
+$modversion['profile']['field'][4]['show'] = 1;
+$modversion['profile']['field'][4]['edit'] = 1;
+$modversion['profile']['field'][4]['required'] = 0;
+$modversion['profile']['field'][4]['config'] = 1;
+
+$modversion['profile']['field'][5]['name'] = 'user_viewemail';
+$modversion['profile']['field'][5]['title'] = _PROFILE_MI_VIEWEMAIL_TITLE;
+$modversion['profile']['field'][5]['description'] = "";
+$modversion['profile']['field'][5]['type'] = 'yesno';
+$modversion['profile']['field'][5]['valuetype'] = XOBJ_DTYPE_INT;
+$modversion['profile']['field'][5]['maxlength'] = 1;
+$modversion['profile']['field'][5]['default'] = 0;
+$modversion['profile']['field'][5]['show'] = 0;
+$modversion['profile']['field'][5]['edit'] = 1;
+$modversion['profile']['field'][5]['required'] = 0;
+$modversion['profile']['field'][5]['config'] = 0;
+
+$modversion['profile']['field'][6]['name'] = 'user_yim';
+$modversion['profile']['field'][6]['title'] = _PROFILE_MI_YIM_TITLE;
+$modversion['profile']['field'][6]['description'] = _PROFILE_MI_YIM_DESCRIPTION;
+$modversion['profile']['field'][6]['type'] = 'textbox';
+$modversion['profile']['field'][6]['valuetype'] = XOBJ_DTYPE_TXTBOX;
+$modversion['profile']['field'][6]['maxlength'] = 255;
+$modversion['profile']['field'][6]['default'] = "";
+$modversion['profile']['field'][6]['show'] = 1;
+$modversion['profile']['field'][6]['edit'] = 1;
+$modversion['profile']['field'][6]['required'] = 0;
+$modversion['profile']['field'][6]['config'] = 1;
+
+$modversion['profile']['field'][7]['name'] = 'user_msnm';
+$modversion['profile']['field'][7]['title'] = _PROFILE_MI_MSN_TITLE;
+$modversion['profile']['field'][7]['description'] = _PROFILE_MI_MSN_DESCRIPTION;
+$modversion['profile']['field'][7]['type'] = 'textbox';
+$modversion['profile']['field'][7]['valuetype'] = XOBJ_DTYPE_TXTBOX;
+$modversion['profile']['field'][7]['maxlength'] = 255;
+$modversion['profile']['field'][7]['default'] = "";
+$modversion['profile']['field'][7]['show'] = 1;
+$modversion['profile']['field'][7]['edit'] = 1;
+$modversion['profile']['field'][7]['required'] = 0;
+$modversion['profile']['field'][7]['config'] = 1;
+
+$modversion['profile']['field'][8]['name'] = 'bio';
+$modversion['profile']['field'][8]['title'] = _PROFILE_MI_BIO_TITLE;
+$modversion['profile']['field'][8]['description'] = _PROFILE_MI_BIO_DESCRIPTION;
+$modversion['profile']['field'][8]['type'] = 'textarea';
+$modversion['profile']['field'][8]['valuetype'] = XOBJ_DTYPE_TXTAREA;
+$modversion['profile']['field'][8]['default'] = '';
+$modversion['profile']['field'][8]['show'] = 1;
+$modversion['profile']['field'][8]['edit'] = 1;
+$modversion['profile']['field'][8]['required'] = 0;
+$modversion['profile']['field'][8]['config'] = 1;
+
+$modversion['profile']['field'][9]['name'] = 'user_intrest';
+$modversion['profile']['field'][9]['title'] = _PROFILE_MI_INTEREST_TITLE;
+$modversion['profile']['field'][9]['description'] = _PROFILE_MI_INTEREST_DESCRIPTION;
+$modversion['profile']['field'][9]['type'] = 'textbox';
+$modversion['profile']['field'][9]['valuetype'] = XOBJ_DTYPE_TXTBOX;
+$modversion['profile']['field'][9]['maxlength'] = 150;
+$modversion['profile']['field'][9]['default'] = "";
+$modversion['profile']['field'][9]['show'] = 1;
+$modversion['profile']['field'][9]['edit'] = 1;
+$modversion['profile']['field'][9]['required'] = 0;
+$modversion['profile']['field'][9]['config'] = 1;
+
+$modversion['profile']['field'][10]['name'] = 'user_occ';
+$modversion['profile']['field'][10]['title'] = _PROFILE_MI_OCCUPATION_TITLE;
+$modversion['profile']['field'][10]['description'] = _PROFILE_MI_OCCUPATION_DESCRIPTION;
+$modversion['profile']['field'][10]['type'] = 'textbox';
+$modversion['profile']['field'][10]['valuetype'] = XOBJ_DTYPE_TXTBOX;
+$modversion['profile']['field'][10]['maxlength'] = 100;
+$modversion['profile']['field'][10]['default'] = "";
+$modversion['profile']['field'][10]['show'] = 1;
+$modversion['profile']['field'][10]['edit'] = 1;
+$modversion['profile']['field'][10]['required'] = 0;
+$modversion['profile']['field'][10]['config'] = 1;
+
+$modversion['profile']['field'][11]['name'] = 'url';
+$modversion['profile']['field'][11]['title'] = _PROFILE_MI_URL_TITLE;
+$modversion['profile']['field'][11]['description'] = _PROFILE_MI_URL_DESCRIPTION;
+$modversion['profile']['field'][11]['type'] = 'textbox';
+$modversion['profile']['field'][11]['valuetype'] = XOBJ_DTYPE_URL;
+$modversion['profile']['field'][11]['maxlength'] = 100;
+$modversion['profile']['field'][11]['default'] = "";
+$modversion['profile']['field'][11]['show'] = 1;
+$modversion['profile']['field'][11]['edit'] = 1;
+$modversion['profile']['field'][11]['required'] = 0;
+$modversion['profile']['field'][11]['config'] = 1;
+
+$modversion['profile']['field'][12]['name'] = 'newemail';
+$modversion['profile']['field'][12]['title'] = _PROFILE_MI_NEWEMAIL_TITLE;
+$modversion['profile']['field'][12]['description'] = _PROFILE_MI_NEWEMAIL_DESCRIPTION;
+$modversion['profile']['field'][12]['type'] = 'textbox';
+$modversion['profile']['field'][12]['valuetype'] = XOBJ_DTYPE_EMAIL;
+$modversion['profile']['field'][12]['maxlength'] = 100;
+$modversion['profile']['field'][12]['default'] = "";
+$modversion['profile']['field'][12]['show'] = 0;
+$modversion['profile']['field'][12]['edit'] = 0;
+$modversion['profile']['field'][12]['required'] = 0;
+$modversion['profile']['field'][12]['config'] = 0;
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/profile/xoops_version.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/avatars/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/avatars/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/avatars/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/avatars/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/avatars/main.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/avatars/main.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/avatars/main.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,232 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit("Access Denied");
+} else {
+ $op = 'list';
+ if (isset($_POST)) {
+ foreach ( $_POST as $k => $v ) {
+ ${$k} = $v;
+ }
+ }
+ if (isset($_GET['op'])) {
+ $op = trim($_GET['op']);
+ }
+ if ($op == 'list') {
+ xoops_cp_header();
+ echo '<h4 style="text-align:left">'._MD_AVATARMAN.'</h4>';
+ $avt_handler =& xoops_gethandler('avatar');
+ $savatar_count = $avt_handler->getCount(new Criteria('avatar_type', 'S'));
+ $cavatar_count = $avt_handler->getCount(new Criteria('avatar_type', 'C'));
+ echo '<ul><li>'._MD_SYSAVATARS.' ('.sprintf(_NUMIMAGES, '<b>'.$savatar_count.'</b>').') [<a href="admin.php?fct=avatars&op=listavt&type=S">'._LIST.'</a>]</li><li>'._MD_CSTAVATARS.' ('.sprintf(_NUMIMAGES, '<b>'.$cavatar_count.'</b>').') [<a href="admin.php?fct=avatars&op=listavt&type=C">'._LIST.'</a>]</li></ul>';
+ include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+ $form = new XoopsThemeForm(_MD_ADDAVT, 'avatar_form', 'admin.php', "post", true);
+ $form->setExtra('enctype="multipart/form-data"');
+ $form->addElement(new XoopsFormText(_IMAGENAME, 'avatar_name', 50, 255), true);
+ $form->addElement(new XoopsFormFile(_IMAGEFILE, 'avatar_file', 500000));
+ $form->addElement(new XoopsFormText(_IMGWEIGHT, 'avatar_weight', 3, 4, 0));
+ $form->addElement(new XoopsFormRadioYN(_IMGDISPLAY, 'avatar_display', 1, _YES, _NO));
+ $form->addElement(new XoopsFormHidden('op', 'addfile'));
+ $form->addElement(new XoopsFormHidden('fct', 'avatars'));
+ $form->addElement(new XoopsFormButton('', 'avt_button', _SUBMIT, 'submit'));
+ $form->display();
+ xoops_cp_footer();
+ exit();
+ }
+
+ if ($op == 'listavt') {
+ $avt_handler =& xoops_gethandler('avatar');
+ xoops_cp_header();
+ $type = (isset($_GET['type']) && $_GET['type'] == 'C') ? 'C' : 'S';
+ echo '<a href="admin.php?fct=avatars">'. _MD_AVATARMAN .'</a> <span style="font-weight:bold;">»»</span> ';
+ if ($type == 'S') {
+ echo _MD_SYSAVATARS;
+ } else {
+ echo _MD_CSTAVATARS;
+ }
+ echo '<br /><br />';
+ $criteria = new Criteria('avatar_type', $type);
+ $avtcount = $avt_handler->getCount($criteria);
+ $start = isset($_GET['start']) ? intval($_GET['start']) : 0;
+ $criteria->setStart($start);
+ $criteria->setLimit(10);
+ $avatars =& $avt_handler->getObjects($criteria, true);
+ if ($type == 'S') {
+ foreach (array_keys($avatars) as $i) {
+ echo '<form action="admin.php" method="post">';
+ $id = $avatars[$i]->getVar('avatar_id');
+ echo '<table class="outer" cellspacing="1" width="100%"><tr><td align="center" width="30%" rowspan="6"><img src="'.XOOPS_UPLOAD_URL.'/'.$avatars[$i]->getVar('avatar_file').'" alt="" /></td><td class="head">'._IMAGENAME,'</td><td class="even"><input type="hidden" name="avatar_id[]" value="'.$id.'" /><input type="text" name="avatar_name[]" value="'.$avatars[$i]->getVar('avatar_name', 'E').'" size="20" maxlength="255" /></td></tr><tr><td class="head">'._IMAGEMIME.'</td><td class="odd">'.$avatars[$i]->getVar('avatar_mimetype').'</td></tr><tr><td class="head">'._MD_USERS.'</td><td class="even">'.$avatars[$i]->getUserCount().'</td></tr><tr><td class="head">'._IMGWEIGHT.'</td><td class="odd"><input type="text" name="avatar_weight[]" value="'.$avatars[$i]->getVar('avatar_weight').'" size="3" maxlength="4" /></td></tr><tr><td class="head">'._IMGDISPLAY.'</td><td class="even"><input type="checkbox" name="avatar_display[]" value="1"';
+ if ($avatars[$i]->getVar('avatar_display') == 1) {
+ echo ' checked="checked"';
+ }
+ echo ' /></td></tr><tr><td class="head"> </td><td class="even"><a href="admin.php?fct=avatars&op=delfile&avatar_id='.$id.'">'._DELETE.'</a></td></tr></table><br />';
+ }
+ } else {
+ foreach (array_keys($avatars) as $i) {
+ echo '<table cellspacing="1" class="outer" width="100%"><tr><td width="30%" rowspan="6" align="center"><img src="'.XOOPS_UPLOAD_URL.'/'.$avatars[$i]->getVar('avatar_file').'" alt="" /></td><td class="head">'._IMAGENAME,'</td><td class="even"><a href="'.XOOPS_URL.'/userinfo.php?uid=';
+ $userids =& $avt_handler->getUser($avatars[$i]);
+ echo $userids[0].'">'.$avatars[$i]->getVar('avatar_name').'</a></td></tr><tr><td class="head">'._IMAGEMIME.'</td><td class="odd">'.$avatars[$i]->getVar('avatar_mimetype').'</td></tr><tr><td class="head"> </td><td align="center" class="even"><a href="admin.php?fct=avatars&op=delfile&avatar_id='.$avatars[$i]->getVar('avatar_id').'&user_id='.$userids[0].'">'._DELETE.'</a></td></tr></table><br />';
+ }
+ }
+ if ($avtcount > 0) {
+ if ($avtcount > 10) {
+ include_once XOOPS_ROOT_PATH.'/class/pagenav.php';
+ $nav = new XoopsPageNav($avtcount, 10, $start, 'start', 'fct=avatars&type='.$type.'&op=listavt');
+ echo '<div style="text-align:right;">'.$nav->renderImageNav().'</div>';
+ }
+ if ($type == 'S') {
+ echo '<div style="text-align:center;"><input type="hidden" name="op" value="save" /><input type="hidden" name="fct" value="avatars" /><input type="submit" name="submit" value="'._SUBMIT.'" />'.$GLOBALS['xoopsSecurity']->getTokenHTML().'</div></form>';
+ }
+ }
+ xoops_cp_footer();
+ exit();
+ }
+
+ if ($op == 'save') {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=avatars', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit();
+ }
+ $count = count($avatar_id);
+ if ($count > 0) {
+ $avt_handler =& xoops_gethandler('avatar');
+ $error = array();
+ for ($i = 0; $i < $count; $i++) {
+ $avatar =& $avt_handler->get($avatar_id[$i]);
+ if (!is_object($avatar)) {
+ $error[] = sprintf(_FAILGETIMG, $avatar_id[$i]);
+ continue;
+ }
+ $avatar_display[$i] = empty($avatar_display[$i]) ? 0 : 1;
+ $avatar->setVar('avatar_display', $avatar_display[$i]);
+ $avatar->setVar('avatar_weight', $avatar_weight[$i]);
+ $avatar->setVar('avatar_name', $avatar_name[$i]);
+ if (!$avt_handler->insert($avatar)) {
+ $error[] = sprintf(_FAILSAVEIMG, $avatar_id[$i]);
+ }
+ unset($avatar_id[$i]);
+ unset($avatar_name[$i]);
+ unset($avatar_weight[$i]);
+ unset($avatar_display[$i]);
+ }
+ if (count($error) > 0) {
+ xoops_cp_header();
+ foreach ($error as $err) {
+ echo $err.'<br />';
+ }
+ xoops_cp_footer();
+ exit();
+ }
+ }
+ redirect_header('admin.php?fct=avatars',2,_MD_AM_DBUPDATED);
+ }
+
+ if ($op == 'addfile') {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=avatars', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit();
+ }
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'), 500000);
+ $uploader->setPrefix('savt');
+ $err = array();
+ $ucount = count($_POST['xoops_upload_file']);
+ for ($i = 0; $i < $ucount; $i++) {
+ if ($uploader->fetchMedia($_POST['xoops_upload_file'][$i])) {
+ if (!$uploader->upload()) {
+ $err[] = $uploader->getErrors();
+ } else {
+ $avt_handler =& xoops_gethandler('avatar');
+ $avatar =& $avt_handler->create();
+ $avatar->setVar('avatar_file', $uploader->getSavedFileName());
+ $avatar->setVar('avatar_name', $avatar_name);
+ $avatar->setVar('avatar_mimetype', $uploader->getMediaType());
+ $avatar_display = empty($avatar_display) ? 0 : 1;
+ $avatar->setVar('avatar_display', $avatar_display);
+ $avatar->setVar('avatar_weight', $avatar_weight);
+ $avatar->setVar('avatar_type', 'S');
+ if (!$avt_handler->insert($avatar)) {
+ $err[] = sprintf(_FAILSAVEIMG, $avatar->getVar('avatar_name'));
+ }
+ }
+ } else {
+ $err[] = sprintf(_FAILFETCHIMG, $i);
+ $err = array_merge($err, $uploader->getErrors(false));
+ }
+ }
+ if (count($err) > 0) {
+ xoops_cp_header();
+ xoops_error($err);
+ xoops_cp_footer();
+ exit();
+ }
+ redirect_header('admin.php?fct=avatars',2,_MD_AM_DBUPDATED);
+ }
+
+ if ($op == 'delfile') {
+ xoops_cp_header();
+ $user_id = isset($_GET['user_id']) ? intval($_GET['user_id']) : 0;
+ xoops_confirm(array('op' => 'delfileok', 'avatar_id' => intval($_GET['avatar_id']), 'fct' => 'avatars', 'user_id' => $user_id), 'admin.php', _MD_RUDELIMG);
+ xoops_cp_footer();
+ exit();
+ }
+
+ if ($op == 'delfileok') {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=avatars',1, 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $avatar_id = intval($avatar_id);
+ if ($avatar_id <= 0) {
+ redirect_header('admin.php?fct=avatars',1);
+ }
+ $avt_handler = xoops_gethandler('avatar');
+ $avatar =& $avt_handler->get($avatar_id);
+ if (!is_object($avatar)) {
+ redirect_header('admin.php?fct=avatars',1);
+ }
+ if (!$avt_handler->delete($avatar)) {
+ xoops_cp_header();
+ xoops_error(sprintf(_MD_FAILDEL, $avatar->getVar('avatar_id')));
+ xoops_cp_footer();
+ exit();
+ }
+ $file = $avatar->getVar('avatar_file');
+ @unlink(XOOPS_UPLOAD_PATH.'/'.$file);
+ if (isset($user_id) && $avatar->getVar('avatar_type') == 'C') {
+ $xoopsDB->query("UPDATE ".$xoopsDB->prefix('users')." SET user_avatar='blank.gif' WHERE uid=".intval($user_id));
+ } else {
+ $xoopsDB->query("UPDATE ".$xoopsDB->prefix('users')." SET user_avatar='blank.gif' WHERE user_avatar='".$file."'");
+ }
+ redirect_header('admin.php?fct=avatars',2,_MD_AM_DBUPDATED);
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/avatars/main.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/avatars/xoops_version.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/avatars/xoops_version.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/avatars/xoops_version.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,45 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$modversion['name'] = _MD_AM_AVATARS;
+$modversion['version'] = "";
+$modversion['description'] = "XOOPS Site Avatar Manager";
+$modversion['author'] = "";
+$modversion['credits'] = "The XOOPS Project";
+$modversion['help'] = "images.html";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 1;
+$modversion['image'] = "avatars.gif";
+
+$modversion['hasAdmin'] = 1;
+$modversion['adminpath'] = "admin.php?fct=avatars";
+$modversion['category'] = XOOPS_SYSTEM_AVATAR;
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/avatars/xoops_version.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/banners.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/banners.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/banners.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,402 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit("Access Denied");
+} else {
+/*********************************************************/
+/* Banners Administration Functions */
+/*********************************************************/
+function BannersAdmin()
+{
+ global $xoopsConfig, $xoopsModule;
+ $xoopsDB =& Database::getInstance();
+ xoops_cp_header();
+ // Banners List
+ echo "<a name='top'></a>";
+ echo "<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class=\"odd\">";
+ echo "<div style='text-align:center'><b>"._AM_CURACTBNR."</b></div><br />
+ <table width='100%' border='0'><tr>
+ <td align='center'>"._AM_BANNERID."</td>
+ <td align='center'>"._AM_IMPRESION."</td>
+ <td align='center'>"._AM_IMPLEFT."</td>
+ <td align='center'>"._AM_CLICKS."</td>
+ <td align='center'>"._AM_NCLICKS."</td>
+ <td align='center'>"._AM_CLINAME."</td>
+ <td align='center'>"._AM_FUNCTION."</td></tr><tr align='center'>";
+ $result = $xoopsDB->query("SELECT bid, cid, imptotal, impmade, clicks, date FROM ".$xoopsDB->prefix("banner")." ORDER BY bid");
+ $myts =& MyTextSanitizer::getInstance();
+ while(list($bid, $cid, $imptotal, $impmade, $clicks, $date) = $xoopsDB->fetchRow($result)) {
+ $result2 = $xoopsDB->query("SELECT cid, name FROM ".$xoopsDB->prefix("bannerclient")." WHERE cid=$cid");
+ list($cid, $name) = $xoopsDB->fetchRow($result2);
+ $name = $myts->makeTboxData4Show($name);
+ if ( $impmade == 0 ) {
+ $percent = 0;
+ } else {
+ $percent = substr(100 * $clicks / $impmade, 0, 5);
+ }
+ if ( $imptotal == 0 ) {
+ $left = ""._AM_UNLIMIT."";
+ } else {
+ $left = $imptotal-$impmade;
+ }
+ echo "<td align='center'>$bid</td>
+ <td align='center'>$impmade</td>
+ <td align='center'>$left</td>
+ <td align='center'>$clicks</td>
+ <td align='center'>$percent%</td>
+ <td align='center'>$name</td>
+ <td align='center'><a href='admin.php?fct=banners&op=BannerEdit&bid=$bid'>"._AM_EDIT."</a> | <a href='admin.php?fct=banners&op=BannerDelete&bid=$bid&ok=0'>"._AM_DELETE."</a></td><tr>";
+ }
+ echo "</td></tr></table>";
+ echo "</td></tr></table>";
+ echo "<br />";
+ // Finished Banners List
+ echo "<a name='top'></a>";
+ echo "<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class=\"odd\">";
+ echo "<div style='text-align:center'><b>"._AM_FINISHBNR."</b></div><br />
+ <table width='100%' border='0'><tr>
+ <td align='center'>"._AM_BANNERID."</td>
+ <td align='center'>"._AM_IMPD."</td>
+ <td align='center'>"._AM_CLICKS."</td>
+ <td align='center'>"._AM_NCLICKS."</td>
+ <td align='center'>"._AM_STARTDATE."</td>
+ <td align='center'>"._AM_ENDDATE."</td>
+ <td align='center'>"._AM_CLINAME."</td>
+ <td align='center'>"._AM_FUNCTION."</td></tr>
+ <tr>";
+ $result = $xoopsDB->query("SELECT bid, cid, impressions, clicks, datestart, dateend FROM ".$xoopsDB->prefix("bannerfinish")." ORDER BY bid");
+ while(list($bid, $cid, $impressions, $clicks, $datestart, $dateend) = $xoopsDB->fetchRow($result)) {
+ $result2 = $xoopsDB->query("SELECT cid, name FROM ".$xoopsDB->prefix("bannerclient")." WHERE cid=$cid");
+ list($cid, $name) = $xoopsDB->fetchRow($result2);
+ $name = $myts->makeTboxData4Show($name);
+ $percent = substr(100 * $clicks / $impressions, 0, 5);
+ echo "
+ <td align='center'>$bid</td>
+ <td align='center'>$impressions</td>
+ <td align='center'>$clicks</td>
+ <td align='center'>$percent%</td>
+ <td align='center'>".formatTimestamp($datestart,"m")."</td>
+ <td align='center'>".formatTimestamp($dateend,"m")."</td>
+ <td align='center'>$name</td>
+ <td align='center'><a href='admin.php?fct=banners&op=BannerFinishDelete&bid=$bid'>"._AM_DELETE."</a></td><tr>";
+ }
+ echo "</td></tr></table>";
+ echo "</td></tr></table>";
+ echo "<br />";
+ // Clients List
+ echo "<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class=\"odd\">";
+ echo "
+ <div style='text-align:center'><b>"._AM_ADVCLI."</b></div><br />
+ <table width='100%' border='0'><tr align='center'>
+ <td align='center'>"._AM_BANNERID."</td>
+ <td align='center'>"._AM_CLINAME."</td>
+ <td align='center'>"._AM_ACTIVEBNR."</td>
+ <td align='center'>"._AM_CONTNAME."</td>
+ <td align='center'>"._AM_CONTMAIL."</td>
+ <td align='center'>"._AM_FUNCTION."</td></tr><tr align='center'>";
+ $result = $xoopsDB->query("SELECT cid, name, contact, email FROM ".$xoopsDB->prefix("bannerclient")." ORDER BY cid");
+ while(list($cid, $name, $contact, $email) = $xoopsDB->fetchRow($result)) {
+ $name = $myts->makeTboxData4Show($name);
+ $contact = $myts->makeTboxData4Show($contact);
+ $email = $myts->makeTboxData4Show($email);
+ $result2 = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("banner")." WHERE cid=$cid");
+ list($numrows) = $xoopsDB->fetchRow($result2);
+ echo "
+ <td align='center'>$cid</td>
+ <td align='center'>$name</td>
+ <td align='center'>$numrows</td>
+ <td align='center'>$contact</td>
+ <td align='center'>$email</td>
+ <td align='center'><a href='admin.php?fct=banners&op=BannerClientEdit&cid=$cid'>"._AM_EDIT."</a> | <a href='admin.php?fct=banners&op=BannerClientDelete&cid=$cid'>"._AM_DELETE."</a></td><tr>";
+ }
+ echo "</td></tr></table>";
+ echo "</td></tr></table>";
+ echo "<br />";
+ // Add Banner
+ $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("bannerclient"));
+ list($numrows) = $xoopsDB->fetchRow($result);
+ if ( $numrows > 0 ) {
+ echo"<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class=\"odd\">";
+ echo"
+ <h4>"._AM_ADDNWBNR."</h4>
+ <form action='admin.php' method='post'>
+ "._AM_CLINAMET."
+ <select name='cid'>";
+ $result = $xoopsDB->query("SELECT cid, name FROM ".$xoopsDB->prefix("bannerclient"));
+ while(list($cid, $name) = $xoopsDB->fetchRow($result)) {
+ $name = $myts->makeTboxData4Show($name);
+ echo "<option value='$cid'>$name</option>";
+
+ }
+ echo "
+ </select><br />
+ "._AM_IMPPURCHT."<input type='text' name='imptotal' size='12' maxlength='11' /> 0 = "._AM_UNLIMIT."<br />
+ "._AM_IMGURLT."<input type='text' name='imageurl' size='50' maxlength='255' /><br />
+ "._AM_CLICKURLT."<input type='text' name='clickurl' size='50' maxlength='255' /><br />
+ "._AM_USEHTML." <input type='checkbox' name='htmlbanner' value='1'>
+ <br />
+ "._AM_CODEHTML."
+ <br />
+ <textarea name='htmlcode' rows='6'></textarea>
+ <br />
+ <input type='hidden' name='fct' value='banners' />
+ <input type='hidden' name='op' value='BannersAdd' />
+ ".$GLOBALS['xoopsSecurity']->getTokenHTML()."
+ <input type='submit' value='"._AM_ADDBNR."' />
+ </form>";
+ echo"</td></tr></table>";
+ }
+ // Add Client
+ echo "<br />";
+ echo "<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class=\"odd\">";
+ echo "
+ <h4>"._AM_ADDNWCLI."</h4>
+ <form action='admin.php' method='post'>
+ "._AM_CLINAMET."<input type='text' name='name' size='30' maxlength='60' /><br />
+ "._AM_CONTNAMET."<input type='text' name='contact' size='30' maxlength='60' /><br />
+ "._AM_CONTMAILT."<input type='text' name='email' size='30' maxlength='60' /><br />
+ "._AM_CLILOGINT."<input type='text' name='login' size='12' maxlength='10' /><br />
+ "._AM_CLIPASST."<input type='text' name='passwd' size='12' maxlength='10' /><br />
+ "._AM_EXTINFO."<br /><textarea name='extrainfo' cols='60' rows='10' /></textarea><br />
+ <input type='hidden' name='op' value='BannerAddClient' />
+ ".$GLOBALS['xoopsSecurity']->getTokenHTML()."
+ <input type='hidden' name='fct' value='banners' />
+ <input type='submit' value='"._AM_ADDCLI."' />
+ </form>";
+ echo "</td></tr></table>";
+ xoops_cp_footer();
+}
+
+
+function BannerDelete($bid)
+{
+ global $xoopsConfig, $xoopsModule;
+ $xoopsDB =& Database::getInstance();
+ $myts =& MyTextSanitizer::getInstance();
+ xoops_cp_header();
+ $result=$xoopsDB->query("SELECT cid, imptotal, impmade, clicks, imageurl, clickurl, htmlbanner, htmlcode FROM ".$xoopsDB->prefix("banner")." where bid=$bid");
+ list($cid, $imptotal, $impmade, $clicks, $imageurl, $clickurl, $htmlbanner, $htmlcode) = $xoopsDB->fetchRow($result);
+ $imageurl = htmlspecialchars($imageurl, ENT_QUOTES);
+ $clickurl = htmlspecialchars($clickurl, ENT_QUOTES);
+ echo"<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class=\"odd\">";
+ echo "<h4>"._AM_DELEBNR."</h4>";
+ if ($htmlbanner){
+ echo $myts->displayTarea($htmlcode,1);
+ }else{
+ if(strtolower(substr($imageurl,strrpos($imageurl,".")))==".swf") {
+ echo "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/ swflash.cab#version=6,0,40,0\"; width=\"468\" height=\"60\">";
+ echo "<param name=movie value=\"$imageurl\">";
+ echo "<param name=quality value=high>";
+ echo "<embed src=\"$imageurl\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"; type=\"application/x-shockwave-flash\" width=\"468\" height=\"60\">";
+ echo "</embed>";
+ echo "</object>";
+ } else {
+ echo "<img src='$imageurl' alt='' />";
+ }
+ }
+ echo "<a href='$clickurl'>$clickurl</a><br /><br /><table width='100%' border='0'><tr align='center'><td align='center'>"._AM_BANNERID."</td><td align='center'>"._AM_IMPRESION."</td><td align='center'>"._AM_IMPLEFT."</td><td align='center'>"._AM_CLICKS."</td><td align='center'>"._AM_NCLICKS."</td><td align='center'>"._AM_CLINAME."</td></tr><tr align='center'>";
+ $result2 = $xoopsDB->query("SELECT cid, name FROM ".$xoopsDB->prefix("bannerclient")." WHERE cid=$cid");
+ list($cid, $name) = $xoopsDB->fetchRow($result2);
+ $name = $myts->makeTboxData4Show($name);
+ $percent = substr(100 * $clicks / $impmade, 0, 5);
+ if ( $imptotal == 0 ) {
+ $left = 'unlimited';
+ } else {
+ $left = $imptotal-$impmade;
+ }
+ echo "
+ <td align='center'>$bid</td>
+ <td align='center'>$impmade</td>
+ <td align='center'>$left</td>
+ <td align='center'>$clicks</td>
+ <td align='center'>$percent%</td>
+ <td align='center'>$name</td>
+ </tr></table><br />";
+ xoops_confirm(array('fct' => 'banners', 'op' => 'BannerDelete2', 'bid' => $bid), 'admin.php', _AM_SUREDELE);
+ echo"</td></tr></table>";
+ xoops_cp_footer();
+}
+
+function BannerEdit($bid)
+{
+ global $xoopsConfig, $xoopsModule;
+ $bid = intval($bid);
+ xoops_cp_header();
+ $xoopsDB =& Database::getInstance();
+ $myts =& MyTextSanitizer::getInstance();
+ $result=$xoopsDB->query("SELECT cid, imptotal, impmade, clicks, imageurl, clickurl, htmlbanner, htmlcode FROM ".$xoopsDB->prefix("banner")." where bid=".$bid);
+ list($cid, $imptotal, $impmade, $clicks, $imageurl, $clickurl, $htmlbanner, $htmlcode) = $xoopsDB->fetchRow($result);
+ echo"<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class=\"odd\">";
+ echo"<h4>"._AM_EDITBNR."</h4>";
+ if ($htmlbanner){
+ echo $myts->displayTarea($htmlcode,1);
+ }else{
+ if(strtolower(substr($imageurl,strrpos($imageurl,".")))==".swf") {
+ echo "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/ swflash.cab#version=6,0,40,0\"; width=\"468\" height=\"60\">";
+ echo "<param name=movie value=\"$imageurl\">";
+ echo "<param name=quality value=high>";
+ echo "<embed src=\"$imageurl\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"; type=\"application/x-shockwave-flash\" width=\"468\" height=\"60\">";
+ echo "</embed>";
+ echo "</object>";
+ } else {
+ echo "<img src='$imageurl' alt='' />";
+ }
+ }
+ echo "<form action='admin.php' method='post'>
+ "._AM_CLINAMET."
+ <select name='cid'>\n";
+ $result = $xoopsDB->query("SELECT cid, name FROM ".$xoopsDB->prefix("bannerclient")." where cid=$cid");
+ list($cid, $name) = $xoopsDB->fetchRow($result);
+ $name = $myts->makeTboxData4Show($name);
+ echo "<option value='$cid' selected='selected'>$name</option>";
+ $result = $xoopsDB->query("SELECT cid, name FROM ".$xoopsDB->prefix("bannerclient"));
+ while(list($ccid, $name) = $xoopsDB->fetchRow($result)) {
+ $name = $myts->makeTboxData4Show($name);
+ if ( $cid != $ccid ) {
+ echo "<option value='$ccid'>$name</option>";
+ }
+ }
+ echo "</select><br />";
+ if ( $imptotal == 0 ) {
+ $impressions = ""._AM_UNLIMIT."";
+ } else {
+ $impressions = $imptotal;
+ }
+ echo "
+ "._AM_ADDIMPT."<input type='text' name='impadded' size='12' maxlength='11' /> "._AM_PURCHT."<b>$impressions</b> "._AM_MADET."<b>$impmade</b><br />
+ "._AM_IMGURLT."<input type='text' name='imageurl' size='50' maxlength='200' value='".htmlspecialchars($imageurl, ENT_QUOTES)."'><br />
+ "._AM_CLICKURLT."<input type='text' name='clickurl' size='50' maxlength='200' value='".htmlspecialchars($clickurl, ENT_QUOTES)."' /><br />
+ "._AM_USEHTML;
+ if ($htmlbanner){
+ echo " <input type='checkbox' name='htmlbanner' value='1' checked='checked'>";
+ }else{
+ echo " <input type='checkbox' name='htmlbanner' value='1'>";
+ }
+ echo "
+ <br />
+ "._AM_CODEHTML."
+ <br />
+ <textarea name='htmlcode' rows='6'>".$myts->makeTboxData4Edit($htmlcode)."</textarea>
+ <br />
+ <input type='hidden' name='bid' value='$bid' />
+ <input type='hidden' name='imptotal' value='$imptotal' />
+ <input type='hidden' name='fct' value='banners' />
+ ".$GLOBALS['xoopsSecurity']->getTokenHTML()."
+ <input type='hidden' name='op' value='BannerChange' />
+ <input type='submit' value='"._AM_CHGBNR."' />
+ </form>";
+ echo"</td></tr></table>";
+ xoops_cp_footer();
+}
+
+function BannerClientDelete($cid)
+{
+ global $xoopsConfig, $xoopsModule;
+ $xoopsDB =& Database::getInstance();
+ $myts =& MyTextSanitizer::getInstance();
+ xoops_cp_header();
+ $result = $xoopsDB->query("SELECT cid, name FROM ".$xoopsDB->prefix("bannerclient")." WHERE cid=$cid");
+ list($cid, $name) = $xoopsDB->fetchRow($result);
+ $name = $myts->makeTboxData4Show($name);
+ echo "<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class=\"odd\">";
+ echo "<h4>"._AM_DELEADC."</h4>".sprintf(_AM_SUREDELCLI,$name)."<br /><br />";
+ $result2 = $xoopsDB->query("SELECT imageurl, clickurl, htmlbanner, htmlcode FROM ".$xoopsDB->prefix("banner")." WHERE cid=$cid");
+ $numrows = $xoopsDB->getRowsNum($result2);
+ if ( $numrows == 0 ) {
+ echo ""._AM_NOBNRRUN."<br /><br />";
+ } else {
+ echo "<font color='#ff0000'><b>"._AM_WARNING."</b></font><br />"._AM_ACTBNRRUN."<br /><br />";
+ }
+ while(list($imageurl, $clickurl, $htmlbanner, $htmlcode) = $xoopsDB->fetchRow($result2)) {
+ $imageurl = htmlspecialchars($imageurl, ENT_QUOTES);
+ $clickurl = htmlspecialchars($clickurl, ENT_QUOTES);
+ $bannerobject = "";
+ if ($htmlbanner){
+ $bannerobject = $myts->displayTarea($htmlcode,1);
+ } else {
+ $bannerobject = '<div><a href="'.$clickurl.'" target="_blank">';
+ if(strtolower(substr($imageurl,strrpos($imageurl,".")))==".swf") {
+ $bannerobject = $bannerobject
+ .'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="468" height="60">'
+ .'<param name=movie value="'.$imageurl.'">'
+ .'<param name=quality value=high>'
+ .'<embed src="'.$imageurl.'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"; type="application/x-shockwave-flash" width="468" height="60">'
+ .'</embed>'
+ .'</object>';
+ } else {
+ $bannerobject = $bannerobject.'<img src="'.$imageurl.'" alt="" />';
+ }
+ $bannerobject = $bannerobject.'</a></div>';
+ }
+ echo $bannerobject."<a href='".$clickurl."'>".$clickurl."</a><br /><br />";
+ }
+ xoops_confirm(array('fct' => 'banners', 'op' => 'BannerClientDelete2', 'cid' => $cid), 'admin.php', _AM_SUREDELBNR);
+ echo "</td></tr></table>";
+ xoops_cp_footer();
+}
+
+function BannerClientEdit($cid)
+{
+ global $xoopsConfig, $xoopsModule;
+ $xoopsDB =& Database::getInstance();
+ $myts =& MyTextSanitizer::getInstance();
+ xoops_cp_header();
+ $result = $xoopsDB->query("SELECT name, contact, email, login, passwd, extrainfo FROM ".$xoopsDB->prefix("bannerclient")." WHERE cid=$cid");
+ list($name, $contact, $email, $login, $passwd, $extrainfo) = $xoopsDB->fetchRow($result);
+ $name = $myts->makeTboxData4Edit($name);
+ $contact = $myts->makeTboxData4Edit($contact);
+ $email = $myts->makeTboxData4Edit($email);
+ $login = $myts->makeTboxData4Edit($login);
+ $passwd = $myts->makeTboxData4Edit($passwd);
+ $extrainfo = $myts->makeTareaData4Edit($extrainfo);
+ echo "<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class=\"odd\">";
+ echo "
+ <h4>"._AM_EDITADVCLI."</h4>
+ <form action='admin.php' method='post'>
+ "._AM_CLINAMET."<input type='text' name='name' value='$name' size='30' maxlength='60' /><br />
+ "._AM_CONTNAMET."<input type='text' name='contact' value='$contact' size='30' maxlength='60' /><br />
+ "._AM_CONTMAILT ."<input type='text' name='email' size='30' maxlength='60' value='$email' /><br />
+ "._AM_CLILOGINT."<input type='text' name='login' size='12' maxlength='10' value='$login' /><br />
+ "._AM_CLIPASST."<input type='text' name='passwd' size='12' maxlength='10' value='$passwd' /><br />
+ "._AM_EXTINFO."<br /><textarea name='extrainfo' cols='60' rows='10' />$extrainfo</textarea><br />
+ <input type='hidden' name='cid' value='$cid' />
+ <input type='hidden' name='op' value='BannerClientChange' />
+ ".$GLOBALS['xoopsSecurity']->getTokenHTML()."
+ <input type='hidden' name='fct' value='banners' />
+ <input type='submit' value='"._AM_CHGCLI."' />";
+ echo "</td></tr></table>";
+ xoops_cp_footer();
+}
+
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/banners.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/main.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/main.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/main.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,199 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------- //
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit("Access Denied");
+}
+include_once XOOPS_ROOT_PATH."/modules/system/admin/banners/banners.php";
+include_once XOOPS_ROOT_PATH."/class/module.textsanitizer.php";
+
+$op = "BannersAdmin";
+if (isset($_GET['op'])) {
+ $op = $_GET['op'];
+} elseif (isset($_POST['op'])) {
+ $op = $_POST['op'];
+}
+
+switch ( $op ) {
+case "BannersAdmin":
+ BannersAdmin();
+ break;
+
+case "BannersAdd":
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=banners&op=BannersAdmin#top", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $name = isset($_POST['name']) ? trim($_POST['name']) : '';
+ $cid = isset($_POST['cid']) ? intval($_POST['cid']) : 0;
+ $imageurl = isset($_POST['imageurl']) ? trim($_POST['imageurl']) : '';
+ $clickurl = isset($_POST['clickurl']) ? trim($_POST['clickurl']) : '';
+ $imptotal = isset($_POST['imptotal']) ? intval($_POST['imptotal']) : 0;
+ $htmlbanner = isset($_POST['htmlbanner']) ? intval($_POST['htmlbanner']) : 0;
+ $htmlcode = isset($_POST['htmlcode']) ? trim($_POST['htmlcode']) : '';
+ if ($cid <= 0) {
+ redirect_header("admin.php?fct=banners&op=BannersAdmin#top");
+ }
+ $db =& Database::getInstance();
+ $myts =& MyTextSanitizer::getInstance();
+ $newid = $db->genId($db->prefix("banner")."_bid_seq");
+ $sql = sprintf("INSERT INTO %s (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlbanner, htmlcode) VALUES (%d, %d, %d, 1, 0, %s, %s, %d, %d, %s)", $db->prefix("banner"), intval($newid), $cid, $imptotal, $db->quoteString($myts->stripSlashesGPC($imageurl)), $db->quoteString($myts->stripSlashesGPC($clickurl)), time(), $htmlbanner, $db->quoteString($myts->stripSlashesGPC($htmlcode)));
+ $db->query($sql);
+ redirect_header("admin.php?fct=banners&op=BannersAdmin#top",1,_MD_AM_DBUPDATED);
+ exit();
+ break;
+
+case "BannerAddClient":
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=banners&op=BannersAdmin#top", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $name = isset($_POST['name']) ? trim($_POST['name']) : '';
+ $contact = isset($_POST['contact']) ? trim($_POST['contact']) : '';
+ $email = isset($_POST['email']) ? trim($_POST['email']) : '';
+ $login = isset($_POST['login']) ? trim($_POST['login']) : '';
+ $passwd = isset($_POST['passwd']) ? trim($_POST['passwd']) : '';
+ $extrainfo = isset($_POST['extrainfo']) ? trim($_POST['extrainfo']) : '';
+ $db =& Database::getInstance();
+ $myts =& MyTextSanitizer::getInstance();
+ $newid = $db->genId($xoopsDB->prefix("bannerclient")."_cid_seq");
+ $sql = sprintf("INSERT INTO %s (cid, name, contact, email, login, passwd, extrainfo) VALUES (%d, %s, %s, %s, %s, %s, %s)", $db->prefix("bannerclient"), intval($newid), $db->quoteString($myts->stripSlashesGPC($name)), $db->quoteString($myts->stripSlashesGPC($contact)), $db->quoteString($myts->stripSlashesGPC($email)), $db->quoteString($myts->stripSlashesGPC($login)), $db->quoteString($myts->stripSlashesGPC($passwd)), $db->quoteString($myts->stripSlashesGPC($extrainfo)));
+ $db->query($sql);
+ redirect_header("admin.php?fct=banners&op=BannersAdmin#top",1,_MD_AM_DBUPDATED);
+ exit();
+ break;
+
+case "BannerFinishDelete":
+ xoops_cp_header();
+ xoops_confirm(array('op' => 'BannerFinishDelete2', 'bid' => intval($_GET['bid']), 'fct' => 'banners'), 'admin.php', _AM_SUREDELE);
+ xoops_cp_footer();
+ break;
+
+case "BannerFinishDelete2":
+ $bid = isset($_POST['bid']) ? intval($_POST['bid']) : 0;
+ if ($bid <= 0 | !$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=banners&op=BannersAdmin#top", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $db =& Database::getInstance();
+ $sql = sprintf("DELETE FROM %s WHERE bid = %u", $db->prefix("bannerfinish"), $bid);
+ $db->query($sql);
+ redirect_header("admin.php?fct=banners&op=BannersAdmin#top",1,_MD_AM_DBUPDATED);
+ exit();
+ break;
+
+case "BannerDelete":
+ $bid = isset($_GET['bid']) ? intval($_GET['bid']) : 0;
+ if ($bid > 0) {
+ BannerDelete($bid);
+ }
+ break;
+
+case "BannerDelete2":
+ $bid = isset($_POST['bid']) ? intval($_POST['bid']) : 0;
+ if ($bid <= 0 | !$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=banners&op=BannersAdmin#top", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $db =& Database::getInstance();
+ $sql = sprintf("DELETE FROM %s WHERE bid = %u", $db->prefix("banner"), $bid);
+ $db->query($sql);
+ redirect_header("admin.php?fct=banners&op=BannersAdmin#top",1,_MD_AM_DBUPDATED);
+ break;
+
+case "BannerEdit":
+ $bid = isset($_GET['bid']) ? intval($_GET['bid']) : 0;
+ if ($bid > 0) {
+ BannerEdit($bid);
+ }
+ break;
+
+case "BannerChange":
+ $bid = isset($_POST['bid']) ? intval($_POST['bid']) : 0;
+ $cid = isset($_POST['cid']) ? intval($_POST['cid']) : 0;
+ if (($cid <= 0 || $bid <= 0) | !$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=banners&op=BannersAdmin#top", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $imageurl = isset($_POST['imageurl']) ? trim($_POST['imageurl']) : '';
+ $clickurl = isset($_POST['clickurl']) ? trim($_POST['clickurl']) : '';
+ $imptotal = isset($_POST['imptotal']) ? intval($_POST['imptotal']) : 0;
+ $impadded = isset($_POST['impadded']) ? intval($_POST['impadded']) : 0;
+ $htmlbanner = isset($_POST['htmlbanner']) ? intval($_POST['htmlbanner']) : 0;
+ $htmlcode = isset($_POST['htmlcode']) ? trim($_POST['htmlcode']) : '';
+ $db =& Database::getInstance();
+ $myts =& MyTextSanitizer::getInstance();
+ $sql = sprintf("UPDATE %s SET cid = %d, imptotal = %d, imageurl = %s, clickurl = %s, htmlbanner = %d, htmlcode = %s WHERE bid = %d", $db->prefix("banner"), $cid, $imptotal + $impadded, $db->quoteString($myts->stripSlashesGPC($imageurl)), $db->quoteString($myts->stripSlashesGPC($clickurl)), $htmlbanner, $db->quoteString($myts->stripSlashesGPC($htmlcode)), $bid);
+ $db->query($sql);
+ redirect_header("admin.php?fct=banners&op=BannersAdmin#top",1,_MD_AM_DBUPDATED);
+ break;
+
+case "BannerClientDelete":
+ $cid = isset($_GET['cid']) ? intval($_GET['cid']) : 0;
+ if ($cid > 0) {
+ BannerClientDelete($cid);
+ }
+ break;
+
+case "BannerClientDelete2":
+ $cid = isset($_POST['cid']) ? intval($_POST['cid']) : 0;
+ $db =& Database::getInstance();
+ if ($cid <= 0 | !$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=banners&op=BannersAdmin#top", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $sql = sprintf("DELETE FROM %s WHERE cid = %u", $db->prefix("banner"), $cid);
+ $db->query($sql);
+ $sql = sprintf("DELETE FROM %s WHERE cid = %u", $db->prefix("bannerclient"), $cid);
+ $db->query($sql);
+ redirect_header("admin.php?fct=banners&op=BannersAdmin#top",1,_MD_AM_DBUPDATED);
+ break;
+
+case "BannerClientEdit":
+ $cid = isset($_GET['cid']) ? intval($_GET['cid']) : 0;
+ if ($cid > 0) {
+ BannerClientEdit($cid);
+ }
+ break;
+
+case "BannerClientChange":
+ $cid = isset($_POST['cid']) ? intval($_POST['cid']) : 0;
+ if ($cid <= 0 | !$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=banners&op=BannersAdmin#top", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $name = isset($_POST['name']) ? trim($_POST['name']) : '';
+ $contact = isset($_POST['contact']) ? trim($_POST['contact']) : '';
+ $email = isset($_POST['email']) ? trim($_POST['email']) : '';
+ $login = isset($_POST['login']) ? trim($_POST['login']) : '';
+ $passwd = isset($_POST['passwd']) ? trim($_POST['passwd']) : '';
+ $extrainfo = isset($_POST['extrainfo']) ? trim($_POST['extrainfo']) : '';
+ $db =& Database::getInstance();
+ $myts =& MyTextSanitizer::getInstance();
+ $sql = sprintf("UPDATE %s SET name = %s, contact = %s, email = %s, login = %s, passwd = %s, extrainfo = %s WHERE cid = %d", $db->prefix("bannerclient"), $db->quoteString($myts->stripSlashesGPC($name)), $db->quoteString($myts->stripSlashesGPC($contact)), $db->quoteString($myts->stripSlashesGPC($email)), $db->quoteString($myts->stripSlashesGPC($login)), $db->quoteString($myts->stripSlashesGPC($passwd)), $db->quoteString($myts->stripSlashesGPC($extrainfo)), $cid);
+ $db->query($sql);
+ redirect_header("admin.php?fct=banners&op=BannersAdmin#top",1,_MD_AM_DBUPDATED);
+ break;
+
+default:
+ BannersAdmin();
+ break;
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/main.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/xoops_version.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/xoops_version.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/xoops_version.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,44 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$modversion['name'] = _MD_AM_BANS;
+$modversion['version'] = "";
+$modversion['description'] = "Banners Administration";
+$modversion['author'] = "Francisco Burzi <br>( http://phpnuke.org/ )";
+$modversion['credits'] = "The MPN SE Project";
+$modversion['help'] = "banners.html";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 1;
+$modversion['image'] = "banners.gif";
+$modversion['hasAdmin'] = 1;
+$modversion['adminpath'] = "admin.php?fct=banners";
+$modversion['category'] = XOOPS_SYSTEM_BANNER;
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/banners/xoops_version.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/blockform.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/blockform.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/blockform.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,119 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+function getInstanceForm(&$instance, $title, $op) {
+ include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+ $form = new XoopsThemeForm($title, 'blockform', 'admin.php', "post", true);
+ $form->addElement(new XoopsFormLabel(_AM_NAME, $instance->block->getVar('name')));
+
+ $side_select = new XoopsFormSelect(_AM_BLKTYPE, "bside", $instance->getVar('side'));
+ $side_select->addOptionArray(array(0 => _AM_SBLEFT, 1 => _AM_SBRIGHT, 3 => _AM_CBLEFT, 4 => _AM_CBRIGHT, 5 => _AM_CBCENTER));
+ $form->addElement($side_select);
+
+ $form->addElement(new XoopsFormText(_AM_WEIGHT, "bweight", 2, 5, $instance->getVar('weight')));
+ $form->addElement(new XoopsFormRadioYN(_AM_VISIBLE, 'bvisible', $instance->getVar('visible')));
+
+ $mod_select = new XoopsFormSelect(_AM_VISIBLEIN, "bmodule", $instance->getVisibleIn(), 10, true);
+ $module_handler =& xoops_gethandler('module');
+ //Get modules and pages for visible in
+ $mod_select->addOption(_AM_SYSTEMLEVEL, "", true);
+ $mod_select->addOption("0-2", " - "._AM_ADMINBLOCK);
+ $mod_select->addOption("0-1", " - "._AM_TOPPAGE);
+ $mod_select->addOption("0-0", " - "._AM_ALLPAGES);
+
+ $criteria = new CriteriaCompo(new Criteria('hasmain', 1));
+ $criteria->add(new Criteria('isactive', 1));
+ $module_main =& $module_handler->getObjects($criteria, true, true);
+ if (count($module_main) > 0) {
+ foreach (array_keys($module_main) as $mid) {
+ $mod_select->addOption($module_main[$mid]->getVar('name'), "", true);
+ $mod_select->addOption($mid."-0", " - "._AM_ALLMODULEPAGES);
+ $pages = $module_main[$mid]->getInfo("pages");
+ if ($pages == false) {
+ $pages = $module_main[$mid]->getInfo("sub");
+ }
+ if (is_array($pages) && $pages != array()) {
+ foreach ($pages as $id => $pageinfo) {
+ $mod_select->addOption($mid."-".$id, " - ".$pageinfo['name']);
+ }
+ }
+ }
+ }
+ $form->addElement($mod_select);
+
+ $title = !$instance->isNew() ? $instance->getVar('title') : $instance->block->getVar('name');
+ $form->addElement(new XoopsFormText(_AM_TITLE, 'btitle', 50, 255, $title), false);
+ if ($instance->block->getVar('template') != '') {
+ $tplfile_handler =& xoops_gethandler('tplfile');
+ $btemplate =& $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $instance->block->getVar('bid'));
+ if (count($btemplate) > 0) {
+ $form->addElement(new XoopsFormLabel(_AM_CONTENT, '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=tplsets&op=edittpl&id='.$btemplate[0]->getVar('tpl_id').'">'._AM_EDITTPL.'</a>'));
+ } else {
+ $btemplate2 =& $tplfile_handler->find('default', 'block', $instance->block->getVar('bid'));
+ if (count($btemplate2) > 0) {
+ $form->addElement(new XoopsFormLabel(_AM_CONTENT, '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=tplsets&op=edittpl&id='.$btemplate2[0]->getVar('tpl_id').'" target="_blank">'._AM_EDITTPL.'</a>'));
+ }
+ }
+ }
+ if ($instance->isNew()) {
+ $editelements = $instance->block->getOptions();
+ }
+ else {
+ $editelements = $instance->getOptions();
+ }
+ if ($editelements != false) {
+ $form->addElement(new XoopsFormLabel(_AM_OPTIONS, $editelements));
+ }
+
+ $cache_select = new XoopsFormSelect(_AM_BCACHETIME, 'bcachetime', $instance->getVar('bcachetime'));
+ $cache_select->addOptionArray(array('0' => _NOCACHE,
+ '30' => sprintf(_SECONDS, 30),
+ '60' => _MINUTE,
+ '300' => sprintf(_MINUTES, 5),
+ '1800' => sprintf(_MINUTES, 30),
+ '3600' => _HOUR,
+ '18000' => sprintf(_HOURS, 5),
+ '86400' => _DAY,
+ '259200' => sprintf(_DAYS, 3),
+ '604800' => _WEEK,
+ '2592000' => _MONTH));
+ $form->addElement($cache_select);
+
+ $form->addElement(new XoopsFormSelectGroup(_AM_VISIBLETOGROUPS, 'groups', true, $instance->getVisibleGroups(), 5, true));
+
+ if ($instance->getVar('instanceid') > 0) {
+ $form->addElement(new XoopsFormHidden('instanceid', $instance->getVar('instanceid')));
+ }
+ $form->addElement(new XoopsFormHidden('bid', $instance->block->getVar('bid')));
+ $form->addElement(new XoopsFormHidden('op', $op));
+ $form->addElement(new XoopsFormHidden('fct', 'blocksadmin'));
+ $button_tray = new XoopsFormElementTray('', ' ');
+
+ $button_tray->addElement(new XoopsFormButton('', 'submitblock', _SUBMIT, "submit"));
+ $form->addElement($button_tray);
+ return $form;
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/blockform.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/blocksadmin.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/blocksadmin.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/blocksadmin.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,291 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+
+$_REQUEST["selmod"]=empty($_REQUEST["selmod"])?0:intval($_REQUEST["selmod"]);
+
+function list_blocks()
+{
+ global $xoopsUser, $xoopsConfig, $xoopsTpl, $xoopsOption;
+ include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
+
+ $block_handler =& xoops_gethandler('block');
+ if($_REQUEST["selmod"]<1){
+ $crit = null;
+ }else{
+ $crit = new Criteria("mid", $_REQUEST["selmod"]);
+ }
+ $criteria = new CriteriaCompo($crit);
+ $criteria->setSort('name');
+ $blocks =& $block_handler->getObjects($criteria, true);
+ unset($criteria);
+
+ $module_handler =& xoops_gethandler('module');
+ $modules =& $module_handler->getObjects(null, true);
+
+ include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+ $newform = new XoopsForm('', 'newform', 'admin.php');
+ $block_select = new XoopsFormSelect('', 'bid');
+ foreach ($blocks as $block) {
+ $modname = isset($modules[$block->getVar('mid')]) ? $modules[$block->getVar('mid')]->getVar('name') : "";
+ $block_arr[$block->getVar('mid')]['modname'] = $modname;
+ $block_arr[$block->getVar('mid')]['blocks'][$block->getVar('bid')] = " - ".$block->getVar('name');
+ $modnames[$block->getVar('mid')] = $modname;
+ $bids[]=$block->getVar('bid');
+ }
+ array_multisort($modnames, SORT_ASC, $block_arr);
+ foreach (array_keys($block_arr) as $i) {
+ $block_select->addOption("-".$i, $block_arr[$i]['modname'], true);
+ $block_select->addOptionArray($block_arr[$i]['blocks']);
+ //$newblockarray[] = $modules[$i]->getVar('name');
+ //foreach ($block_arr[$i] as $bid => $bname) {
+ //$newblockarray[] = " - ".$bname;
+ //}
+ }
+ //$block_select->addOptionArray($newblockarray);
+ $newform->addElement($block_select);
+ $newform->addElement(new XoopsFormHidden('op', 'new'));
+ $newform->addElement(new XoopsFormHidden('fct', 'blocksadmin'));
+ $newform->addElement(new XoopsFormButton('', 'submit', _ADD, 'submit'));
+ $newform->assign($xoopsTpl);
+
+ $blockform = new XoopsForm('', 'blockform', 'admin.php', 'post', true);
+ $crit = is_object($crit)?(new Criteria("bid", "(".implode(",",$bids).")", "IN")):null;
+ $criteria = new CriteriaCompo($crit);
+ $criteria->setSort('visible ASC, side ASC, weight');
+ $instance_handler =& xoops_gethandler('blockinstance');
+ $instances =& $instance_handler->getObjects($criteria, true, true);
+
+ foreach (array_keys($instances) as $i) {
+ $visiblein = $instances[$i]->getVisibleIn();
+ //quickfix for upgraded installations where visibility was still a yes-no toggle in addition to side selector
+ if ($instances[$i]->getVar('visible') == 0) {
+ $instances[$i]->setVar('side', -1);
+ }
+ $instances[$i] = $instances[$i]->toArray();
+
+ $blockform->addElement(new XoopsFormHidden('id['.$i.']', $i));
+ $instances[$i]['block_name'] = isset($blocks[$instances[$i]['bid']]) ? $blocks[$instances[$i]['bid']]->getVar('name') : "";
+ $instances[$i]['module_name'] = isset($blocks[$instances[$i]['bid']]) ? $modules[$blocks[$instances[$i]['bid']]->getVar('mid')]->getVar('name') : "";
+ $instances[$i]['visiblein'] = $visiblein;
+
+ $xoopsTpl->append('instances', $instances[$i]);
+ }
+ $xoopsTpl->assign('selmod', $_REQUEST["selmod"]);
+ $blockform->addElement(new XoopsFormHidden('selmod', $_REQUEST["selmod"]));
+ $blockform->addElement(new XoopsFormHidden('fct', 'blocksadmin'));
+ $blockform->addElement(new XoopsFormHidden('op', 'order'));
+ $blockform->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
+ $blockform->assign($xoopsTpl);
+
+ $side_options = array(-1 => _AM_NOTVISIBLE, 0 => _AM_SBLEFT, 1 => _AM_SBRIGHT, 3 => _AM_CBLEFT, 4 => _AM_CBRIGHT, 5 => _AM_CBCENTER, );
+ $xoopsTpl->assign('side_options', $side_options);
+
+
+ //Get modules and pages for visible in
+ $module_list[_AM_SYSTEMLEVEL]["0-2"] = _AM_ADMINBLOCK;
+ $module_list[_AM_SYSTEMLEVEL]["0-1"] = _AM_TOPPAGE;
+ $module_list[_AM_SYSTEMLEVEL]["0-0"] = _AM_ALLPAGES;
+
+ $criteria = new CriteriaCompo(new Criteria('hasmain', 1));
+ $criteria->add(new Criteria('isactive', 1));
+ $module_main =& $module_handler->getObjects($criteria, true, true);
+ if (count($module_main) > 0) {
+ foreach (array_keys($module_main) as $mid) {
+ $module_list[$module_main[$mid]->getVar('name')][$mid."-0"] = _AM_ALLMODULEPAGES;
+ $pages = $module_main[$mid]->getInfo("pages");
+ if ($pages == false) {
+ $pages = $module_main[$mid]->getInfo("sub");
+ }
+ if (is_array($pages) && $pages != array()) {
+ foreach ($pages as $id => $pageinfo) {
+ $module_list[$module_main[$mid]->getVar('name')][$mid."-".$id] = $pageinfo['name'];
+ }
+ }
+ }
+ }
+ //ksort($module_list);
+ $xoopsTpl->assign('module_options', $module_list);
+
+ $xoopsOption['template_main'] = 'system_admin_block.html';
+}
+
+function save_block($id, $bside, $bvisible, $bweight, $btitle, $bid, $bcachetime, $bmodule, $groups, $options)
+{
+ $instance_handler =& xoops_gethandler('blockinstance');
+ if ($id > 0) {
+ $instance =& $instance_handler->get($id);
+ }
+ else {
+ $instance =& $instance_handler->create();
+ }
+ //$bvisible = $bside != -1 ? 1 : 0;
+ $instance->setVar('side', $bside);
+ $instance->setVar('weight', $bweight);
+ $instance->setVar('visible', $bvisible);
+ $instance->setVar('title', $btitle);
+ $instance->setVar('bcachetime', $bcachetime);
+ $instance->setVar('bid', $bid);
+ $instance->setVar('options', $options);
+ if ($instance_handler->insert($instance)) {
+ $GLOBALS['xoopsDB']->query("DELETE FROM ".$GLOBALS['xoopsDB']->prefix('block_module_link')." WHERE block_id=".$instance->getVar('instanceid'));
+ foreach ($bmodule as $mid) {
+ $page = explode('-', $mid);
+ $mid = $page[0];
+ $pageid = $page[1];
+ $GLOBALS['xoopsDB']->query("INSERT INTO ".$GLOBALS['xoopsDB']->prefix('block_module_link')." VALUES (".$instance->getVar('instanceid').", ".intval($mid).", ".intval($pageid).")");
+ }
+ $gperm_name = "block_read";
+ $gperm_itemid = $instance->getVar('instanceid');
+
+ $groupperm_handler =& xoops_gethandler('groupperm');
+ $groups_with_access =& $groupperm_handler->getGroupIds($gperm_name, $gperm_itemid);
+
+ $removed_groups = array_diff($groups_with_access, $groups);
+ if (count($removed_groups) > 0) {
+ foreach ($removed_groups as $groupid) {
+ $groupperm_handler->deleteRight($gperm_name, $gperm_itemid, $groupid);
+ }
+ }
+ $new_groups = array_diff($groups, $groups_with_access);
+ if (count($new_groups) > 0) {
+ foreach ($new_groups as $groupid) {
+ $groupperm_handler->addRight($gperm_name, $gperm_itemid, $groupid);
+ }
+ }
+ return true;
+ }
+ return false;
+}
+
+function edit_block($id)
+{
+ echo '<a href="admin.php?fct=blocksadmin&selmod='.$_REQUEST["selmod"].'">'. _AM_BADMIN .'</a> <span style="font-weight:bold;">»»</span> '._AM_EDITBLOCK.'<br /><br />';
+
+ $instance_handler =& xoops_gethandler('blockinstance');
+ $instance =& $instance_handler->get($id);
+ $block_handler =& xoops_gethandler('block');
+ $instance->setBlock($block_handler->get($instance->getVar('bid')));
+
+ include XOOPS_ROOT_PATH.'/modules/system/admin/blocksadmin/blockform.php';
+ $form =& getInstanceForm($instance, _AM_EDITBLOCK, 'save');
+ $form->display();
+}
+
+function delete_block($bid)
+{
+ $instance_handler =& xoops_gethandler('blockinstance');
+ $instance =& $instance_handler->get($bid);
+ xoops_confirm(array('fct' => 'blocksadmin', 'op' => 'delete_ok', 'bid' => $bid, 'selmod' => $_REQUEST["selmod"]), 'admin.php', sprintf(_AM_RUSUREDEL,$instance->getVar('title')));
+}
+
+function delete_block_ok($bid)
+{
+ $instance_handler =& xoops_gethandler('blockinstance');
+ $instance =& $instance_handler->get($bid);
+ $instance_handler->delete($instance);
+
+ redirect_header('admin.php?fct=blocksadmin&selmod='.$_REQUEST["selmod"].'&t='.time(),1,_MD_AM_DBUPDATED);
+ exit();
+}
+
+function order_block($id, $weight, $side, $bmodule)
+{
+ $instance_handler =& xoops_gethandler('blockinstance');
+ $id = array_map('intval', $id);
+ $instances =& $instance_handler->getObjects(new Criteria('instanceid', "(".implode(',', $id).")", "IN"), true);
+
+ $oldpages = array();
+ $sql = "SELECT * FROM ".$GLOBALS['xoopsDB']->prefix('block_module_link');
+ $result = $GLOBALS['xoopsDB']->query($sql);
+ while (list($instanceid, $moduleid, $pageid) = $GLOBALS['xoopsDB']->fetchRow($result)) {
+ $oldpages[$instanceid][$moduleid][] = $pageid;
+ }
+
+ if (count($instances) > 0) {
+ foreach (array_keys($instances) as $i) {
+ $visible = $side[$i] != -1 ? 1 : 0;
+ if ($weight[$i] != $instances[$i]->getVar('weight') || $side[$i] != $instances[$i]->getVar('side') || $visible != $instances[$i]->getVar('visible')) {
+ $instance_handler =& xoops_gethandler('blockinstance');
+ $instances[$i]->setVar('weight', $weight[$i]);
+ $instances[$i]->setVar('visible', $visible);
+ $instances[$i]->setVar('side', $side[$i]);
+ $instance_handler->insert($instances[$i]);
+ }
+
+ if (isset($bmodule[$i])) {
+ foreach ($bmodule[$i] as $mid) {
+ $page = explode('-', $mid);
+ $mid = $page[0];
+ $pageid = $page[1];
+
+ if (!isset($oldpages[$i][$mid]) || !in_array($pageid, $oldpages[$i][$mid])) {
+ $GLOBALS['xoopsDB']->query("INSERT INTO ".$GLOBALS['xoopsDB']->prefix('block_module_link')." VALUES (".$instances[$i]->getVar('instanceid').", ".intval($mid).", ".intval($pageid).")");
+ }
+ $newpages[$i][$mid][] = $pageid;
+ }
+ if (isset($oldpages[$i])) {
+ foreach ($oldpages[$i] as $mid => $pageids) {
+ foreach ($pageids as $oldid) {
+ if (!isset($newpages[$i][$mid]) || !in_array($oldid, $newpages[$i][$mid])) {
+ $GLOBALS['xoopsDB']->query("DELETE FROM ".$GLOBALS['xoopsDB']->prefix('block_module_link')." WHERE block_id=".$instances[$i]->getVar('instanceid')." AND module_id=".$mid." AND pageid = ".intval($oldid));
+ }
+ }
+ }
+ }
+ }
+ else {
+ $GLOBALS['xoopsDB']->query("DELETE FROM ".$GLOBALS['xoopsDB']->prefix('block_module_link')." WHERE block_id=".$instances[$i]->getVar('instanceid'));
+ }
+ }
+ }
+ return true;
+}
+
+function instantiate_block($bid)
+{
+ global $xoopsConfig;
+ xoops_cp_header();
+
+ $instance_handler =& xoops_gethandler('blockinstance');
+ $instance =& $instance_handler->create();
+ $block_handler =& xoops_gethandler('block');
+ $instance->setBlock($block_handler->get($bid));
+
+ echo '<a href="admin.php?fct=blocksadmin&selmod='.$_REQUEST["selmod"].'">'. _AM_BADMIN .'</a> <span style="font-weight:bold;">»»</span> '._AM_ADDBLOCK.'<br /><br />';
+ include XOOPS_ROOT_PATH.'/modules/system/admin/blocksadmin/blockform.php';
+ $form =& getInstanceForm($instance, _AM_ADDBLOCK, 'save');
+ $form->display();
+ xoops_cp_footer();
+ exit();
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/blocksadmin.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/main.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/main.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/main.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,118 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit("Access Denied");
+}
+include XOOPS_ROOT_PATH."/modules/system/admin/blocksadmin/blocksadmin.php";
+
+$op = "list";
+if ( isset($_POST) ) {
+ foreach ( $_POST as $k => $v ) {
+ $$k = $v;
+ }
+}
+
+if ( isset($_GET['op']) ) {
+ if ($_GET['op'] == "edit" || $_GET['op'] == "delete" || $_GET['op'] == "delete_ok" || $_GET['op'] == "new") {
+ $op = $_GET['op'];
+ $bid = isset($_GET['bid']) ? intval($_GET['bid']) : 0;
+ }
+}
+
+$_REQUEST["selmod"]=empty($_REQUEST["selmod"])?0:intval($_REQUEST["selmod"]);
+
+if ( $op == "list" ) {
+ xoops_cp_header();
+ list_blocks();
+ xoops_cp_footer();
+ exit();
+}
+
+if ( $op == "order" ) {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=blocksadmin&selmod=".$_REQUEST["selmod"], 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit();
+ }
+ if (order_block($id, $weight, $side, $module)) {
+ redirect_header("admin.php?fct=blocksadmin&selmod=".$_REQUEST["selmod"],2,_MD_AM_DBUPDATED);
+ }
+ redirect_header("admin.php?fct=blocksadmin&selmod=".$_REQUEST["selmod"], 2, _AM_ERRORDURINGSAVE);
+ exit();
+}
+
+if ( $op == "save" ) {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=blocksadmin&selmod=".$_REQUEST["selmod"], 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit();
+ }
+ if (!isset($instanceid)) {
+ $instanceid = 0;
+ }
+ $options = isset($options) ? $options : array();
+ $bmodule = isset($bmodule) ? $bmodule : array();
+ $groups = isset($groups) ? $groups : array();
+ if (save_block($instanceid, $bside, $bvisible, $bweight, $btitle, $bid, $bcachetime, $bmodule, $groups, $options)) {
+ redirect_header("admin.php?fct=blocksadmin&selmod=".$_REQUEST["selmod"], 2, _MD_AM_DBUPDATED);
+ }
+ redirect_header("admin.php?fct=blocksadmin&selmod=".$_REQUEST["selmod"], 2, _AM_ERRORDURINGSAVE);
+
+ exit();
+}
+
+if ( $op == "delete_ok" ) {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=blocksadmin&selmod=".$_REQUEST["selmod"], 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit();
+ }
+ delete_block_ok($bid);
+ exit();
+}
+
+if ( $op == "delete" ) {
+ xoops_cp_header();
+ delete_block($_REQUEST['id']);
+ xoops_cp_footer();
+ exit();
+}
+
+if ( $op == "edit" ) {
+ xoops_cp_header();
+ edit_block($_REQUEST['id']);
+ xoops_cp_footer();
+ exit();
+}
+
+if ($op == 'new') {
+ instantiate_block($_REQUEST['bid']);
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/main.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/xoops_version.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/xoops_version.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/xoops_version.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,44 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$modversion['name'] = _MD_AM_BKAD;
+$modversion['version'] = "";
+$modversion['description'] = "Side Blocks Administration";
+$modversion['author'] = "";
+$modversion['credits'] = "The MPN SE Project";
+$modversion['help'] = "blocks.html";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 1;
+$modversion['image'] = "blocksadmin.gif";
+$modversion['hasAdmin'] = 1;
+$modversion['adminpath'] = "admin.php?fct=blocksadmin";
+$modversion['category'] = XOOPS_SYSTEM_BLOCK;
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/blocksadmin/xoops_version.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/admin_header.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/admin_header.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/admin_header.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,44 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include '../../../../mainfile.php';
+include XOOPS_ROOT_PATH.'/include/cp_functions.php';
+if (is_object($xoopsUser)) {
+ $module_handler =& xoops_gethandler('module');
+ $xoopsModule =& $module_handler->getByDirname('system');
+ if (!in_array(XOOPS_GROUP_ADMIN, $xoopsUser->getGroups())) {
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_COMMENT, $xoopsUser->getGroups())) {
+ redirect_header(XOOPS_URL.'/', 3, _NOPERM);;
+ exit();
+ }
+ }
+} else {
+ redirect_header(XOOPS_URL.'/', 3, _NOPERM);
+ exit();
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/admin_header.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/comment_delete.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/comment_delete.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/comment_delete.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,29 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+include './admin_header.php';
+include XOOPS_ROOT_PATH.'/include/comment_delete.php';
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/comment_delete.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/comment_edit.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/comment_edit.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/comment_edit.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,29 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+include './admin_header.php';
+include XOOPS_ROOT_PATH.'/include/comment_edit.php';
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/comment_edit.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/comment_post.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/comment_post.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/comment_post.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,29 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+include './admin_header.php';
+include XOOPS_ROOT_PATH.'/include/comment_post.php';
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/comment_post.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/main.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/main.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/main.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,164 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->getVar('mid')) ) {
+ exit("Access Denied");
+} else {
+ $op = 'list';
+ if (isset($_GET['op'])) {
+ $op = trim($_GET['op']);
+ }
+ switch ($op) {
+ case 'list':
+ include_once XOOPS_ROOT_PATH.'/include/comment_constants.php';
+ include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
+ $limit_array = array(10, 20, 50, 100);
+ $status_array = array(XOOPS_COMMENT_PENDING => _CM_PENDING, XOOPS_COMMENT_ACTIVE => _CM_ACTIVE, XOOPS_COMMENT_HIDDEN => _CM_HIDDEN);
+ $status_array2 = array(XOOPS_COMMENT_PENDING => '<span style="text-decoration: none; font-weight: bold; color: #00ff00;">'._CM_PENDING.'</span>', XOOPS_COMMENT_ACTIVE => '<span style="text-decoration: none; font-weight: bold; color: #ff0000;">'._CM_ACTIVE.'</span>', XOOPS_COMMENT_HIDDEN => '<span style="text-decoration: none; font-weight: bold; color: #0000ff;">'._CM_HIDDEN.'</span>');
+ $start = 0;
+ $limit = 0;
+ $otherorder = 'DESC';
+ $comments = array();
+ $status = (!isset($_GET['status']) || !in_array(intval($_GET['status']), array_keys($status_array))) ? 0 : intval($_GET['status']);
+ $module = !isset($_GET['module']) ? 0 : intval($_GET['module']);
+ $module_handler =& xoops_gethandler('module');
+ $module_array =& $module_handler->getList(new Criteria('hascomments', 1));
+ $comment_handler =& xoops_gethandler('comment');
+ $criteria = new CriteriaCompo();
+ if ($status > 0) {
+ $criteria->add(new Criteria('com_status', $status));
+ }
+ if ($module > 0) {
+ $criteria->add(new Criteria('com_modid', $module));
+ }
+ $total = $comment_handler->getCount($criteria);
+ if ($total > 0) {
+ $start = isset($_GET['start']) ? intval($_GET['start']) : 0;
+ $limit = isset($_GET['limit']) ? intval($_GET['limit']) : 0;
+ if (!in_array($limit, $limit_array)) {
+ $limit = 50;
+ }
+ $sort = (!isset($_GET['sort']) || !in_array($_GET['sort'], array('com_modid', 'com_status', 'com_created', 'com_uid', 'com_ip', 'com_title'))) ? 'com_id' : $_GET['sort'];
+ if (!isset($_GET['order']) || $_GET['order'] != 'ASC') {
+ $order = 'DESC';
+ $otherorder = 'ASC';
+ } else {
+ $order = 'ASC';
+ $otherorder = 'DESC';
+ }
+ $criteria->setSort($sort);
+ $criteria->setOrder($order);
+ $criteria->setLimit($limit);
+ $criteria->setStart($start);
+ $comments =& $comment_handler->getObjects($criteria, true);
+ }
+ $form = '<form action="admin.php" method="get">';
+ $form .= '<select name="module">';
+ $module_array[0] = _MD_AM_ALLMODS;
+ foreach ($module_array as $k => $v) {
+ $sel = '';
+ if ($k == $module) {
+ $sel = ' selected="selected"';
+ }
+ $form .= '<option value="'.$k.'"'.$sel.'>'.$v.'</option>';
+ }
+ $form .= '</select> <select name="status">';
+ $status_array[0] = _MD_AM_ALLSTATUS;
+ foreach ($status_array as $k => $v) {
+ $sel = '';
+ if (isset($status) && $k == $status) {
+ $sel = ' selected="selected"';
+ }
+ $form .= '<option value="'.$k.'"'.$sel.'>'.$v.'</option>';
+ }
+ $form .= '</select> <select name="limit">';
+ foreach ($limit_array as $k) {
+ $sel = '';
+ if (isset($limit) && $k == $limit) {
+ $sel = ' selected="selected"';
+ }
+ $form .= '<option value="'.$k.'"'.$sel.'>'.$k.'</option>';
+ }
+ $form .= '</select> <input type="hidden" name="fct" value="comments" /><input type="submit" value="'._GO.'" name="selsubmit" /></form>';
+
+ xoops_cp_header();
+ echo '<h4 style="text-align:left">'._MD_AM_COMMMAN.'</h4>';
+ echo $form;
+ echo '<table width="100%" class="outer" cellspacing="1"><tr><th colspan="8">'._MD_AM_LISTCOMM.'</th></tr><tr align="center"><td class="head"> </td><td class="head" align="left"><a href="admin.php?fct=comments&op=list&sort=com_title&order='.$otherorder.'&module='.$module.'&status='.$status.'&start='.$start.'&limit='.$limit.'">'._CM_TITLE.'</a></td><td class="head"><a href="admin.php?fct=comments&op=list&sort=com_created&order='.$otherorder.'&module='.$module.'&status='.$status.'&start='.$start.'&limit='.$limit.'">'._CM_POSTED.'</a></td><td class="head"><a href="admin.php?fct=comments&op=list&sort=com_uid&order='.$otherorder.'&module='.$module.'&status='.$status.'&start='.$start.'&limit='.$limit.'">'._CM_POSTER.'</a></td><td class="head"><a href="admin.php?fct=comments&op=list&sort=com_ip&order='.$otherorder.'&module='.$module.'&status='.$status.'&start='.$!
start.'&limit='.$limit.'">IP</a></td><td class="head"><a href="admin.php?fct=comments&op=list&sort=com_modid&order='.$otherorder.'&module='.$module.'&status='.$status.'&start='.$start.'&limit='.$limit.'">'._MD_AM_MODULE.'</a></td><td class="head"><a href="admin.php?fct=comments&op=list&sort=com_status&order='.$otherorder.'&module='.$module.'&status='.$status.'&start='.$start.'&limit='.$limit.'">'._CM_STATUS.'</a></td><td class="head"> </td></tr>';
+ $class = 'even';
+ foreach (array_keys($comments) as $i) {
+ $class = ($class == 'odd') ? 'even' : 'odd';
+ $poster_uname = $xoopsConfig['anonymous'];
+ if ($comments[$i]->getVar('com_uid') > 0) {
+ $poster =& $member_handler->getUser($comments[$i]->getVar('com_uid'));
+ if (is_object($poster)) {
+ $poster_uname = '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$comments[$i]->getVar('com_uid').'">'.$poster->getVar('uname').'</a>';
+ }
+ }
+ $icon = $comments[$i]->getVar('com_icon');
+ $icon = empty( $icon ) ? '/images/icons/no_posticon.gif' : ( '/images/subject/' . htmlspecialchars( $icon, ENT_QUOTES ) );
+ $icon = '<img src="' . XOOPS_URL . $icon . '" alt="" />';
+
+ echo '<tr align="center"><td class="'.$class.'">'.$icon.'</td><td class="'.$class.'" align="left"><a href="admin.php?fct=comments&op=jump&com_id='.$i.'">'. $comments[$i]->getVar('com_title').'</a></td><td class="'.$class.'">'.formatTimestamp($comments[$i]->getVar('com_created'), 'm').'</td><td class="'.$class.'">'.$poster_uname.'</td><td class="'.$class.'">'.$comments[$i]->getVar('com_ip').'</td><td class="'.$class.'">'.$module_array[$comments[$i]->getVar('com_modid')].'</td><td class="'.$class.'">'.$status_array2[$comments[$i]->getVar('com_status')].'</td><td class="'.$class.'" align="right"><a href="admin/comments/comment_edit.php?com_id='.$i.'">'._EDIT.'</a> <a href="admin/comments/comment_delete.php?com_id='.$i.'">'._DELETE.'</a></td></tr>';
+ }
+ echo '</table>';
+ echo '<table style="width: 100%; border: 0; margin: 3px; padding: 3px;"><tr><td>'.sprintf(_MD_AM_COMFOUND, '<b>'.$total.'</b>');
+ if ($total > $limit) {
+ include_once XOOPS_ROOT_PATH.'/class/pagenav.php';
+ $nav = new XoopsPageNav($total, $limit, $start, 'start', 'fct=comments&op=list&limit='.$limit.'&sort='.$sort.'&order='.$order.'&module='.$module);
+ echo '</td><td align="right">'.$nav->renderNav();
+ }
+ echo '</td></tr></table>';
+ xoops_cp_footer();
+ break;
+
+ case 'jump':
+ $com_id = (isset($_GET['com_id'])) ? intval($_GET['com_id']) : 0;
+ if ($com_id > 0) {
+ $comment_handler =& xoops_gethandler('comment');
+ $comment =& $comment_handler->get($com_id);
+ if (is_object($comment)) {
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->get($comment->getVar('com_modid'));
+ $comment_config = $module->getInfo('comments');
+ header('Location: '.XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$comment_config['pageName'].'?'.$comment_config['itemName'].'='.$comment->getVar('com_itemid').'&com_id='.$comment->getVar('com_id').'&com_rootid='.$comment->getVar('com_rootid').'&com_mode=thread&'.str_replace('&', '&', $comment->getVar('com_exparams')).'#comment'.$comment->getVar('com_id'));
+ exit();
+ }
+ }
+ redirect_header('admin.php?fct=comments', 1);
+ break;
+
+ default:
+ break;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/main.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/xoops_version.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/xoops_version.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/xoops_version.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,45 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$modversion['name'] = _MD_AM_COMMENTS;
+$modversion['version'] = "";
+$modversion['description'] = "XOOPS Site Comment Manager";
+$modversion['author'] = "";
+$modversion['credits'] = "The XOOPS Project";
+$modversion['help'] = "comments.html";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 1;
+$modversion['image'] = "comments.gif";
+
+$modversion['hasAdmin'] = 1;
+$modversion['adminpath'] = "admin.php?fct=comments";
+$modversion['category'] = XOOPS_SYSTEM_COMMENT;
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/comments/xoops_version.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/findusers/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/findusers/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/findusers/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/findusers/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/findusers/main.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/findusers/main.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/findusers/main.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,331 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit("Access Denied");
+}
+$op = "form";
+
+if ( isset($_POST['op']) && $_POST['op'] == "submit" ) {
+ $op = "submit";
+}
+
+xoops_cp_header();
+//OpenTable();
+
+if ( $op == "form" ) {
+ $member_handler =& xoops_gethandler('member');
+ $acttotal = $member_handler->getUserCount(new Criteria('level', 0, '>'));
+ $inacttotal = $member_handler->getUserCount(new Criteria('level', 0));
+ include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+ $uname_text = new XoopsFormText("", "user_uname", 30, 60);
+ $uname_match = new XoopsFormSelectMatchOption("", "user_uname_match");
+ $uname_tray = new XoopsFormElementTray(_AM_UNAME, " ");
+ $uname_tray->addElement($uname_match);
+ $uname_tray->addElement($uname_text);
+ $name_text = new XoopsFormText("", "user_name", 30, 60);
+ $name_match = new XoopsFormSelectMatchOption("", "user_name_match");
+ $name_tray = new XoopsFormElementTray(_AM_REALNAME, " ");
+ $name_tray->addElement($name_match);
+ $name_tray->addElement($name_text);
+ $email_text = new XoopsFormText("", "user_email", 30, 60);
+ $email_match = new XoopsFormSelectMatchOption("", "user_email_match");
+ $email_tray = new XoopsFormElementTray(_AM_EMAIL, " ");
+ $email_tray->addElement($email_match);
+ $email_tray->addElement($email_text);
+ $lastlog_more = new XoopsFormText(_AM_LASTLOGMORE, "user_lastlog_more", 10, 5);
+ $lastlog_less = new XoopsFormText(_AM_LASTLOGLESS, "user_lastlog_less", 10, 5);
+ $reg_more = new XoopsFormText(_AM_REGMORE, "user_reg_more", 10, 5);
+ $reg_less = new XoopsFormText(_AM_REGLESS, "user_reg_less", 10, 5);
+ $posts_more = new XoopsFormText(_AM_POSTSMORE, "user_posts_more", 10, 5);
+ $posts_less = new XoopsFormText(_AM_POSTSLESS, "user_posts_less", 10, 5);
+ $mailok_radio = new XoopsFormRadio(_AM_SHOWMAILOK, "user_mailok", "both");
+ $mailok_radio->addOptionArray(array("mailok"=>_AM_MAILOK, "mailng"=>_AM_MAILNG, "both"=>_AM_BOTH));
+ $type_radio = new XoopsFormRadio(_AM_SHOWTYPE, "user_type", "actv");
+ $type_radio->addOptionArray(array("actv"=>_AM_ACTIVE, "inactv"=>_AM_INACTIVE, "both"=>_AM_BOTH));
+ $sort_select = new XoopsFormSelect(_AM_SORT, "user_sort");
+ $sort_select->addOptionArray(array("uname"=>_AM_UNAME,"email"=>_AM_EMAIL,"last_login"=>_AM_LASTLOGIN,"user_regdate"=>_AM_REGDATE,"posts"=>_AM_POSTS));
+ $order_select = new XoopsFormSelect(_AM_ORDER, "user_order");
+ $order_select->addOptionArray(array("ASC"=>_AM_ASC,"DESC"=>_AM_DESC));
+ $limit_text = new XoopsFormText(_AM_LIMIT, "limit", 6, 2);
+ $fct_hidden = new XoopsFormHidden("fct", "findusers");
+ $op_hidden = new XoopsFormHidden("op", "submit");
+ $submit_button = new XoopsFormButton("", "user_submit", _SUBMIT, "submit");
+
+ $form = new XoopsThemeForm(_AM_FINDUS, "uesr_findform", "admin.php");
+ $form->addElement($uname_tray);
+ $form->addElement($name_tray);
+ $form->addElement($email_tray);
+ $form->addElement($lastlog_more);
+ $form->addElement($lastlog_less);
+ $form->addElement($reg_more);
+ $form->addElement($reg_less);
+ $form->addElement($posts_more);
+ $form->addElement($posts_less);
+ $form->addElement($mailok_radio);
+ $form->addElement($type_radio);
+ $form->addElement($sort_select);
+ $form->addElement($order_select);
+ $form->addElement($fct_hidden);
+ $form->addElement($limit_text);
+ $form->addElement($op_hidden);
+ // if this is to find users for a specific group
+ if ( !empty($_GET['group']) && intval($_GET['group']) > 0 ) {
+ $group_hidden = new XoopsFormHidden("group", intval($_GET['group']));
+ $form->addElement($group_hidden);
+ }
+ $form->addElement($submit_button);
+ echo "<h4 style='text-align:left;'>"._AM_FINDUS."</h4>(".sprintf(_AM_ACTUS, "<span style='color:#ff0000;'>$acttotal</span>")." ".sprintf(_AM_INACTUS, "<span style='color:#ff0000;'>$inacttotal</span>").")";
+ $form->display();
+}
+
+elseif ($op == "submit") {
+ $myts =& MyTextSanitizer::getInstance();
+ $criteria = new CriteriaCompo();
+ if ( !empty($_POST['user_uname']) ) {
+ $match = (!empty($_POST['user_uname_match'])) ? intval($_POST['user_uname_match']) : XOOPS_MATCH_START;
+ switch ($match) {
+ case XOOPS_MATCH_START:
+ $criteria->add(new Criteria('uname', $myts->addSlashes(trim($_POST['user_uname'])).'%', 'LIKE'));
+ break;
+ case XOOPS_MATCH_END:
+ $criteria->add(new Criteria('uname', '%'.$myts->addSlashes(trim($_POST['user_uname'])), 'LIKE'));
+ break;
+ case XOOPS_MATCH_EQUAL:
+ $criteria->add(new Criteria('uname', $myts->addSlashes(trim($_POST['user_uname']))));
+ break;
+ case XOOPS_MATCH_CONTAIN:
+ $criteria->add(new Criteria('uname', '%'.$myts->addSlashes(trim($_POST['user_uname'])).'%', 'LIKE'));
+ break;
+ }
+ }
+ if ( !empty($_POST['user_name']) ) {
+ $match = (!empty($_POST['user_name_match'])) ? intval($_POST['user_name_match']) : XOOPS_MATCH_START;
+ switch ($match) {
+ case XOOPS_MATCH_START:
+ $criteria->add(new Criteria('name', $myts->addSlashes(trim($_POST['user_name'])).'%', 'LIKE'));
+ break;
+ case XOOPS_MATCH_END:
+ $criteria->add(new Criteria('name', '%'.$myts->addSlashes(trim($_POST['user_name'])), 'LIKE'));
+ break;
+ case XOOPS_MATCH_EQUAL:
+ $criteria->add(new Criteria('name', $myts->addSlashes(trim($_POST['user_name']))));
+ break;
+ case XOOPS_MATCH_CONTAIN:
+ $criteria->add(new Criteria('name', '%'.$myts->addSlashes(trim($_POST['user_name'])).'%', 'LIKE'));
+ break;
+ }
+ }
+ if ( !empty($_POST['user_email']) ) {
+ $match = (!empty($_POST['user_email_match'])) ? intval($_POST['user_email_match']) : XOOPS_MATCH_START;
+ switch ($match) {
+ case XOOPS_MATCH_START:
+ $criteria->add(new Criteria('email', $myts->addSlashes(trim($_POST['user_email'])).'%', 'LIKE'));
+ break;
+ case XOOPS_MATCH_END:
+ $criteria->add(new Criteria('email', '%'.$myts->addSlashes(trim($_POST['user_email'])), 'LIKE'));
+ break;
+ case XOOPS_MATCH_EQUAL:
+ $criteria->add(new Criteria('email', $myts->addSlashes(trim($_POST['user_email']))));
+ break;
+ case XOOPS_MATCH_CONTAIN:
+ $criteria->add(new Criteria('email', '%'.$myts->addSlashes(trim($_POST['user_email'])).'%', 'LIKE'));
+ break;
+ }
+ }
+
+ if ( !empty($_POST['user_lastlog_more']) && is_numeric($_POST['user_lastlog_more']) ) {
+ $f_user_lastlog_more = intval(trim($_POST['user_lastlog_more']));
+ $time = time() - (60 * 60 * 24 * $f_user_lastlog_more);
+ if ( $time > 0 ) {
+ $criteria->add(new Criteria('last_login', $time, '<'));
+ }
+ }
+ if ( !empty($_POST['user_lastlog_less']) && is_numeric($_POST['user_lastlog_less']) ) {
+ $f_user_lastlog_less = intval(trim($_POST['user_lastlog_less']));
+ $time = time() - (60 * 60 * 24 * $f_user_lastlog_less);
+ if ( $time > 0 ) {
+ $criteria->add(new Criteria('last_login', $time, '>'));
+ }
+ }
+ if ( !empty($_POST['user_reg_more']) && is_numeric($_POST['user_reg_more']) ) {
+ $f_user_reg_more = intval(trim($_POST['user_reg_more']));
+ $time = time() - (60 * 60 * 24 * $f_user_reg_more);
+ if ( $time > 0 ) {
+ $criteria->add(new Criteria('user_regdate', $time, '<'));
+ }
+ }
+ if ( !empty($_POST['user_reg_less']) && is_numeric($_POST['user_reg_less']) ) {
+ $f_user_reg_less = intval($_POST['user_reg_less']);
+ $time = time() - (60 * 60 * 24 * $f_user_reg_less);
+ if ( $time > 0 ) {
+ $criteria->add(new Criteria('user_regdate', $time, '>'));
+ }
+ }
+ if ( !empty($_POST['user_posts_more']) && is_numeric($_POST['user_posts_more']) ) {
+ $criteria->add(new Criteria('posts', intval($_POST['user_posts_more']), '>'));
+ }
+ if ( !empty($_POST['user_posts_less']) && is_numeric($_POST['user_posts_less']) ) {
+ $criteria->add(new Criteria('posts', intval($_POST['user_posts_less']), '<'));
+ }
+ if ( isset($_POST['user_mailok']) ) {
+ if ( $_POST['user_mailok'] == "mailng" ) {
+ $criteria->add(new Criteria('user_mailok', 0));
+ } elseif ( $_POST['user_mailok'] == "mailok" ) {
+ $criteria->add(new Criteria('user_mailok', 1));
+ } else {
+ $criteria->add(new Criteria('user_mailok', 0, '>='));
+ }
+ }
+ if ( isset($_POST['user_type']) ) {
+ if ( $_POST['user_type'] == "inactv" ) {
+ $criteria->add(new Criteria('level', 0, '='));
+ } elseif ( $_POST['user_type'] == "actv" ) {
+ $criteria->add(new Criteria('level', 0, '>'));
+ } else {
+ $criteria->add(new Criteria('level', 0, '>='));
+ }
+ }
+
+ $validsort = array("uname", "email", "last_login", "user_regdate", "posts");
+ $sort = (!in_array($_POST['user_sort'], $validsort)) ? "uname" : $_POST['user_sort'];
+ $order = "ASC";
+ if ( isset($_POST['user_order']) && $_POST['user_order'] == "DESC") {
+ $order = "DESC";
+ }
+ $limit = (!empty($_POST['limit'])) ? intval($_POST['limit']) : 50;
+ if ( $limit == 0 || $limit > 50 ) {
+ $limit = 50;
+ }
+ $start = (!empty($_POST['start'])) ? intval($_POST['start']) : 0;
+ $member_handler =& xoops_gethandler('member');
+ $total = $member_handler->getUserCount($criteria);
+ echo "<a href='admin.php?fct=findusers&op=form'>". _AM_FINDUS ."</a> <span style='font-weight:bold;'>»»</span> ". _AM_RESULTS."<br /><br />";
+ if ( $total == 0 ) {
+ echo "<h4>"._AM_NOFOUND,"</h4>";
+ } elseif ( $start < $total ) {
+ echo sprintf(_AM_USERSFOUND, $total)."<br />";
+ echo "<form action='admin.php' method='post' name='memberslist' id='memberslist'><input type='hidden' name='op' value='delete_many' />
+ <table width='100%' border='0' cellspacing='1' cellpadding='4' class='outer'><tr><th align='center'><input type='checkbox' name='memberslist_checkall' id='memberslist_checkall' onclick='xoopsCheckAll(\"memberslist\", \"memberslist_checkall\");' /></th><th align='center'>"._AM_AVATAR."</th><th align='center'>"._AM_UNAME."</th><th align='center'>"._AM_REALNAME."</th><th align='center'>"._AM_EMAIL."</th><th align='center'>"._AM_REGDATE."</th><th align='center'>"._AM_LASTLOGIN."</th><th align='center'>"._AM_POSTS."</th></tr>";
+ $criteria->setSort($sort);
+ $criteria->setOrder($order);
+ $criteria->setLimit($limit);
+ $criteria->setStart($start);
+ $foundusers =& $member_handler->getUsers($criteria, true);
+ $ucount = 0;
+ foreach (array_keys($foundusers) as $j) {
+ if ($ucount % 2 == 0) {
+ $class = 'even';
+ } else {
+ $class = 'odd';
+ }
+ $ucount++;
+ $fuser_avatar = $foundusers[$j]->getVar("user_avatar") ? "<img src='".XOOPS_UPLOAD_URL."/".$foundusers[$j]->getVar("user_avatar")."' alt='' />" : " ";
+ $fuser_name = $foundusers[$j]->getVar("uname") ? $foundusers[$j]->getVar("uname") : " ";
+ echo "<tr class='$class'><td align='center'><input type='checkbox' name='memberslist_id[]' id='memberslist_id[]' value='".$foundusers[$j]->getVar("uid")."' /><input type='hidden' name='memberslist_uname[".$foundusers[$j]->getVar("uid")."]' id='memberslist_uname[]' value='".$foundusers[$j]->getVar("uname")."' /></td>";
+ echo "<td>$fuser_avatar</td><td><a href='".XOOPS_URL."/userinfo.php?uid=".$foundusers[$j]->getVar("uid")."'>".$foundusers[$j]->getVar("uname")."</a></td><td>".$fuser_name."</td><td align='center'><a href='mailto:".$foundusers[$j]->getVar("email")."'><img src='".XOOPS_URL."/images/icons/email.gif' border='0' alt='";
+ printf(_SENDEMAILTO,$foundusers[$j]->getVar("uname", "E"));
+ echo "' /></a></td><td align='center'>".formatTimeStamp($foundusers[$j]->getVar("user_regdate"),"s")."</td><td align='center'>";
+ if ( $foundusers[$j]->getVar("last_login") != 0 ) {
+ echo formatTimeStamp($foundusers[$j]->getVar("last_login"),"m");
+ } else {
+ echo " ";
+ }
+ echo "</td><td align='center'>".$foundusers[$j]->getVar("posts")."</td>";
+ echo "</tr>\n";
+ }
+ //echo "<tr class='foot'><td><select name='fct'><option value='users'>"._DELETE."</option><option value='mailusers'>"._AM_SENDMAIL."</option>";
+ echo "<tr class='foot'><td><select name='fct'><option value='mailusers'>"._AM_SENDMAIL."</option>";
+ $group = !empty($_POST['group']) ? intval($_POST['group']) : 0;
+ if ( $group > 0 ) {
+ $member_handler =& xoops_gethandler('member');
+ $add2group =& $member_handler->getGroup($group);
+ echo "<option value='groups' selected='selected'>".sprintf(_AM_ADD2GROUP, $add2group->getVar('uname'))."</option>";
+ }
+ echo "</select> ";
+ if ( $group > 0 ) {
+ echo "<input type='hidden' name='groupid' value='".$group."' />";
+ }
+ echo "</td><td colspan='10'>".$GLOBALS['xoopsSecurity']->getTokenHTML()."<input type='submit' value='"._SUBMIT."' /></td></tr></table></form>\n";
+ $totalpages = ceil($total / $limit);
+ if ( $totalpages > 1 ) {
+ $hiddenform = "<form name='findnext' action='admin.php' method='post'>";
+ foreach ( $_POST as $k => $v ) {
+ if ($k == 'XOOPS_TOKEN_REQUEST') {
+ // regenerate token value
+ $hiddenform .= $GLOBALS['xoopsSecurity']->getTokenHTML()."\n";
+ } else {
+ $hiddenform .= "<input type='hidden' name='".$myts->htmlSpecialChars($k)."' value='".$myts->htmlSpecialChars($myts->stripSlashesGPC($v))."' />\n";
+ }
+ }
+ if (!isset($_POST['limit'])) {
+ $hiddenform .= "<input type='hidden' name='limit' value='".$limit."' />\n";
+ }
+ if (!isset($_POST['start'])) {
+ $hiddenform .= "<input type='hidden' name='start' value='".$start."' />\n";
+ }
+ $prev = $start - $limit;
+ if ( $start - $limit >= 0 ) {
+ $hiddenform .= "<a href='#0' onclick='javascript:document.findnext.start.value=".$prev.";document.findnext.submit();'>"._AM_PREVIOUS."</a> \n";
+ }
+ $counter = 1;
+ $currentpage = ($start+$limit) / $limit;
+ while ( $counter <= $totalpages ) {
+ if ( $counter == $currentpage ) {
+ $hiddenform .= "<b>".$counter."</b> ";
+ } elseif ( ($counter > $currentpage-4 && $counter < $currentpage+4) || $counter == 1 || $counter == $totalpages ) {
+ if ( $counter == $totalpages && $currentpage < $totalpages-4 ) {
+ $hiddenform .= "... ";
+ }
+ $hiddenform .= "<a href='#".$counter."' onclick='javascript:document.findnext.start.value=".($counter-1)*$limit.";document.findnext.submit();'>".$counter."</a> ";
+ if ( $counter == 1 && $currentpage > 5 ) {
+ $hiddenform .= "... ";
+ }
+ }
+ $counter++;
+ }
+ $next = $start+$limit;
+ if ( $total > $next ) {
+ $hiddenform .= " <a href='#".$total."' onclick='javascript:document.findnext.start.value=".$next.";document.findnext.submit();'>"._AM_NEXT."</a>\n";
+ }
+ $hiddenform .= "</form>";
+ echo "<div style='text-align:center'>".$hiddenform."<br />";
+ printf(_AM_USERSFOUND, $total);
+ echo "</div>";
+ }
+ }
+}
+else {
+ redirect_header('admin.php?fct=findusers', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+}
+//CloseTable();
+xoops_cp_footer();
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/findusers/main.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/findusers/xoops_version.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/findusers/xoops_version.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/findusers/xoops_version.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,45 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$modversion['name'] = _MD_AM_FINDUSER;
+$modversion['version'] = "";
+$modversion['description'] = "Find Users";
+$modversion['author'] = "Kazumi Ono<br>( http://www.myweb.ne.jp/ )";
+$modversion['credits'] = "The XOOPS Project";
+$modversion['help'] = "findusers.html";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 1;
+$modversion['image'] = "users.gif";
+
+$modversion['hasAdmin'] = 1;
+$modversion['adminpath'] = "admin.php?fct=findusers";
+$modversion['category'] = XOOPS_SYSTEM_FINDU;
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/findusers/xoops_version.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groupperm.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groupperm.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groupperm.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,77 @@
+<?php
+// $Id$
+$xoopsOption['pagetype'] = 'admin';
+include '../../../include/cp_header.php';
+$modid = isset($_POST['modid']) ? intval($_POST['modid']) : 0;
+
+// we dont want system module permissions to be changed here
+if ($modid <= 1 || !is_object($xoopsUser) || !$xoopsUser->isAdmin($modid)) {
+ redirect_header(XOOPS_URL.'/index.php', 1, _NOPERM);
+ exit();
+}
+$module_handler =& xoops_gethandler('module');
+$module =& $module_handler->get($modid);
+if (!is_object($module) || !$module->getVar('isactive')) {
+ redirect_header(XOOPS_URL.'/admin.php', 1, _MODULENOEXIST);
+ exit();
+}
+
+$groupperm_handler =& xoops_gethandler('groupperm');
+if (!$groupperm_handler->checkRight('module_admin', $modid, $xoopsUser->getGroups())) {
+ redirect_header(XOOPS_URL.'/admin.php', 1, _NOPERM);
+ exit();
+}
+
+$member_handler =& xoops_gethandler('member');
+$group_list =& $member_handler->getGroupList();
+if (is_array($_POST['perms']) && !empty($_POST['perms'])) {
+ $gperm_handler = xoops_gethandler('groupperm');
+ foreach ($_POST['perms'] as $perm_name => $perm_data) {
+ if (false != $gperm_handler->deleteByModule($modid, $perm_name)) {
+ foreach ($perm_data['groups'] as $group_id => $item_ids) {
+ foreach ($item_ids as $item_id => $selected) {
+ if ($selected == 1) {
+ // make sure that all parent ids are selected as well
+ if ($perm_data['parents'][$item_id] != '') {
+ $parent_ids = explode(':', $perm_data['parents'][$item_id]);
+ foreach ($parent_ids as $pid) {
+ if ($pid != 0 && !in_array($pid, array_keys($item_ids))) {
+ // one of the parent items were not selected, so skip this item
+ $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>').' ('._MD_AM_PERMADDNGP.')';
+ continue 2;
+ }
+ }
+ }
+ $gperm =& $gperm_handler->create();
+ $gperm->setVar('gperm_groupid', $group_id);
+ $gperm->setVar('gperm_name', $perm_name);
+ $gperm->setVar('gperm_modid', $modid);
+ $gperm->setVar('gperm_itemid', $item_id);
+ if (!$gperm_handler->insert($gperm)) {
+ $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>');
+ } else {
+ $msg[] = sprintf(_MD_AM_PERMADDOK, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>');
+ }
+ unset($gperm);
+ }
+ }
+ }
+ } else {
++ $msg[] = sprintf(_MD_AM_PERMRESETNG, $module->getVar('name').'('.$perm_name.')');
+ }
+ }
+}
+
+$backlink = XOOPS_URL.'/admin.php';
+if ($module->getVar('hasadmin')) {
+ $adminindex = isset($_POST['redirect_url']) ? $_POST['redirect_url'] : $module->getInfo('adminindex');
+ if ($adminindex) {
+ $backlink = XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$adminindex;
+ }
+}
+
+$msg[] = '<br /><br /><a href="'.$backlink.'">'._BACK.'</a>';
+xoops_cp_header();
+xoops_result($msg);
+xoops_cp_footer();
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groupperm.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/groupform.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/groupform.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/groupform.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,117 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+
+$name_text = new XoopsFormText(_AM_NAME, "name", 30, 50, $name_value);
+$desc_text = new XoopsFormTextArea(_AM_DESCRIPTION, "desc", $desc_value);
+
+$s_cat_checkbox = new XoopsFormCheckBox(_AM_SYSTEMRIGHTS, "system_catids[]", $s_cat_value);
+//if (isset($s_cat_disable) && $s_cat_disable) {
+// $s_cat_checkbox->setExtra('checked="checked" disabled="disabled"');
+//}
+include_once(XOOPS_ROOT_PATH.'/modules/system/constants.php');
+$handle = opendir(XOOPS_ROOT_PATH.'/modules/system/admin');
+while (false != $file = readdir($handle)) {
+ if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir(XOOPS_ROOT_PATH.'/modules/system/admin/'.$file)) {
+ include XOOPS_ROOT_PATH.'/modules/system/admin/'.$file.'/xoops_version.php';
+ if (!empty($modversion['category'])) {
+ $s_cat_checkbox->addOption($modversion['category'], $modversion['name']);
+ }
+ unset($modversion);
+ }
+}
+
+$a_mod_checkbox = new XoopsFormCheckBox(_AM_ACTIVERIGHTS, "admin_mids[]", $a_mod_value);
+$module_handler =& xoops_gethandler('module');
+$criteria = new CriteriaCompo(new Criteria('hasadmin', 1));
+$criteria->add(new Criteria('isactive', 1));
+$criteria->add(new Criteria('dirname', 'system', '<>'));
+$a_mod_checkbox->addOptionArray($module_handler->getList($criteria));
+
+$r_mod_checkbox = new XoopsFormCheckBox(_AM_ACCESSRIGHTS, "read_mids[]", $r_mod_value);
+$criteria = new CriteriaCompo(new Criteria('hasmain', 1));
+$criteria->add(new Criteria('isactive', 1));
+$r_mod_checkbox->addOptionArray($module_handler->getList($criteria));
+
+$r_lblock_checkbox = new XoopsFormCheckBox('<b>'._LEFT.'</b><br />', "read_bids[]", $r_block_value);
+$r_cblock_checkbox = new XoopsFormCheckBox("<b>"._CENTER."</b><br />", "read_bids[]", $r_block_value);
+$r_rblock_checkbox = new XoopsFormCheckBox("<b>"._RIGHT."</b><br />", "read_bids[]", $r_block_value);
+
+$instance_handler =& xoops_gethandler('blockinstance');
+$instance_array = $instance_handler->getObjects(null, true);
+if (count($instance_array) > 0 ) {
+ foreach ($instance_array as $key => $instance) {
+ $value = "<a href='".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&op=edit&bid=".$key."'>".$instance->getVar('title')." (ID: ".$key.")</a>";
+
+ switch ($instance->getVar('side')) {
+ case XOOPS_SIDEBLOCK_LEFT:
+ $r_lblock_checkbox->addOption($key, $value);
+ break;
+
+ case XOOPS_CENTERBLOCK_LEFT:
+ case XOOPS_CENTERBLOCK_CENTER:
+ case XOOPS_CENTERBLOCK_RIGHT:
+ $r_cblock_checkbox->addOption($key, $value);
+ break;
+ case XOOPS_SIDEBLOCK_RIGHT:
+ $r_rblock_checkbox->addOption($key, $value);
+ break;
+ }
+ }
+
+ $r_block_tray = new XoopsFormElementTray(_AM_BLOCKRIGHTS, "<br /><br />");
+ $r_block_tray->addElement($r_lblock_checkbox);
+ $r_block_tray->addElement($r_cblock_checkbox);
+ $r_block_tray->addElement($r_rblock_checkbox);
+}
+$op_hidden = new XoopsFormHidden("op", $op_value);
+$fct_hidden = new XoopsFormHidden("fct", "groups");
+$submit_button = new XoopsFormButton("", "groupsubmit", $submit_value, "submit");
+$form = new XoopsThemeForm($form_title, "groupform", "admin.php", "post", true);
+$form->addElement($name_text);
+$form->addElement($desc_text);
+$form->addElement($s_cat_checkbox);
+$form->addElement($a_mod_checkbox);
+$form->addElement($r_mod_checkbox);
+if (isset($r_block_tray)) {
+ $form->addElement($r_block_tray);
+}
+$form->addElement($op_hidden);
+$form->addElement($fct_hidden);
+if ( !empty($g_id_value) ) {
+ $g_id_hidden = new XoopsFormHidden("g_id", $g_id_value);
+ $form->addElement($g_id_hidden);
+}
+$form->addElement($submit_button);
+$form->setRequired($name_text);
+$form->display();
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/groupform.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/groups.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/groups.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/groups.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,200 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit("Access Denied");
+}
+
+/*********************************************************/
+/* Admin/Authors Functions */
+/*********************************************************/
+function displayGroups()
+{
+ xoops_cp_header();
+ //OpenTable();
+ echo "<h4 style='text-align:left'>"._AM_EDITADG."</h4>";
+ $member_handler =& xoops_gethandler('member');
+ $groups =& $member_handler->getGroups();
+ echo "<table class='outer' width='40%' cellpadding='4' cellspacing='1'><tr><th colspan='2'>"._AM_EDITADG."</th></tr>";
+ $count = count($groups);
+ for ($i = 0; $i < $count; $i++) {
+ $id = $groups[$i]->getVar('groupid');
+ echo '<tr><td class="head">'.$groups[$i]->getVar('name').'</td>';
+ echo '<td class="even"><a href="admin.php?fct=groups&op=modify&g_id='.$id.'">'._AM_MODIFY.'</a>';
+ if (XOOPS_GROUP_ADMIN == $id || XOOPS_GROUP_USERS == $id || XOOPS_GROUP_ANONYMOUS == $id) {
+ echo '</td></tr>';
+ } else {
+ echo ' <a href="admin.php?fct=groups&op=del&g_id='.$id.'">'._AM_DELETE.'</a></td></tr>';
+ }
+ }
+ echo "</table>";
+ $name_value = "";
+ $desc_value = "";
+ $s_cat_value = '';
+ $a_mod_value = array();
+ $r_mod_value = array();
+ $r_block_value = array();
+ $op_value = "add";
+ $submit_value = _AM_CREATENEWADG;
+ $g_id_value = "";
+ $type_value = "";
+ $form_title = _AM_CREATENEWADG;
+ include XOOPS_ROOT_PATH."/modules/system/admin/groups/groupform.php";
+ //CloseTable();
+ xoops_cp_footer();
+}
+
+function modifyGroup($g_id)
+{
+ $userstart = $memstart = 0;
+ if ( !empty($_POST['userstart']) ) {
+ $userstart = intval($_POST['userstart']);
+ } elseif (!empty($_GET['userstart'])) {
+ $userstart = intval($_GET['userstart']);
+ }
+ if ( !empty($_POST['memstart']) ) {
+ $memstart = intval($_POST['memstart']);
+ } elseif (!empty($_GET['memstart'])) {
+ $memstart = intval($_GET['memstart']);
+ }
+ xoops_cp_header();
+ //OpenTable();
+ echo '<a href="admin.php?fct=groups">'. _AM_GROUPSMAIN .'</a> <span style="font-weight:bold;">»»</span> '. _AM_MODIFYADG.'<br /><br />';
+ $member_handler =& xoops_gethandler('member');
+ $thisgroup =& $member_handler->getGroup($g_id);
+ $name_value = $thisgroup->getVar("name", "E");
+ $desc_value = $thisgroup->getVar("description", "E");
+ $moduleperm_handler =& xoops_gethandler('groupperm');
+ $a_mod_value =& $moduleperm_handler->getItemIds('module_admin', $thisgroup->getVar('groupid'));
+ $r_mod_value =& $moduleperm_handler->getItemIds('module_read', $thisgroup->getVar('groupid'));
+
+ $gperm_handler =& xoops_gethandler('groupperm');
+ $r_block_value =& $gperm_handler->getItemIds('block_read', $g_id);
+ $op_value = "update";
+ $submit_value = _AM_UPDATEADG;
+ $g_id_value = $thisgroup->getVar("groupid");
+ $type_value = $thisgroup->getVar("group_type", "E");
+ $form_title = _AM_MODIFYADG;
+ if (XOOPS_GROUP_ADMIN == $g_id) {
+ $s_cat_disable = true;
+ }
+
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ $s_cat_value =& $sysperm_handler->getItemIds('system_admin', $g_id);
+
+ include XOOPS_ROOT_PATH."/modules/system/admin/groups/groupform.php";
+ echo "<br /><h4 style='text-align:left'>"._AM_EDITMEMBER."</h4>";
+ $usercount = $member_handler->getUserCount(new Criteria('level', 0, '>'));
+ $member_handler =& xoops_gethandler('member');
+ $membercount = $member_handler->getUserCountByGroup($g_id);
+ if ($usercount < 200 && $membercount < 200) {
+ // do the old way only when counts are small
+ $mlist = array();
+ $members =& $member_handler->getUsersByGroup($g_id, false);
+ if (count($members) > 0) {
+ $member_criteria = new Criteria('uid', "(".implode(',', $members).")", "IN");
+ $member_criteria->setSort('name');
+ $mlist = $member_handler->getUserList($member_criteria);
+ }
+ $criteria = new Criteria('level', 0, '>');
+ $criteria->setSort('name');
+ $userslist =& $member_handler->getUserList($criteria);
+ $users =& array_diff($userslist, $mlist);
+ echo '<table class="outer">
+ <tr><th align="center">'._AM_NONMEMBERS.'<br />';
+
+ echo '</th><th></th><th align="center">'._AM_MEMBERS.'<br />';
+ echo '</th></tr>
+ <tr><td class="even">
+ <form action="admin.php" method="post">
+ <select name="uids[]" size="10" multiple="multiple">'."\n";
+ foreach ($users as $u_id => $u_name) {
+ echo '<option value="'.$u_id.'">'.$u_name.'</option>'."\n";
+ }
+ echo '</select>';
+ echo "</td><td align='center' class='odd'>
+ <input type='hidden' name='op' value='addUser' />
+ ".$GLOBALS['xoopsSecurity']->getTokenHTML()."
+ <input type='hidden' name='fct' value='groups' />
+ <input type='hidden' name='groupid' value='".$thisgroup->getVar("groupid")."' />
+ <input type='submit' name='submit' value='"._AM_ADDBUTTON."' />
+ </form><br />
+ <form action='admin.php' method='post' />
+ <input type='hidden' name='op' value='delUser' />
+ ".$GLOBALS['xoopsSecurity']->getTokenHTML()."
+ <input type='hidden' name='fct' value='groups' />
+ <input type='hidden' name='groupid' value='".$thisgroup->getVar("groupid")."' />
+ <input type='submit' name='submit' value='"._AM_DELBUTTON."' />
+ </td>
+ <td class='even'>";
+ echo "<select name='uids[]' size='10' multiple='multiple'>";
+ foreach ($mlist as $m_id => $m_name) {
+ echo '<option value="'.$m_id.'">'.$m_name.'</option>'."\n";
+ }
+ echo "</select>";
+ echo '</td></tr>
+ </form>
+ </table>';
+ } else {
+ $members =& $member_handler->getUsersByGroup($g_id, false, 200, $memstart);
+ $mlist = array();
+ if (count($members) > 0) {
+ $member_criteria = new Criteria('uid', "(".implode(',', $members).")", "IN");
+ $member_criteria->setSort('name');
+ $mlist = $member_handler->getUserList($member_criteria);
+ }
+ echo '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=findusers&group='.$g_id.'">'._AM_FINDU4GROUP.'</a><br />';
+ echo '<form action="admin.php" method="post">
+ <table class="outer">
+ <tr><th align="center">'._AM_MEMBERS.'<br />';
+ $nav = new XoopsPageNav($membercount, 200, $memstart, "memstart", "fct=groups&op=modify&g_id=".$g_id);
+ echo $nav->renderNav(4);
+ echo "</th></tr>
+ <tr><td class='even' align='center'>
+ <input type='hidden' name='op' value='delUser' />
+ <input type='hidden' name='fct' value='groups' />
+ <input type='hidden' name='groupid' value='".$thisgroup->getVar("groupid")."' />
+ <input type='hidden' name='memstart' value='".$memstart."' />
+ ".$GLOBALS['xoopsSecurity']->getTokenHTML()."
+ <select name='uids[]' size='10' multiple='multiple'>";
+ foreach ($mlist as $m_id => $m_name ) {
+ echo '<option value="'.$m_id.'">'.$m_name.'</option>'."\n";
+ }
+ echo "</select><br />
+ <input type='submit' name='submit' value='"._DELETE."' />
+ </td></tr>
+ </table>
+ </form>";
+ }
+ //CloseTable();
+ xoops_cp_footer();
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/groups.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/main.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/main.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/main.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,253 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit("Access Denied");
+} else {
+ include_once XOOPS_ROOT_PATH."/modules/system/admin/groups/groups.php";
+ $op = "display";
+ if ( isset($_POST) ) {
+ foreach ( $_POST as $k => $v ) {
+ $$k = $v;
+ }
+ }
+ if ( isset($_GET['op']) ) {
+ if ($_GET['op'] == "modify" || $_GET['op'] == "del") {
+ $op = $_GET['op'];
+ $g_id = $_GET['g_id'];
+ }
+ }
+
+ // from finduser section
+ if ( !empty($memberslist_id) && is_array($memberslist_id) ) {
+ $op = "addUser";
+ $uids =& $memberslist_id;
+ }
+
+ switch ($op) {
+ case "modify":
+ include_once XOOPS_ROOT_PATH.'/class/pagenav.php';
+ modifyGroup($g_id);
+ break;
+ case "update":
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=groups&op=adminMain", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $system_catids = empty($system_catids) ? array() : $system_catids;
+ $admin_mids = empty($admin_mids) ? array() : $admin_mids;
+ $read_mids = empty($read_mids) ? array() : $read_mids;
+ $read_bids = empty($read_bids) ? array() : $read_bids;
+ $member_handler =& xoops_gethandler('member');
+ $group =& $member_handler->getGroup($g_id);
+ $group->setVar('name', $name);
+ $group->setVar('description', $desc);
+ // if this group is not one of the default groups
+ if (!in_array($group->getVar('groupid'), array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS))) {
+ if (count($system_catids) > 0) {
+ $group->setVar('group_type', 'Admin');
+ } else {
+ $group->setVar('group_type', '');
+ }
+ }
+ if (!$member_handler->insertGroup($group)) {
+ xoops_cp_header();
+ echo $group->getHtmlErrors();
+ xoops_cp_footer();
+ } else {
+ $groupid = $group->getVar('groupid');
+ $gperm_handler =& xoops_gethandler('groupperm');
+ $criteria = new CriteriaCompo(new Criteria('gperm_groupid', $groupid));
+ $criteria->add(new Criteria('gperm_modid', 1));
+ $criteria2 = new CriteriaCompo(new Criteria('gperm_name', 'system_admin'));
+ $criteria2->add(new Criteria('gperm_name', 'module_admin'), 'OR');
+ $criteria2->add(new Criteria('gperm_name', 'module_read'), 'OR');
+ $criteria2->add(new Criteria('gperm_name', 'block_read'), 'OR');
+ $criteria->add($criteria2);
+ $gperm_handler->deleteAll($criteria);
+ if (count($system_catids) > 0) {
+ array_push($admin_mids, 1);
+ foreach ($system_catids as $s_cid) {
+ $sysperm =& $gperm_handler->create();
+ $sysperm->setVar('gperm_groupid', $groupid);
+ $sysperm->setVar('gperm_itemid', $s_cid);
+ $sysperm->setVar('gperm_name', 'system_admin');
+ $sysperm->setVar('gperm_modid', 1);
+ $gperm_handler->insert($sysperm);
+ }
+ }
+ foreach ($admin_mids as $a_mid) {
+ $modperm =& $gperm_handler->create();
+ $modperm->setVar('gperm_groupid', $groupid);
+ $modperm->setVar('gperm_itemid', $a_mid);
+ $modperm->setVar('gperm_name', 'module_admin');
+ $modperm->setVar('gperm_modid', 1);
+ $gperm_handler->insert($modperm);
+ }
+ array_push($read_mids, 1);
+ foreach ($read_mids as $r_mid) {
+ $modperm =& $gperm_handler->create();
+ $modperm->setVar('gperm_groupid', $groupid);
+ $modperm->setVar('gperm_itemid', $r_mid);
+ $modperm->setVar('gperm_name', 'module_read');
+ $modperm->setVar('gperm_modid', 1);
+ $gperm_handler->insert($modperm);
+ }
+ foreach ($read_bids as $r_bid) {
+ $blockperm =& $gperm_handler->create();
+ $blockperm->setVar('gperm_groupid', $groupid);
+ $blockperm->setVar('gperm_itemid', $r_bid);
+ $blockperm->setVar('gperm_name', 'block_read');
+ $blockperm->setVar('gperm_modid', 1);
+ $gperm_handler->insert($blockperm);
+ }
+ redirect_header("admin.php?fct=groups&op=adminMain",1,_MD_AM_DBUPDATED);
+ }
+ break;
+ case "add":
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=groups&op=adminMain", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if (!$name) {
+ xoops_cp_header();
+ echo _AM_UNEED2ENTER;
+ xoops_cp_footer();
+ exit();
+ }
+ $system_catids = empty($system_catids) ? array() : $system_catids;
+ $admin_mids = empty($admin_mids) ? array() : $admin_mids;
+ $read_mids = empty($read_mids) ? array() : $read_mids;
+ $read_bids = empty($read_bids) ? array() : $read_bids;
+ $member_handler =& xoops_gethandler('member');
+ $group =& $member_handler->createGroup();
+ $group->setVar("name", $name);
+ $group->setVar("description", $desc);
+ if (count($system_catids) > 0) {
+ $group->setVar("group_type", 'Admin');
+ }
+ if (!$member_handler->insertGroup($group)) {
+ xoops_cp_header();
+ echo $group->getHtmlErrors();
+ xoops_cp_footer();
+ } else {
+ $groupid = $group->getVar('groupid');
+ $gperm_handler =& xoops_gethandler('groupperm');
+ if (count($system_catids) > 0) {
+ array_push($admin_mids, 1);
+ foreach ($system_catids as $s_cid) {
+ $sysperm =& $gperm_handler->create();
+ $sysperm->setVar('gperm_groupid', $groupid);
+ $sysperm->setVar('gperm_itemid', $s_cid);
+ $sysperm->setVar('gperm_name', 'system_admin');
+ $sysperm->setVar('gperm_modid', 1);
+ $gperm_handler->insert($sysperm);
+ }
+ }
+ foreach ($admin_mids as $a_mid) {
+ $modperm =& $gperm_handler->create();
+ $modperm->setVar('gperm_groupid', $groupid);
+ $modperm->setVar('gperm_itemid', $a_mid);
+ $modperm->setVar('gperm_name', 'module_admin');
+ $modperm->setVar('gperm_modid', 1);
+ $gperm_handler->insert($modperm);
+ }
+ array_push($read_mids, 1);
+ foreach ($read_mids as $r_mid) {
+ $modperm =& $gperm_handler->create();
+ $modperm->setVar('gperm_groupid', $groupid);
+ $modperm->setVar('gperm_itemid', $r_mid);
+ $modperm->setVar('gperm_name', 'module_read');
+ $modperm->setVar('gperm_modid', 1);
+ $gperm_handler->insert($modperm);
+ }
+ foreach ($read_bids as $r_bid) {
+ $blockperm =& $gperm_handler->create();
+ $blockperm->setVar('gperm_groupid', $groupid);
+ $blockperm->setVar('gperm_itemid', $r_bid);
+ $blockperm->setVar('gperm_name', 'block_read');
+ $blockperm->setVar('gperm_modid', 1);
+ $gperm_handler->insert($blockperm);
+ }
+ redirect_header("admin.php?fct=groups&op=adminMain",1,_MD_AM_DBUPDATED);
+ }
+ break;
+ case "del":
+ xoops_cp_header();
+ xoops_confirm(array('fct' => 'groups', 'op' => 'delConf', 'g_id' => $g_id), 'admin.php', _AM_AREUSUREDEL);
+ xoops_cp_footer();
+ break;
+ case "delConf":
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=groups&op=adminMain", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if (intval($g_id) > 0 && !in_array($g_id, array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS))) {
+ $member_handler =& xoops_gethandler('member');
+ $group =& $member_handler->getGroup($g_id);
+ $member_handler->deleteGroup($group);
+ $gperm_handler =& xoops_gethandler('groupperm');
+ $gperm_handler->deleteByGroup($g_id);
+ }
+ redirect_header("admin.php?fct=groups&op=adminMain",1,_MD_AM_DBUPDATED);
+ break;
+ case "addUser":
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=groups&op=adminMain", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $member_handler =& xoops_gethandler('member');
+ $size = count($uids);
+ for ( $i = 0; $i < $size; $i++ ) {
+ $member_handler->addUserToGroup($groupid, $uids[$i]);
+ }
+ redirect_header("admin.php?fct=groups&op=modify&g_id=".$groupid."",0,_MD_AM_DBUPDATED);
+ break;
+ case "delUser":
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=groups&op=adminMain", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if (intval($groupid) > 0) {
+ $member_handler =& xoops_gethandler('member');
+ $memstart = isset($memstart) ? intval($memstart) : 0;
+ if ($groupid == XOOPS_GROUP_ADMIN) {
+ if ($member_handler->getUserCountByGroup($groupid) > count($uids)){
+ $member_handler->removeUsersFromGroup($groupid, $uids);
+ }
+ } else {
+ $member_handler->removeUsersFromGroup($groupid, $uids);
+ }
+ redirect_header('admin.php?fct=groups&op=modify&g_id='.$groupid.'&memstart='.$memstart,0,_MD_AM_DBUPDATED);
+ }
+ break;
+ case "display":
+ default:
+ displayGroups();
+ break;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/main.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/xoops_version.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/xoops_version.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/xoops_version.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,44 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$modversion['name'] = _MD_AM_ADGS;
+$modversion['version'] = "";
+$modversion['description'] = "User Groups Configuration";
+$modversion['author'] = "";
+$modversion['credits'] = "";
+$modversion['help'] = "groups.html";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 1;
+$modversion['image'] = "groups.gif";
+$modversion['hasAdmin'] = 1;
+$modversion['adminpath'] = "admin.php?fct=groups";
+$modversion['category'] = XOOPS_SYSTEM_GROUP;
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/groups/xoops_version.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/images/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/images/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/images/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/images/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/images/main.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/images/main.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/images/main.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,471 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit("Access Denied");
+} else {
+ $op = 'list';
+ if (isset($_POST)) {
+ foreach ( $_POST as $k => $v ) {
+ ${$k} = $v;
+ }
+ }
+ if (isset($_GET['op'])) {
+ $op = trim($_GET['op']);
+ }
+ if (isset($_GET['image_id'])) {
+ $image_id = intval($_GET['image_id']);
+ }
+ if (isset($_GET['imgcat_id'])) {
+ $imgcat_id = intval($_GET['imgcat_id']);
+ }
+ if ($op == 'list') {
+ $imgcat_handler = xoops_gethandler('imagecategory');
+ $imagecategorys =& $imgcat_handler->getObjects();
+ xoops_cp_header();
+ echo '<h4 style="text-align:left">'._IMGMANAGER.'</h4><ul>';
+ $catcount = count($imagecategorys);
+ $image_handler =& xoops_gethandler('image');
+ for ($i = 0; $i < $catcount; $i++) {
+ $count = $image_handler->getCount(new Criteria('imgcat_id', $imagecategorys[$i]->getVar('imgcat_id')));
+ echo '<li>'.$imagecategorys[$i]->getVar('imgcat_name').' ('.sprintf(_NUMIMAGES, '<b>'.$count.'</b>').') [<a href="admin.php?fct=images&op=listimg&imgcat_id='.$imagecategorys[$i]->getVar('imgcat_id').'">'._LIST.'</a>] [<a href="admin.php?fct=images&op=editcat&imgcat_id='.$imagecategorys[$i]->getVar('imgcat_id').'">'._EDIT.'</a>]';
+ if ($imagecategorys[$i]->getVar('imgcat_type') == 'C') {
+ echo ' [<a href="admin.php?fct=images&op=delcat&imgcat_id='.$imagecategorys[$i]->getVar('imgcat_id').'">'._DELETE.'</a>]';
+ }
+ echo '</li>';
+ }
+ echo '</ul>';
+ include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+ if (!empty($catcount)) {
+ $form = new XoopsThemeForm(_ADDIMAGE, 'image_form', 'admin.php', 'post', true);
+ $form->setExtra('enctype="multipart/form-data"');
+ $form->addElement(new XoopsFormText(_IMAGENAME, 'image_nicename', 50, 255), true);
+ $select = new XoopsFormSelect(_IMAGECAT, 'imgcat_id');
+ $select->addOptionArray($imgcat_handler->getList());
+ $form->addElement($select, true);
+ $form->addElement(new XoopsFormFile(_IMAGEFILE, 'image_file', 5000000));
+ $form->addElement(new XoopsFormText(_IMGWEIGHT, 'image_weight', 3, 4, 0));
+ $form->addElement(new XoopsFormRadioYN(_IMGDISPLAY, 'image_display', 1, _YES, _NO));
+ $form->addElement(new XoopsFormHidden('op', 'addfile'));
+ $form->addElement(new XoopsFormHidden('fct', 'images'));
+ $form->addElement(new XoopsFormButton('', 'img_button', _SUBMIT, 'submit'));
+ $form->display();
+ }
+ $form = new XoopsThemeForm(_MD_ADDIMGCAT, 'imagecat_form', 'admin.php', 'post', true);
+ $form->addElement(new XoopsFormText(_MD_IMGCATNAME, 'imgcat_name', 50, 255), true);
+ $form->addElement(new XoopsFormSelectGroup(_MD_IMGCATRGRP, 'readgroup', true, XOOPS_GROUP_ADMIN, 5, true));
+ $form->addElement(new XoopsFormSelectGroup(_MD_IMGCATWGRP, 'writegroup', true, XOOPS_GROUP_ADMIN, 5, true));
+ $form->addElement(new XoopsFormText(_IMGMAXSIZE, 'imgcat_maxsize', 10, 10, 50000));
+ $form->addElement(new XoopsFormText(_IMGMAXWIDTH, 'imgcat_maxwidth', 3, 4, 120));
+ $form->addElement(new XoopsFormText(_IMGMAXHEIGHT, 'imgcat_maxheight', 3, 4, 120));
+ $form->addElement(new XoopsFormText(_MD_IMGCATWEIGHT, 'imgcat_weight', 3, 4, 0));
+ $form->addElement(new XoopsFormRadioYN(_MD_IMGCATDISPLAY, 'imgcat_display', 1, _YES, _NO));
+ $storetype = new XoopsFormRadio(_MD_IMGCATSTRTYPE.'<br /><span style="color:#ff0000;">'._MD_STRTYOPENG.'</span>', 'imgcat_storetype', 'file');
+ $storetype->addOptionArray(array('file' => _MD_ASFILE, 'db' => _MD_INDB));
+ $form->addElement($storetype);
+ $form->addElement(new XoopsFormHidden('op', 'addcat'));
+ $form->addElement(new XoopsFormHidden('fct', 'images'));
+ $form->addElement(new XoopsFormButton('', 'imgcat_button', _SUBMIT, 'submit'));
+ $form->display();
+ xoops_cp_footer();
+ exit();
+ }
+
+ if ($op == 'listimg') {
+ $imgcat_id = intval($imgcat_id);
+ if ($imgcat_id <= 0) {
+ redirect_header('admin.php?fct=images',1);
+ }
+ $imgcat_handler = xoops_gethandler('imagecategory');
+ $imagecategory =& $imgcat_handler->get($imgcat_id);
+ if (!is_object($imagecategory)) {
+ redirect_header('admin.php?fct=images',1);
+ }
+ $image_handler = xoops_gethandler('image');
+ xoops_cp_header();
+ echo '<a href="admin.php?fct=images">'. _MD_IMGMAIN .'</a> <span style="font-weight:bold;">»»</span> '.$imagecategory->getVar('imgcat_name').'<br /><br />';
+ $criteria = new Criteria('imgcat_id', $imgcat_id);
+ $imgcount = $image_handler->getCount($criteria);
+ $start = isset($_GET['start']) ? intval($_GET['start']) : 0;
+ $criteria->setStart($start);
+ $criteria->setLimit(20);
+ $images =& $image_handler->getObjects($criteria, true, false);
+ echo '<form action="admin.php" method="post">';
+ foreach (array_keys($images) as $i) {
+
+ echo '<table width="100%" class="outer"><tr><td width="30%" rowspan="6">';
+ if ($imagecategory->getVar('imgcat_storetype') == 'db') {
+ echo '<img src="'.XOOPS_URL.'/image.php?id='.$i.'" alt="" />';
+ } else {
+ echo '<img src="'.XOOPS_UPLOAD_URL.'/'.$images[$i]->getVar('image_name').'" alt="" />';
+ }
+ echo '</td><td class="head">'._IMAGENAME,'</td><td class="even"><input type="hidden" name="image_id[]" value="'.$i.'" /><input type="text" name="image_nicename[]" value="'.$images[$i]->getVar('image_nicename', 'E').'" size="20" maxlength="255" /></td></tr><tr><td class="head">'._IMAGEMIME.'</td><td class="odd">'.$images[$i]->getVar('image_mimetype').'</td></tr><tr><td class="head">'._IMAGECAT.'</td><td class="even"><select name="imgcat_id[]" size="1">';
+ $list =& $imgcat_handler->getList(array(), null, null, $imagecategory->getVar('imgcat_storetype'));
+ foreach ($list as $value => $name) {
+ $sel = '';
+ if ($value == $images[$i]->getVar('imgcat_id')) {
+ $sel = ' selected="selected"';
+ }
+ echo '<option value="'.$value.'"'.$sel.'>'.$name.'</option>';
+ }
+ echo '</select></td></tr><tr><td class="head">'._IMGWEIGHT.'</td><td class="odd"><input type="text" name="image_weight[]" value="'.$images[$i]->getVar('image_weight').'" size="3" maxlength="4" /></td></tr><tr><td class="head">'._IMGDISPLAY.'</td><td class="even"><input type="checkbox" name="image_display[]" value="1"';
+ if ($images[$i]->getVar('image_display') == 1) {
+ echo ' checked="checked"';
+ }
+ echo ' /></td></tr><tr><td class="head"> </td><td class="odd"><a href="admin.php?fct=images&op=delfile&image_id='.$i.'">'._DELETE.'</a></td></tr></table><br />';
+ }
+ if ($imgcount > 0) {
+ if ($imgcount > 20) {
+ include_once XOOPS_ROOT_PATH.'/class/pagenav.php';
+ $nav = new XoopsPageNav($imgcount, 20, $start, 'start', 'fct=images&op=listimg&imgcat_id='.$imgcat_id);
+ echo '<div text-align="right">'.$nav->renderNav().'</div>';
+ }
+ echo '<div style="text-align:center;"><input type="hidden" name="op" value="save" /><input type="hidden" name="fct" value="images" />'.$GLOBALS['xoopsSecurity']->getTokenHTML().'<input type="submit" name="submit" value="'._SUBMIT.'" /></div></form>';
+ }
+ xoops_cp_footer();
+ exit();
+ }
+
+ if ($op == 'save') {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=images', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $count = count($image_id);
+ if ($count > 0) {
+ $image_handler =& xoops_gethandler('image');
+ $error = array();
+ for ($i = 0; $i < $count; $i++) {
+ $image =& $image_handler->get($image_id[$i]);
+ if (!is_object($image)) {
+ $error[] = sprintf(_FAILGETIMG, $image_id[$i]);
+ continue;
+ }
+ $image_display[$i] = empty($image_display[$i]) ? 0 : 1;
+ $image->setVar('image_display', $image_display[$i]);
+ $image->setVar('image_weight', $image_weight[$i]);
+ $image->setVar('image_nicename', $image_nicename[$i]);
+ $image->setVar('imgcat_id', $imgcat_id[$i]);
+ if (!$image_handler->insert($image)) {
+ $error[] = sprintf(_FAILSAVEIMG, $image_id[$i]);
+ }
+ }
+ if (count($error) > 0) {
+ xoops_cp_header();
+ foreach ($error as $err) {
+ echo $err.'<br />';
+ }
+ xoops_cp_footer();
+ exit();
+ }
+ }
+ redirect_header('admin.php?fct=images',2,_MD_AM_DBUPDATED);
+ }
+
+ if ($op == 'addfile') {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=images', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $imgcat_handler =& xoops_gethandler('imagecategory');
+ $imagecategory =& $imgcat_handler->get(intval($imgcat_id));
+ if (!is_object($imagecategory)) {
+ redirect_header('admin.php?fct=images',1);
+ }
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png', 'image/bmp'), $imagecategory->getVar('imgcat_maxsize'), $imagecategory->getVar('imgcat_maxwidth'), $imagecategory->getVar('imgcat_maxheight'));
+ $uploader->setPrefix('img');
+ $err = array();
+ $ucount = count($_POST['xoops_upload_file']);
+ for ($i = 0; $i < $ucount; $i++) {
+ if ($uploader->fetchMedia($_POST['xoops_upload_file'][$i])) {
+ if (!$uploader->upload()) {
+ $err[] = $uploader->getErrors();
+ } else {
+ $image_handler =& xoops_gethandler('image');
+ $image =& $image_handler->create();
+ $image->setVar('image_name', $uploader->getSavedFileName());
+ $image->setVar('image_nicename', $image_nicename);
+ $image->setVar('image_mimetype', $uploader->getMediaType());
+ $image->setVar('image_created', time());
+ $image_display = empty($image_display) ? 0 : 1;
+ $image->setVar('image_display', $image_display);
+ $image->setVar('image_weight', $image_weight);
+ $image->setVar('imgcat_id', $imgcat_id);
+ if ($imagecategory->getVar('imgcat_storetype') == 'db') {
+ $fp = @fopen($uploader->getSavedDestination(), 'rb');
+ $fbinary = @fread($fp, filesize($uploader->getSavedDestination()));
+ @fclose($fp);
+ $image->setVar('image_body', $fbinary, true);
+ @unlink($uploader->getSavedDestination());
+ }
+ if (!$image_handler->insert($image)) {
+ $err[] = sprintf(_FAILSAVEIMG, $image->getVar('image_nicename'));
+ }
+ }
+ } else {
+ $err[] = sprintf(_FAILFETCHIMG, $i);
+ $err = array_merge($err, $uploader->getErrors(false));
+ }
+ }
+ if (count($err) > 0) {
+ xoops_cp_header();
+ xoops_error($err);
+ xoops_cp_footer();
+ exit();
+ }
+ redirect_header('admin.php?fct=images',2,_MD_AM_DBUPDATED);
+ }
+
+ if ($op == 'addcat') {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=images', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $imgcat_handler =& xoops_gethandler('imagecategory');
+ $imagecategory =& $imgcat_handler->create();
+ $imagecategory->setVar('imgcat_name', $imgcat_name);
+ $imagecategory->setVar('imgcat_maxsize', $imgcat_maxsize);
+ $imagecategory->setVar('imgcat_maxwidth', $imgcat_maxwidth);
+ $imagecategory->setVar('imgcat_maxheight', $imgcat_maxheight);
+ $imgcat_display = empty($imgcat_display) ? 0 : 1;
+ $imagecategory->setVar('imgcat_display', $imgcat_display);
+ $imagecategory->setVar('imgcat_weight', $imgcat_weight);
+ $imagecategory->setVar('imgcat_storetype', $imgcat_storetype);
+ $imagecategory->setVar('imgcat_type', 'C');
+ if (!$imgcat_handler->insert($imagecategory)) {
+ exit();
+ }
+ $newid = $imagecategory->getVar('imgcat_id');
+ $imagecategoryperm_handler =& xoops_gethandler('groupperm');
+ if (!isset($readgroup)) {
+ $readgroup = array();
+ }
+ if (!in_array(XOOPS_GROUP_ADMIN, $readgroup)) {
+ array_push($readgroup, XOOPS_GROUP_ADMIN);
+ }
+ foreach ($readgroup as $rgroup) {
+ $imagecategoryperm =& $imagecategoryperm_handler->create();
+ $imagecategoryperm->setVar('gperm_groupid', $rgroup);
+ $imagecategoryperm->setVar('gperm_itemid', $newid);
+ $imagecategoryperm->setVar('gperm_name', 'imgcat_read');
+ $imagecategoryperm->setVar('gperm_modid', 1);
+ $imagecategoryperm_handler->insert($imagecategoryperm);
+ unset($imagecategoryperm);
+ }
+ if (!isset($writegroup)) {
+ $writegroup = array();
+ }
+ if (!in_array(XOOPS_GROUP_ADMIN, $writegroup)) {
+ array_push($writegroup, XOOPS_GROUP_ADMIN);
+ }
+ foreach ($writegroup as $wgroup) {
+ $imagecategoryperm =& $imagecategoryperm_handler->create();
+ $imagecategoryperm->setVar('gperm_groupid', $wgroup);
+ $imagecategoryperm->setVar('gperm_itemid', $newid);
+ $imagecategoryperm->setVar('gperm_name', 'imgcat_write');
+ $imagecategoryperm->setVar('gperm_modid', 1);
+ $imagecategoryperm_handler->insert($imagecategoryperm);
+ unset($imagecategoryperm);
+ }
+ redirect_header('admin.php?fct=images',2,_MD_AM_DBUPDATED);
+ }
+
+ if ($op == 'editcat') {
+ if ($imgcat_id <= 0) {
+ redirect_header('admin.php?fct=images',1);
+ }
+ $imgcat_handler = xoops_gethandler('imagecategory');
+ $imagecategory =& $imgcat_handler->get($imgcat_id);
+ if (!is_object($imagecategory)) {
+ redirect_header('admin.php?fct=images',1);
+ }
+ include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+ $imagecategoryperm_handler =& xoops_gethandler('groupperm');
+ $form = new XoopsThemeForm(_MD_EDITIMGCAT, 'imagecat_form', 'admin.php', 'post', true);
+ $form->addElement(new XoopsFormText(_MD_IMGCATNAME, 'imgcat_name', 50, 255, $imagecategory->getVar('imgcat_name')), true);
+ $form->addElement(new XoopsFormSelectGroup(_MD_IMGCATRGRP, 'readgroup', true, $imagecategoryperm_handler->getGroupIds('imgcat_read', $imgcat_id), 5, true));
+ $form->addElement(new XoopsFormSelectGroup(_MD_IMGCATWGRP, 'writegroup', true, $imagecategoryperm_handler->getGroupIds('imgcat_write', $imgcat_id), 5, true));
+ $form->addElement(new XoopsFormText(_IMGMAXSIZE, 'imgcat_maxsize', 10, 10, $imagecategory->getVar('imgcat_maxsize')));
+ $form->addElement(new XoopsFormText(_IMGMAXWIDTH, 'imgcat_maxwidth', 3, 4, $imagecategory->getVar('imgcat_maxwidth')));
+ $form->addElement(new XoopsFormText(_IMGMAXHEIGHT, 'imgcat_maxheight', 3, 4, $imagecategory->getVar('imgcat_maxheight')));
+ $form->addElement(new XoopsFormText(_MD_IMGCATWEIGHT, 'imgcat_weight', 3, 4, $imagecategory->getVar('imgcat_weight')));
+ $form->addElement(new XoopsFormRadioYN(_MD_IMGCATDISPLAY, 'imgcat_display', $imagecategory->getVar('imgcat_display'), _YES, _NO));
+ $storetype = array('db' => _MD_INDB, 'file' => _MD_ASFILE);
+ $form->addElement(new XoopsFormLabel(_MD_IMGCATSTRTYPE, $storetype[$imagecategory->getVar('imgcat_storetype')]));
+ $form->addElement(new XoopsFormHidden('imgcat_id', $imgcat_id));
+ $form->addElement(new XoopsFormHidden('op', 'updatecat'));
+ $form->addElement(new XoopsFormHidden('fct', 'images'));
+ $form->addElement(new XoopsFormButton('', 'imgcat_button', _SUBMIT, 'submit'));
+ xoops_cp_header();
+ echo '<a href="admin.php?fct=images">'. _MD_IMGMAIN .'</a> <span style="font-weight:bold;">»»</span> '.$imagecategory->getVar('imgcat_name').'<br /><br />';
+ $form->display();
+ xoops_cp_footer();
+ exit();
+ }
+
+ if ($op == 'updatecat') {
+ if (!$GLOBALS['xoopsSecurity']->check() || $imgcat_id <= 0) {
+ redirect_header('admin.php?fct=images',1, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $imgcat_handler = xoops_gethandler('imagecategory');
+ $imagecategory =& $imgcat_handler->get($imgcat_id);
+ if (!is_object($imagecategory)) {
+ redirect_header('admin.php?fct=images',1);
+ }
+ $imagecategory->setVar('imgcat_name', $imgcat_name);
+ $imgcat_display = empty($imgcat_display) ? 0 : 1;
+ $imagecategory->setVar('imgcat_display', $imgcat_display);
+ $imagecategory->setVar('imgcat_maxsize', $imgcat_maxsize);
+ $imagecategory->setVar('imgcat_maxwidth', $imgcat_maxwidth);
+ $imagecategory->setVar('imgcat_maxheight', $imgcat_maxheight);
+ $imagecategory->setVar('imgcat_weight', $imgcat_weight);
+ if (!$imgcat_handler->insert($imagecategory)) {
+ exit();
+ }
+ $imagecategoryperm_handler =& xoops_gethandler('groupperm');
+ $criteria = new CriteriaCompo(new Criteria('gperm_itemid', $imgcat_id));
+ $criteria->add(new Criteria('gperm_modid', 1));
+ $criteria2 = new CriteriaCompo(new Criteria('gperm_name', 'imgcat_write'));
+ $criteria2->add(new Criteria('gperm_name', 'imgcat_read'), 'OR');
+ $criteria->add($criteria2);
+ $imagecategoryperm_handler->deleteAll($criteria);
+ if (!isset($readgroup)) {
+ $readgroup = array();
+ }
+ if (!in_array(XOOPS_GROUP_ADMIN, $readgroup)) {
+ array_push($readgroup, XOOPS_GROUP_ADMIN);
+ }
+ foreach ($readgroup as $rgroup) {
+ $imagecategoryperm =& $imagecategoryperm_handler->create();
+ $imagecategoryperm->setVar('gperm_groupid', $rgroup);
+ $imagecategoryperm->setVar('gperm_itemid', $imgcat_id);
+ $imagecategoryperm->setVar('gperm_name', 'imgcat_read');
+ $imagecategoryperm->setVar('gperm_modid', 1);
+ $imagecategoryperm_handler->insert($imagecategoryperm);
+ unset($imagecategoryperm);
+ }
+ if (!isset($writegroup)) {
+ $writegroup = array();
+ }
+ if (!in_array(XOOPS_GROUP_ADMIN, $writegroup)) {
+ array_push($writegroup, XOOPS_GROUP_ADMIN);
+ }
+ foreach ($writegroup as $wgroup) {
+ $imagecategoryperm =& $imagecategoryperm_handler->create();
+ $imagecategoryperm->setVar('gperm_groupid', $wgroup);
+ $imagecategoryperm->setVar('gperm_itemid', $imgcat_id);
+ $imagecategoryperm->setVar('gperm_name', 'imgcat_write');
+ $imagecategoryperm->setVar('gperm_modid', 1);
+ $imagecategoryperm_handler->insert($imagecategoryperm);
+ unset($imagecategoryperm);
+ }
+ redirect_header('admin.php?fct=images',2,_MD_AM_DBUPDATED);
+ }
+
+ if ($op == 'delfile') {
+ xoops_cp_header();
+ xoops_confirm(array('op' => 'delfileok', 'image_id' => $image_id, 'fct' => 'images'), 'admin.php', _MD_RUDELIMG);
+ xoops_cp_footer();
+ exit();
+ }
+
+ if ($op == 'delfileok') {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=images', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $image_id = intval($image_id);
+ if ($image_id <= 0) {
+ redirect_header('admin.php?fct=images',1);
+ }
+ $image_handler =& xoops_gethandler('image');
+ $image =& $image_handler->get($image_id);
+ if (!is_object($image)) {
+ redirect_header('admin.php?fct=images',1);
+ }
+ if (!$image_handler->delete($image)) {
+ xoops_cp_header();
+ xoops_error(sprintf(_MD_FAILDEL, $image->getVar('image_id')));
+ xoops_cp_footer();
+ exit();
+ }
+ @unlink(XOOPS_UPLOAD_PATH.'/'.$image->getVar('image_name'));
+ redirect_header('admin.php?fct=images',2,_MD_AM_DBUPDATED);
+ }
+
+ if ($op == 'delcat') {
+ xoops_cp_header();
+ xoops_confirm(array('op' => 'delcatok', 'imgcat_id' => $imgcat_id, 'fct' => 'images'), 'admin.php', _MD_RUDELIMGCAT);
+ xoops_cp_footer();
+ exit();
+ }
+
+ if ($op == 'delcatok') {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=images', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $imgcat_id = intval($imgcat_id);
+ if ($imgcat_id <= 0) {
+ redirect_header('admin.php?fct=images',1);
+ }
+ $imgcat_handler = xoops_gethandler('imagecategory');
+ $imagecategory =& $imgcat_handler->get($imgcat_id);
+ if (!is_object($imagecategory)) {
+ redirect_header('admin.php?fct=images',1);
+ }
+ if ($imagecategory->getVar('imgcat_type') != 'C') {
+ xoops_cp_header();
+ xoops_error(_MD_SCATDELNG);
+ xoops_cp_footer();
+ exit();
+ }
+ $image_handler =& xoops_gethandler('image');
+ $images =& $image_handler->getObjects(new Criteria('imgcat_id', $imgcat_id), true, false);
+ $errors = array();
+ foreach (array_keys($images) as $i) {
+ if (!$image_handler->delete($images[$i])) {
+ $errors[] = sprintf(_MD_FAILDEL, $i);
+ } else {
+ if (file_exists(XOOPS_UPLOAD_PATH.'/'.$images[$i]->getVar('image_name')) && !unlink(XOOPS_UPLOAD_PATH.'/'.$images[$i]->getVar('image_name'))) {
+ $errors[] = sprintf(_MD_FAILUNLINK, $i);
+ }
+ }
+ }
+ if (!$imgcat_handler->delete($imagecategory)) {
+ $errors[] = sprintf(_MD_FAILDELCAT, $imagecategory->getVar('imgcat_name'));
+ }
+ if (count($errors) > 0) {
+ xoops_cp_header();
+ xoops_error($errors);
+ xoops_cp_footer();
+ exit();
+ }
+ redirect_header('admin.php?fct=images',2,_MD_AM_DBUPDATED);
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/images/main.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/images/xoops_version.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/images/xoops_version.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/images/xoops_version.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,45 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$modversion['name'] = _MD_AM_IMAGES;
+$modversion['version'] = "";
+$modversion['description'] = "XOOPS Image Manager";
+$modversion['author'] = "";
+$modversion['credits'] = "The XOOPS Project";
+$modversion['help'] = "images.html";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 1;
+$modversion['image'] = "images.gif";
+
+$modversion['hasAdmin'] = 1;
+$modversion['adminpath'] = "admin.php?fct=images";
+$modversion['category'] = XOOPS_SYSTEM_IMAGE;
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/images/xoops_version.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/mailform.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/mailform.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/mailform.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,101 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$form = new XoopsThemeForm(_AM_SENDMTOUSERS, "mailusers", "admin.php?fct=mailusers", 'post', true);
+
+// from finduser section
+if (!empty($_POST['memberslist_id'])) {
+ $user_count = count($_POST['memberslist_id']);
+ $display_names = "";
+ for ( $i = 0; $i < $user_count; $i++ ) {
+ $uid_hidden = new XoopsFormHidden("mail_to_user[]", $_POST['memberslist_id'][$i]);
+ $form->addElement($uid_hidden);
+ $display_names .= "<a href='".XOOPS_URL."/userinfo.php?uid=".$_POST['memberslist_id'][$i]."' target='_blank'>".$_POST['memberslist_uname'][$_POST['memberslist_id'][$i]]."</a>, ";
+ unset($uid_hidden);
+ }
+ $users_label = new XoopsFormLabel(_AM_SENDTOUSERS2, substr($display_names, 0, -2));
+ $form->addElement($users_label);
+ $display_criteria = 0;
+}
+if ( !empty($display_criteria) ) {
+ $selected_groups = array();
+ $group_select = new XoopsFormSelectGroup(_AM_GROUPIS."<br />", "mail_to_group", false, $selected_groups, 5, true);
+ $lastlog_min = new XoopsFormText(_AM_LASTLOGMIN."<br />"._AM_TIMEFORMAT."<br />", "mail_lastlog_min", 20, 10);
+ $lastlog_max = new XoopsFormText(_AM_LASTLOGMAX."<br />"._AM_TIMEFORMAT."<br />", "mail_lastlog_max", 20, 10);
+ $regd_min = new XoopsFormText(_AM_REGDMIN."<br />"._AM_TIMEFORMAT."<br />", "mail_regd_min", 20, 10);
+ $regd_max = new XoopsFormText(_AM_REGDMAX."<br />"._AM_TIMEFORMAT."<br />", "mail_regd_max", 20, 10);
+ $idle_more = new XoopsFormText(_AM_IDLEMORE."<br />", "mail_idle_more", 10, 5);
+ $idle_less = new XoopsFormText(_AM_IDLELESS."<br />", "mail_idle_less", 10, 5);
+ $mailok_cbox = new XoopsFormCheckBox('', 'mail_mailok');
+ $mailok_cbox->addOption(1, _AM_MAILOK);
+ $inactive_cbox = new XoopsFormCheckBox(_AM_INACTIVE."<br />", "mail_inactive");
+ $inactive_cbox->addOption(1, _AMIFCHECKD);
+ $inactive_cbox->setExtra("onclick='javascript:disableElement(\"mail_lastlog_min\");disableElement(\"mail_lastlog_max\");disableElement(\"mail_idle_more\");disableElement(\"mail_idle_less\");disableElement(\"mail_to_group[]\");'");
+ $criteria_tray = new XoopsFormElementTray(_AM_SENDTOUSERS, "<br /><br />");
+ $criteria_tray->addElement($group_select);
+ $criteria_tray->addElement($lastlog_min);
+ $criteria_tray->addElement($lastlog_max);
+ $criteria_tray->addElement($idle_more);
+ $criteria_tray->addElement($idle_less);
+ $criteria_tray->addElement($mailok_cbox);
+ $criteria_tray->addElement($inactive_cbox);
+ $criteria_tray->addElement($regd_min);
+ $criteria_tray->addElement($regd_max);
+ $form->addElement($criteria_tray);
+}
+
+$fname_text = new XoopsFormText(_AM_MAILFNAME, "mail_fromname", 30, 255, $xoopsConfig['sitename']);
+$fromemail = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar("email", "E");
+$femail_text = new XoopsFormText(_AM_MAILFMAIL, "mail_fromemail", 30, 255, $fromemail);
+//$subject_caption = _AM_MAILSUBJECT."<br /><br /><span style='font-size:x-small;font-weight:bold;'>"._AM_MAILTAGS."</span><br /><span style='font-size:x-small;font-weight:normal;'>"._AM_MAILTAGS1."<br />"._AM_MAILTAGS2."<br />"._AM_MAILTAGS3."</span>";
+$subject_caption = _AM_MAILSUBJECT."<br /><br /><span style='font-size:x-small;font-weight:bold;'>"._AM_MAILTAGS."</span><br /><span style='font-size:x-small;font-weight:normal;'>"._AM_MAILTAGS2."</span>";
+$subject_text = new XoopsFormText($subject_caption, "mail_subject", 50, 255);
+$body_caption = _AM_MAILBODY."<br /><br /><span style='font-size:x-small;font-weight:bold;'>"._AM_MAILTAGS."</span><br /><span style='font-size:x-small;font-weight:normal;'>"._AM_MAILTAGS1."<br />"._AM_MAILTAGS2."<br />"._AM_MAILTAGS3."<br />"._AM_MAILTAGS4."</span>";
+$body_text = new XoopsFormTextArea($body_caption, "mail_body", "", 10);
+$to_checkbox = new XoopsFormCheckBox(_AM_SENDTO, "mail_send_to", "mail");
+$to_checkbox->addOption("mail", _AM_EMAIL);
+$to_checkbox->addOption("pm", _AM_PM);
+$start_hidden = new XoopsFormHidden("mail_start", 0);
+$op_hidden = new XoopsFormHidden("op", "send");
+$submit_button = new XoopsFormButton("", "mail_submit", _SEND, "submit");
+
+$form->addElement($fname_text);
+$form->addElement($femail_text);
+$form->addElement($subject_text);
+$form->addElement($body_text);
+$form->addElement($to_checkbox);
+$form->addElement($op_hidden);
+$form->addElement($start_hidden);
+$form->addElement($submit_button);
+$form->setRequired($subject_text);
+$form->setRequired($body_text);
+//$form->setRequired($to_checkbox);
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/mailform.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/mailusers.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/mailusers.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/mailusers.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,226 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit("Access Denied");
+} else {
+ include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+ $op = "form";
+
+ if (!empty($_POST['op']) && $_POST['op'] == "send") {
+ $op = $_POST['op'];
+ }
+
+ if ( ($op != "form" && !$GLOBALS['xoopsSecurity']->check()) || $op == "form" ) {
+ xoops_cp_header();
+ //OpenTable();
+ if ($op != "form" && count($GLOBALS['xoopsSecurity']->getErrors()) > 0) {
+ echo "<div class='errorMsg'>".implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())."</div>";
+ }
+ $display_criteria = 1;
+ include XOOPS_ROOT_PATH."/modules/system/admin/mailusers/mailform.php";
+ $form->display();
+ //CloseTable();
+ xoops_cp_footer();
+ }
+
+ if ($op == "send" && !empty($_POST['mail_send_to'])) {
+ $added = array();
+ $added_id = array();
+ $criteria = array();
+ if ( !empty($_POST['mail_inactive']) ) {
+ $criteria[] = "level = 0";
+ } else {
+ if (!empty($_POST['mail_mailok'])) {
+ $criteria[] = 'user_mailok = 1';
+ } else {
+ if (!empty($_POST['mail_to_group'])) {
+ $member_handler =& xoops_gethandler('member');
+ $user_list = array();
+ foreach ($_POST['mail_to_group'] as $groupid ) {
+ $members =& $member_handler->getUsersByGroup($groupid, false);
+ $user_list = array_unique(array_merge($members, $user_list));
+ unset($members);
+ }
+ if (!empty($user_list)) {
+ $criteria[] = 'uid IN (' . join(',', $user_list) . ')';
+ }
+ }
+ }
+ if ( !empty($_POST['mail_lastlog_min']) ) {
+ $f_mail_lastlog_min = trim($_POST['mail_lastlog_min']);
+ $time = mktime(0,0,0,substr($f_mail_lastlog_min,5,2),substr($f_mail_lastlog_min,8,2),substr($f_mail_lastlog_min,0,4));
+ if ( $time > 0 ) {
+ $criteria[] = "last_login > $time";
+ }
+ }
+ if ( !empty($_POST['mail_lastlog_max']) ) {
+ $f_mail_lastlog_max = trim($_POST['mail_lastlog_max']);
+ $time = mktime(0,0,0,substr($f_mail_lastlog_max,5,2),substr($f_mail_lastlog_max,8,2),substr($f_mail_lastlog_max,0,4));
+ if ( $time > 0 ) {
+ $criteria[] = "last_login < $time";
+ }
+ }
+ if ( !empty($_POST['mail_idle_more']) && is_numeric($_POST['mail_idle_more']) ) {
+ $f_mail_idle_more = intval(trim($_POST['mail_idle_more']));
+ $time = 60 * 60 * 24 * $f_mail_idle_more;
+ $time = time() - $time;
+ if ( $time > 0 ) {
+ $criteria[] = "last_login < $time";
+ }
+ }
+ if ( !empty($_POST['mail_idle_less']) && is_numeric($_POST['mail_idle_less']) ) {
+ $f_mail_idle_less = intval(trim($_POST['mail_idle_less']));
+ $time = 60 * 60 * 24 * $f_mail_idle_less;
+ $time = time() - $time;
+ if ( $time > 0 ) {
+ $criteria[] = "last_login > $time";
+ }
+ }
+ }
+ if ( !empty($_POST['mail_regd_min']) ) {
+ $f_mail_regd_min = trim($_POST['mail_regd_min']);
+ $time = mktime(0,0,0,substr($f_mail_regd_min,5,2),substr($f_mail_regd_min,8,2),substr($f_mail_regd_min,0,4));
+ if ( $time > 0 ) {
+ $criteria[] = "user_regdate > $time";
+ }
+ }
+ if ( !empty($_POST['mail_regd_max']) ) {
+ $f_mail_regd_max = trim($_POST['mail_regd_max']);
+ $time = mktime(0,0,0,substr($f_mail_regd_max,5,2),substr($f_mail_regd_max,8,2),substr($f_mail_regd_max,0,4));
+ if ( $time > 0 ) {
+ $criteria[] = "user_regdate < $time";
+ }
+ }
+ if ( !empty($criteria) ) {
+ if ( empty($_POST['mail_inactive']) ) {
+ $criteria[] = "level > 0";
+ }
+ $criteria_object = new CriteriaCompo();
+ foreach ($criteria as $c) {
+ list ($field, $op, $value) = split(' ', $c);
+ $criteria_object->add(new Criteria($field,$value,$op), 'AND');
+ }
+ $member_handler =& xoops_gethandler('member');
+ $getusers =& $member_handler->getUsers($criteria_object);
+ foreach ($getusers as $getuser) {
+ if ( !in_array($getuser->getVar("uid"), $added_id) ) {
+ $added[] = $getuser;
+ $added_id[] = $getuser->getVar("uid");
+ }
+ }
+ }
+ if ( !empty($_POST['mail_to_user']) ) {
+ foreach ($_POST['mail_to_user'] as $to_user) {
+ if ( !in_array($to_user, $added_id) ) {
+ $added[] = new XoopsUser($to_user);
+ $added_id[] = $to_user;
+ }
+ }
+ }
+ $added_count = count($added);
+ xoops_cp_header();
+ //OpenTable();
+ if ( $added_count > 0 ) {
+ $mail_start = !empty($_POST['mail_start']) ? $_POST['mail_start'] : 0;
+ $mail_end = ($added_count > ($mail_start + 100)) ? ($mail_start + 100) : $added_count;
+ $myts =& MyTextSanitizer::getInstance();
+ $xoopsMailer =& getMailer();
+ for ( $i = $mail_start; $i < $mail_end; $i++) {
+ $xoopsMailer->setToUsers($added[$i]);
+ }
+ $xoopsMailer->setFromName($myts->oopsStripSlashesGPC($_POST['mail_fromname']));
+ $xoopsMailer->setFromEmail($myts->oopsStripSlashesGPC($_POST['mail_fromemail']));
+ $xoopsMailer->setSubject($myts->oopsStripSlashesGPC($_POST['mail_subject']));
+ $xoopsMailer->setBody($myts->oopsStripSlashesGPC($_POST['mail_body']));
+ if ( in_array("mail", $_POST['mail_send_to']) ) {
+ $xoopsMailer->useMail();
+ }
+ if ( in_array("pm", $_POST['mail_send_to']) && empty($_POST['mail_inactive']) ) {
+ $xoopsMailer->usePM();
+ }
+ $xoopsMailer->send(true);
+ echo $xoopsMailer->getSuccess();
+ echo $xoopsMailer->getErrors();
+
+
+ if ( $added_count > $mail_end ) {
+ $form = new XoopsThemeForm(_AM_SENDMTOUSERS, "mailusers", "admin.php?fct=mailusers", 'post', true);
+ if ( !empty($_POST['mail_to_group']) ) {
+ foreach ( $_POST['mail_to_group'] as $mailgroup) {
+ $group_hidden = new XoopsFormHidden("mail_to_group[]", $mailgroup);
+ $form->addElement($group_hidden);
+ }
+ }
+ $inactive_hidden = new XoopsFormHidden("mail_inactive", $mail_inactive);
+ $lastlog_min_hidden = new XoopsFormHidden("mail_lastlog_min", $myts->makeTboxData4PreviewInForm($_POST['mail_lastlog_min']));
+ $lastlog_max_hidden = new XoopsFormHidden("mail_lastlog_max", $myts->makeTboxData4PreviewInForm($_POST['mail_lastlog_max']));
+ $regd_min_hidden = new XoopsFormHidden("mail_regd_min", $myts->makeTboxData4PreviewInForm($_POST['mail_regd_max']));
+ $regd_max_hidden = new XoopsFormHidden("mail_regd_max", $myts->makeTboxData4PreviewInForm($_POST['mail_regd_max']));
+ $idle_more_hidden = new XoopsFormHidden("mail_idle_more", $myts->makeTboxData4PreviewInForm($_POST['mail_idle_more']));
+ $idle_less_hidden = new XoopsFormHidden("mail_idle_less", $myts->makeTboxData4PreviewInForm($_POST['mail_idle_less']));
+ $fname_hidden = new XoopsFormHidden("mail_fromname", $myts->makeTboxData4PreviewInForm($_POST['mail_fromname']));
+ $femail_hidden = new XoopsFormHidden("mail_fromemail", $myts->makeTboxData4PreviewInForm($_POST['mail_fromemail']));
+ $subject_hidden = new XoopsFormHidden("mail_subject", $myts->makeTboxData4PreviewInForm($_POST['mail_subject']));
+ $body_hidden = new XoopsFormHidden("mail_body", $myts->makeTareaData4PreviewInForm($_POST['mail_body']));
+ $start_hidden = new XoopsFormHidden("mail_start", $mail_end);
+ $to_hidden = new XoopsFormHidden("mail_send_to[]", "mail");
+ $op_hidden = new XoopsFormHidden("op", "send");
+ $submit_button = new XoopsFormButton("", "mail_submit", _AM_SENDNEXT, "submit");
+ $sent_label = new XoopsFormLabel(_AM_SENT, sprintf(_AM_SENTNUM, $_POST['mail_start']+1, $mail_end, $added_count));
+ $form->addElement($sent_label);
+ $form->addElement($inactive_hidden);
+ $form->addElement($lastlog_min_hidden);
+ $form->addElement($lastlog_max_hidden);
+ $form->addElement($regd_min_hidden);
+ $form->addElement($regd_max_hidden);
+ $form->addElement($idle_more_hidden);
+ $form->addElement($idle_less_hidden);
+ $form->addElement($fname_hidden);
+ $form->addElement($femail_hidden);
+ $form->addElement($subject_hidden);
+ $form->addElement($body_hidden);
+ $form->addElement($to_hidden);
+ $form->addElement($op_hidden);
+ $form->addElement($start_hidden);
+ $form->addElement($submit_button);
+ $form->display();
+ } else {
+ echo "<h4>"._AM_SENDCOMP."</h4>";
+ }
+ } else {
+ echo "<h4>"._AM_NOUSERMATCH."</h4>";
+ }
+ //CloseTable();
+ xoops_cp_footer();
+ }
+}
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/mailusers.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/main.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/main.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/main.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,33 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+include_once XOOPS_ROOT_PATH."/modules/system/admin/mailusers/mailusers.php";
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/main.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/xoops_version.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/xoops_version.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/xoops_version.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,45 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$modversion['name'] = _MD_AM_MLUS;
+$modversion['version'] = "";
+$modversion['description'] = "Send message to users via Email and PM";
+$modversion['author'] = "Kazumi Ono<br>( http://www.myweb.ne.jp/ )";
+$modversion['credits'] = "";
+$modversion['help'] = "mailusers.html";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 1;
+$modversion['image'] = "mailusers.gif";
+
+$modversion['hasAdmin'] = 1;
+$modversion['adminpath'] = "admin.php?fct=mailusers";
+$modversion['category'] = XOOPS_SYSTEM_MAILU;
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/mailusers/xoops_version.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/main.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/main.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/main.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,278 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit("Access Denied");
+}
+include_once XOOPS_ROOT_PATH."/modules/system/admin/modulesadmin/modulesadmin.php";
+$op = "list";
+if ( isset($_POST) ) {
+ foreach ( $_POST as $k => $v ) {
+ ${$k} = $v;
+ }
+}
+
+if (isset($_GET['op'])) {
+ $op = $_GET['op'];
+ $module = $_GET['module'];
+}
+
+if (in_array($op, array('submit', 'install_ok', 'update_ok', 'uninstall_ok'))) {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ $op = 'list';
+ }
+}
+
+if ( $op == "list" ) {
+ xoops_module_list();
+ exit();
+}
+
+if ( $op == "confirm" ) {
+ xoops_cp_header();
+ //OpenTable();
+ $error = array();
+ if ( !is_writable(XOOPS_CACHE_PATH.'/') ) {
+ // attempt to chmod 666
+ if ( !chmod(XOOPS_CACHE_PATH.'/', 0777) ) {
+ $error[] = sprintf(_MUSTWABLE, "<b>".XOOPS_CACHE_PATH.'/</b>');
+ }
+ }
+ if ( count($error) > 0 ) {
+ xoops_error($error);
+ echo "<p><a href='admin.php?fct=modulesadmin'>"._MD_AM_BTOMADMIN."</a></p>";
+ xoops_cp_footer();
+ exit();
+ }
+ echo "<h4 style='text-align:left;'>"._MD_AM_PCMFM."</h4>
+ <form action='admin.php' method='post'>
+ <input type='hidden' name='fct' value='modulesadmin' />
+ <input type='hidden' name='op' value='submit' />
+ <table width='100%' border='0' cellspacing='1' class='outer'>
+ <tr align='center'><th>"._MD_AM_MODULE."</th><th>"._MD_AM_ACTION."</th><th>"._MD_AM_ORDER."</th></tr>";
+ $mcount = 0;
+ $myts =& MyTextsanitizer::getInstance();
+ foreach ($module as $mid) {
+ if ($mcount % 2 != 0) {
+ $class = 'odd';
+ } else {
+ $class = 'even';
+ }
+ echo '<tr class="'.$class.'"><td align="center">'.$myts->stripSlashesGPC($oldname[$mid]);
+ $newname[$mid] = trim($myts->stripslashesGPC($newname[$mid]));
+ if ($newname[$mid] != $oldname[$mid]) {
+ echo ' »» <span style="color:#ff0000;font-weight:bold;">'.$newname[$mid].'</span>';
+ }
+ echo '</td><td align="center">';
+ if (isset($newstatus[$mid]) && $newstatus[$mid] ==1) {
+ if ($oldstatus[$mid] == 0) {
+ echo "<span style='color:#ff0000;font-weight:bold;'>"._MD_AM_ACTIVATE."</span>";
+ } else {
+ echo _MD_AM_NOCHANGE;
+ }
+ } else {
+ $newstatus[$mid] = 0;
+ if ($oldstatus[$mid] == 1) {
+ echo "<span style='color:#ff0000;font-weight:bold;'>"._MD_AM_DEACTIVATE."</span>";
+ } else {
+ echo _MD_AM_NOCHANGE;
+ }
+ }
+ echo "</td><td align='center'>";
+ if ($oldweight[$mid] != $weight[$mid]) {
+ echo "<span style='color:#ff0000;font-weight:bold;'>".$weight[$mid]."</span>";
+ } else {
+ echo $weight[$mid];
+ }
+ echo "
+ <input type='hidden' name='module[]' value='".$mid."' />
+ <input type='hidden' name='oldname[".$mid."]' value='".htmlspecialchars($oldname[$mid], ENT_QUOTES)."' />
+ <input type='hidden' name='newname[".$mid."]' value='".htmlspecialchars($newname[$mid], ENT_QUOTES)."' />
+ <input type='hidden' name='oldstatus[".$mid."]' value='".$oldstatus[$mid]."' />
+ <input type='hidden' name='newstatus[".$mid."]' value='".$newstatus[$mid]."' />
+ <input type='hidden' name='oldweight[".$mid."]' value='".intval($oldweight[$mid])."' />
+ <input type='hidden' name='weight[".$mid."]' value='".intval($weight[$mid])."' />
+ </td></tr>";
+ }
+ echo "
+ <tr class='foot' align='center'><td colspan='3'><input type='submit' value='"._MD_AM_SUBMIT."' /> <input type='button' value='"._MD_AM_CANCEL."' onclick='location=\"admin.php?fct=modulesadmin\"' />".$GLOBALS['xoopsSecurity']->getTokenHTML()."</td></tr>
+ </table>
+ </form>";
+ xoops_cp_footer();
+ exit();
+}
+if ( $op == "submit" ) {
+ $ret = array();
+ $write = false;
+ foreach ($module as $mid) {
+ if (isset($newstatus[$mid]) && $newstatus[$mid] ==1) {
+ if ($oldstatus[$mid] == 0) {
+ $ret[] = xoops_module_activate($mid);
+ }
+ } else {
+ if ($oldstatus[$mid] == 1) {
+ $ret[] = xoops_module_deactivate($mid);
+ }
+ }
+ $newname[$mid] = trim($newname[$mid]);
+ if ($oldname[$mid] != $newname[$mid] || $oldweight[$mid] != $weight[$mid]) {
+ $ret[] = xoops_module_change($mid, $weight[$mid], $newname[$mid]);
+ $write = true;
+ }
+ flush();
+ }
+ xoops_cp_header();
+ if ( count($ret) > 0 ) {
+ foreach ($ret as $msg) {
+ if ($msg != '') {
+ echo $msg;
+ }
+ }
+ }
+ echo "<br /><a href='admin.php?fct=modulesadmin'>"._MD_AM_BTOMADMIN."</a>";
+ xoops_cp_footer();
+ exit();
+}
+
+if ($op == 'install') {
+ $module_handler =& xoops_gethandler('module');
+ $mod =& $module_handler->create();
+ $mod->loadInfoAsVar($module);
+ if ($mod->getInfo('image') != false && trim($mod->getInfo('image')) != '') {
+ $msgs ='<img src="'.XOOPS_URL.'/modules/'.$mod->getVar('dirname').'/'.trim($mod->getInfo('image')).'" alt="" />';
+ }
+ $msgs .= '<br /><span style="font-size:smaller;";>'.$mod->getVar('name').'</span><br /><br />'._MD_AM_RUSUREINS;
+ xoops_cp_header();
+ include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
+ $form = new XoopsThemeForm('', 'form', 'admin.php', "post", true);
+ $form->addElement(new XoopsFormHidden('module', $module));
+ $form->addElement(new XoopsFormHidden('op', 'install_ok'));
+ $form->addElement(new XoopsFormHidden('fct', 'modulesadmin'));
+ $form->addElement(new XoopsFormLabel('', $msgs));
+ if ($mod->getVar('hasadmin')) {
+ $form->addElement(new XoopsFormSelectGroup(_MD_AM_SELECT_ADMINS, 'admingroups', false, null, 5, true));
+ }
+ if ($mod->getVar('hasmain')) {
+ $form->addElement(new XoopsFormSelectGroup(_MD_AM_SELECT_ACCESS, 'accessgroups', true, null, 5, true));
+ }
+ $form->addElement(new XoopsFormButton('', 'submit', _MD_AM_INSTALL, 'submit'));
+ $form->display();
+ xoops_cp_footer();
+ exit();
+}
+
+if ($op == 'install_ok') {
+ $dirname = $module;
+ $module_handler =& xoops_gethandler('module');
+ if ($module_handler->getCount(new Criteria('dirname', trim($dirname))) == 0) {
+ $module =& $module_handler->create();
+ $module->setVar('dirname', trim($dirname));
+ xoops_cp_header();
+ $html = '<h4 style="text-align:left;padding: 5px 0px; margin-bottom: 5px;border-bottom: dashed 1px #000000;">Installing '.$module->getInfo('name').'</h4>';
+
+ if ($module->getInfo('image') != false && trim($module->getInfo('image')) != '') {
+ $html .='<img src="'.XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.trim($module->getInfo('image')).'" alt="" />';
+ }
+ $html .='<br /><b>Version:</b> '.$module->getInfo('version');
+ if ($module->getInfo('author') != false && trim($module->getInfo('author')) != '') {
+ $html .='<br /><b>Author:</b> '.trim($module->getInfo('author'));
+ }
+ $html .= '<hr style="border-top: 0px; border-bottom: dashed 1px #000000;" />';
+ if (!isset($_REQUEST['admingroups'])) {
+ $_REQUEST['admingroups'] = array();
+ }
+ if (!isset($_REQUEST['accessgroups'])) {
+ $_REQUEST['accessgroups'] = array();
+ }
+ $html .= $module->install($_REQUEST['admingroups'], $_REQUEST['accessgroups']);
+ echo $html;
+ }
+ else {
+ echo "<p>".sprintf(_MD_AM_FAILINS, "<b>".$dirname."</b>")." "._MD_AM_ERRORSC."<br /> ".sprintf(_MD_AM_ALEXISTS, $dirname)."</p>";
+ }
+ echo "<br /><a href='admin.php?fct=modulesadmin'>"._MD_AM_BTOMADMIN."</a>";
+ xoops_cp_footer();
+ exit();
+}
+
+if ($op == 'uninstall') {
+ $module_handler =& xoops_gethandler('module');
+ $mod =& $module_handler->getByDirname($module);
+ if ($mod->getInfo('image') != false && trim($mod->getInfo('image')) != '') {
+ $msgs ='<img src="'.XOOPS_URL.'/modules/'.$mod->getVar('dirname').'/'.trim($mod->getInfo('image')).'" alt="" />';
+ }
+ $msgs .= '<br /><span style="font-size:smaller;";>'.$mod->getVar('name').'</span><br /><br />'._MD_AM_RUSUREUNINS;
+ xoops_cp_header();
+ xoops_confirm(array('module' => $module, 'op' => 'uninstall_ok', 'fct' => 'modulesadmin'), 'admin.php', $msgs, _YES);
+ xoops_cp_footer();
+ exit();
+}
+
+if ($op == 'uninstall_ok') {
+ $ret = array();
+ $ret[] = xoops_module_uninstall($module);
+ xoops_cp_header();
+ if (count($ret) > 0) {
+ foreach ($ret as $msg) {
+ if ($msg != '') {
+ echo $msg;
+ }
+ }
+ }
+ echo "<a href='admin.php?fct=modulesadmin'>"._MD_AM_BTOMADMIN."</a>";
+ xoops_cp_footer();
+ exit();
+}
+
+if ($op == 'update') {
+ $module_handler =& xoops_gethandler('module');
+ $mod =& $module_handler->getByDirname($module);
+ if ($mod->getInfo('image') != false && trim($mod->getInfo('image')) != '') {
+ $msgs ='<img src="'.XOOPS_URL.'/modules/'.$mod->getVar('dirname').'/'.trim($mod->getInfo('image')).'" alt="" />';
+ }
+ $msgs .= '<br /><span style="font-size:smaller;";>'.$mod->getVar('name').'</span><br /><br />'._MD_AM_RUSUREUPD;
+ xoops_cp_header();
+ xoops_confirm(array('dirname' => $module, 'op' => 'update_ok', 'fct' => 'modulesadmin'), 'admin.php', $msgs, _MD_AM_UPDATE);
+ xoops_cp_footer();
+ exit();
+}
+
+if ($op == 'update_ok') {
+ $dirname = trim($dirname);
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->getByDirname($dirname);
+ xoops_cp_header();
+ echo $module->update();
+ echo "<br /><a href='admin.php?fct=modulesadmin'>"._MD_AM_BTOMADMIN."</a>";
+ xoops_cp_footer();
+}
+
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/main.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/modulesadmin.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/modulesadmin.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/modulesadmin.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,365 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+function xoops_module_list()
+{
+ xoops_cp_header();
+ //OpenTable();
+ echo "
+ <h4 style='text-align:left'>"._MD_AM_MODADMIN."</h4>
+ <form action='admin.php' method='post' name='moduleadmin' id='moduleadmin'>
+ <table class='outer' width='100%' cellpadding='4' cellspacing='1'>
+ <tr align='center'><th>"._MD_AM_MODULE."</th><th>"._MD_AM_VERSION."</th><th>"._MD_AM_LASTUP."</th><th>"._MD_AM_ACTIVE."</th><th>"._MD_AM_ORDER."<br /><small>"._MD_AM_ORDER0."</small></th><th>"._MD_AM_ACTION."</th></tr>
+ ";
+ $module_handler =& xoops_gethandler('module');
+ $installed_mods =& $module_handler->getObjects();
+ $listed_mods = array();
+ $count = 0;
+ foreach ( $installed_mods as $module ) {
+ if ($count % 2 == 0) {
+ $class = 'even';
+ } else {
+ $class = 'odd';
+ }
+ $count++;
+ echo "<tr class='$class' align='center' valign='middle'>\n";
+ echo "<td valign='bottom'>";
+ if ( $module->getVar('hasadmin') == 1 && $module->getVar('isactive') == 1) {
+ echo '<a href="'.XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$module->getInfo('adminindex').'"><img src="'.XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$module->getInfo('image').'" alt="'.$module->getVar('name', 'E').'" border="0" /></a><br /><input type="text" name="newname['.$module->getVar('mid').']" value="'.$module->getVar('name', 'E').'" maxlength="150" size="20" />';
+ } else {
+ echo '<img src="'.XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$module->getInfo('image').'" alt="'.$module->getVar('name', 'E').'" border="0" /><br /><input type="text" name="newname['.$module->getVar('mid').']" value="'.$module->getVar('name', 'E').'" maxlength="150" size="20" />';
+ }
+ echo '<input type="hidden" name="oldname['.$module->getVar('mid').']" value="' .$module->getVar('name').'" /></td>';
+ echo "<td align='center'>".round($module->getVar('version') / 100, 2)."</td><td align='center'>".formatTimestamp($module->getVar('last_update'),'m')."<br />";
+ if ($module->getVar('dirname') != 'system' && $module->getVar('isactive') == 1) {
+ echo '</td><td><input type="checkbox" name="newstatus['.$module->getVar('mid').']" value="1" checked="checked" /><input type="hidden" name="oldstatus['.$module->getVar('mid').']" value="1" />';
+ $extra = '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&op=update&module='.$module->getVar('dirname').'"><img src="'.XOOPS_URL.'/modules/system/images/update.gif" alt="'._MD_AM_UPDATE.'" /></a>';
+ } elseif ($module->getVar('dirname') != 'system') {
+ echo '</td><td><input type="checkbox" name="newstatus['.$module->getVar('mid').']" value="1" /><input type="hidden" name="oldstatus['.$module->getVar('mid').']" value="0" />';
+ $extra = '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&op=update&module='.$module->getVar('dirname').'"><img src="'.XOOPS_URL.'/modules/system/images/update.gif" alt="'._MD_AM_UPDATE.'" /></a> <a href="'.XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&op=uninstall&module='.$module->getVar('dirname').'"><img src="'.XOOPS_URL.'/modules/system/images/uninstall.gif" alt="'._MD_AM_UNINSTALL.'" /></a>';
+ } else {
+ echo '</td><td><input type="checkbox" name="newstatus['.$module->getVar('mid').']" value="1" checked="checked" /><input type="hidden" name="oldstatus['.$module->getVar('mid').']" value="1" />';
+ $extra = '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&op=update&module='.$module->getVar('dirname').'"><img src="'.XOOPS_URL.'/modules/system/images/update.gif" alt="'._MD_AM_UPDATE.'" /></a>';
+ }
+ echo "</td><td>";
+ if ($module->getVar('hasmain') == 1) {
+ echo '<input type="hidden" name="oldweight['.$module->getVar('mid').']" value="'.$module->getVar('weight').'" /><input type="text" name="weight['.$module->getVar('mid').']" size="3" maxlength="5" value="'.$module->getVar('weight').'" />';
+ } else {
+ echo '<input type="hidden" name="oldweight['.$module->getVar('mid').']" value="0" /><input type="hidden" name="weight['.$module->getVar('mid').']" value="0" />';
+ }
+ echo "
+ </td>
+ <td>".$extra." <a href='javascript:openWithSelfMain(\"".XOOPS_URL."/modules/system/admin.php?fct=version&mid=".$module->getVar('mid')."\",\"Info\",300,230);'>";
+ echo '<img src="'.XOOPS_URL.'/modules/system/images/info.gif" alt="'._INFO.'" /></a><input type="hidden" name="module[]" value="'.$module->getVar('mid').'" /></td>
+ </tr>
+ ';
+ $listed_mods[] = $module->getVar('dirname');
+ }
+ echo "<tr class='foot'><td colspan='6' align='center'><input type='hidden' name='fct' value='modulesadmin' />
+ <input type='hidden' name='op' value='confirm' />
+ <input type='submit' name='submit' value='"._MD_AM_SUBMIT."' />
+ </td></tr></table>
+ </form>
+ <br />
+ <table width='100%' border='0' class='outer' cellpadding='4' cellspacing='1'>
+ <tr align='center'><th>"._MD_AM_MODULE."</th><th>"._MD_AM_VERSION."</th><th>"._MD_AM_ACTION."</th></tr>
+ ";
+ $modules_dir = XOOPS_ROOT_PATH."/modules";
+ $handle = opendir($modules_dir);
+ $count = 0;
+ while ($file = readdir($handle)) {
+ clearstatcache();
+ $file = trim($file);
+ if ($file != '' && strtolower($file) != 'cvs' && !preg_match("/^[.]{1,2}$/",$file) && is_dir($modules_dir.'/'.$file)) {
+ if ( !in_array($file, $listed_mods) ) {
+ $module =& $module_handler->create();
+ $module->loadInfo($file);
+ if ($count % 2 == 0) {
+ $class = 'even';
+ } else {
+ $class = 'odd';
+ }
+ echo '<tr class="'.$class.'" align="center" valign="middle">
+ <td align="center" valign="bottom"><img src="'.XOOPS_URL.'/modules/'.$module->getInfo('dirname').'/'.$module->getInfo('image').'" alt="'.htmlspecialchars($module->getInfo('name')).'" border="0" /></td>
+ <td align="center">'.round($module->getInfo('version'), 2).'</td>
+ <td>
+ <a href="'.XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&op=install&module='.$module->getInfo('dirname').'"><img src="'.XOOPS_URL.'/modules/system/images/install.gif" alt="'._MD_AM_INSTALL.'" /></a>';
+ echo " <a href='javascript:openWithSelfMain(\"".XOOPS_URL."/modules/system/admin.php?fct=version&mid=".$module->getInfo('dirname')."\",\"Info\",300,230);'>";
+ echo '<img src="'.XOOPS_URL.'/modules/system/images/info.gif" alt="'._INFO.'" /></a></td></tr>
+ ';
+ unset($module);
+ $count++;
+ }
+ }
+ }
+ echo "</table>";
+ //CloseTable();
+ xoops_cp_footer();
+}
+
+function xoops_module_uninstall($dirname)
+{
+ global $xoopsConfig;
+ $reservedTables = array('avatar', 'avatar_users_link', 'block_module_link', 'xoopscomments', 'config', 'configcategory', 'configoption', 'image', 'imagebody', 'imagecategory', 'imgset', 'imgset_tplset_link', 'imgsetimg', 'groups','groups_users_link','group_permission', 'online', 'bannerclient', 'banner', 'bannerfinish', 'ranks', 'session', 'smiles', 'users', 'newblocks', 'modules', 'tplfile', 'tplset', 'tplsource', 'xoopsnotifications', 'banner', 'bannerclient', 'bannerfinish');
+ $db =& Database::getInstance();
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->getByDirname($dirname);
+ include_once XOOPS_ROOT_PATH.'/class/template.php';
+ xoops_template_clear_module_cache($module->getVar('mid'));
+ if ($module->getVar('dirname') == 'system') {
+ return "<p>".sprintf(_MD_AM_FAILUNINS, "<b>".$module->getVar('name')."</b>")." "._MD_AM_ERRORSC."<br /> - "._MD_AM_SYSNO."</p>";
+ } elseif ($module->getVar('dirname') == $xoopsConfig['startpage']) {
+ return "<p>".sprintf(_MD_AM_FAILUNINS, "<b>".$module->getVar('name')."</b>")." "._MD_AM_ERRORSC."<br /> - "._MD_AM_STRTNO."</p>";
+ } else {
+ $msgs = array();
+ if (!$module_handler->delete($module)) {
+ $msgs[] = ' <span style="color:#ff0000;">ERROR: Could not delete '.$module->getVar('name').'</span>';
+ } else {
+
+ // delete template files
+ $tplfile_handler = xoops_gethandler('tplfile');
+ $templates =& $tplfile_handler->find(null, 'module', $module->getVar('mid'));
+ $tcount = count($templates);
+ if ($tcount > 0) {
+ $msgs[] = 'Deleting templates...';
+ for ($i = 0; $i < $tcount; $i++) {
+ if (!$tplfile_handler->delete($templates[$i])) {
+ $msgs[] = ' <span style="color:#ff0000;">ERROR: Could not delete template '.$templates[$i]->getVar('tpl_file').' from the database. Template ID: <b>'.$templates[$i]->getVar('tpl_id').'</b></span>';
+ } else {
+ $msgs[] = ' Template <b>'.$templates[$i]->getVar('tpl_file').'</b> deleted from the database. Template ID: <b>'.$templates[$i]->getVar('tpl_id').'</b>';
+ }
+ }
+ }
+ unset($templates);
+
+ // delete blocks and block template files
+ $block_handler =& xoops_gethandler('block');
+ $block_arr =& $block_handler->getByModule($module->getVar('mid'));
+ if (is_array($block_arr)) {
+ $bcount = count($block_arr);
+ $msgs[] = 'Deleting block...';
+ for ($i = 0; $i < $bcount; $i++) {
+ if (!$block_handler->delete($block_arr[$i])) {
+ $msgs[] = ' <span style="color:#ff0000;">ERROR: Could not delete block <b>'.$block_arr[$i]->getVar('name').'</b> Block ID: <b>'.$block_arr[$i]->getVar('bid').'</b><br />'.implode('<br />', $block_arr[$i]->getErrors()).'</span>';
+ } else {
+ $msgs[] = ' Block <b>'.$block_arr[$i]->getVar('name').'</b> deleted. Block ID: <b>'.$block_arr[$i]->getVar('bid').'</b>';
+ }
+ }
+ // delete any left-over block templates
+ $templates =& $tplfile_handler->find(null, 'block', $module->getVar('mid'));
+ $tcount = count($templates);
+ if ($tcount > 0) {
+ $msgs[] = 'Deleting templates...';
+ for ($i = 0; $i < $tcount; $i++) {
+ if (!$tplfile_handler->delete($templates[$i])) {
+ $msgs[] = ' <span style="color:#ff0000;">ERROR: Could not delete template '.$templates[$i]->getVar('tpl_file').' from the database. Template ID: <b>'.$templates[$i]->getVar('tpl_id').'</b></span>';
+ } else {
+ $msgs[] = ' Template <b>'.$templates[$i]->getVar('tpl_file').'</b> deleted from the database. Template ID: <b>'.$templates[$i]->getVar('tpl_id').'</b>';
+ }
+ }
+ }
+ unset($templates);
+ }
+
+ // delete tables used by this module
+ $modtables = $module->getInfo('tables');
+ if ($modtables != false && is_array($modtables)) {
+ $msgs[] = 'Deleting module tables...';
+ foreach ($modtables as $table) {
+ // prevent deletion of reserved core tables!
+ if (!in_array($table, $reservedTables)) {
+ $sql = 'DROP TABLE '.$db->prefix($table);
+ if (!$db->query($sql)) {
+ $msgs[] = ' <span style="color:#ff0000;">ERROR: Could not drop table <b>'.$db->prefix($table).'<b>.</span>';
+ } else {
+ $msgs[] = ' Table <b>'.$db->prefix($table).'</b> dropped.</span>';
+ }
+ } else {
+ $msgs[] = ' <span style="color:#ff0000;">ERROR: Not allowed to drop table <b>'.$db->prefix($table).'</b>!</span>';
+ }
+ }
+ }
+
+ // delete comments if any
+ if ($module->getVar('hascomments') != 0) {
+ $msgs[] = 'Deleting comments...';
+ $comment_handler =& xoops_gethandler('comment');
+ if (!$comment_handler->deleteByModule($module->getVar('mid'))) {
+ $msgs[] = ' <span style="color:#ff0000;">ERROR: Could not delete comments</span>';
+ } else {
+ $msgs[] = ' Comments deleted';
+ }
+ }
+
+ // RMV-NOTIFY
+ // delete notifications if any
+ if ($module->getVar('hasnotification') != 0) {
+ $msgs[] = 'Deleting notifications...';
+ if (!xoops_notification_deletebymodule($module->getVar('mid'))) {
+ $msgs[] = ' <span style="color:#ff0000;">ERROR: Could not delete notifications</span>';
+ } else {
+ $msgs[] = ' Notifications deleted';
+ }
+ }
+
+ // delete permissions if any
+ $gperm_handler =& xoops_gethandler('groupperm');
+ if (!$gperm_handler->deleteByModule($module->getVar('mid'))) {
+ $msgs[] = ' <span style="color:#ff0000;">ERROR: Could not delete group permissions</span>';
+ } else {
+ $msgs[] = ' Group permissions deleted';
+ }
+
+ // delete module config options if any
+ if ($module->getVar('hasconfig') != 0 || $module->getVar('hascomments') != 0) {
+ $config_handler =& xoops_gethandler('config');
+ $configs =& $config_handler->getConfigs(new Criteria('conf_modid', $module->getVar('mid')));
+ $confcount = count($configs);
+ if ($confcount > 0) {
+ $msgs[] = 'Deleting module config options...';
+ for ($i = 0; $i < $confcount; $i++) {
+ if (!$config_handler->deleteConfig($configs[$i])) {
+ $msgs[] = ' <span style="color:#ff0000;">ERROR: Could not delete config data from the database. Config ID: <b>'.$configs[$i]->getvar('conf_id').'</b></span>';
+ } else {
+ $msgs[] = ' Config data deleted from the database. Config ID: <b>'.$configs[$i]->getVar('conf_id').'</b>';
+ }
+ }
+ }
+ // delete module config categories if any
+ $configcat_handler =& xoops_gethandler('configcategory');
+ $configcats =& $configcat_handler->getCatByModule($module->getVar('mid'));
+ if (count($configcats) > 0) {
+ $msgs[] = 'Deleting module config categories...';
+ foreach (array_keys($configcats) as $i) {
+ if (!$configcat_handler->delete($configcats[$i])) {
+ $msgs[] = ' <span style="color:#ff0000;">ERROR: Could not delete config category from the database. Config Category: <b>'.$configcats[$i]->getvar('confcat_nameid').'</b></span>';
+ } else {
+ $msgs[] = ' Config category data deleted from the database. Config Category: <b>'.$configcats[$i]->getVar('confcat_nameid').'</b>';
+ }
+ }
+ }
+ }
+
+ // delete module user profiles if any
+ if ($module->getInfo('hasProfile') != 0) {
+ $profile_handler =& xoops_gethandler('profile');
+ $fields =& $profile_handler->getFields(new Criteria('field_moduleid', $module->getVar('mid')));
+ if (count($fields) > 0) {
+ $msgs[] = 'Deleting module profile fields...';
+ foreach (array_keys($fields) as $i) {
+ if (!$profile_handler->deleteField($fields[$i])) {
+ $msgs[] = ' <span style="color:#ff0000;">ERROR: Could not delete field data from the database. Field : <b>'.$fields[$i]->getVar('field_name').'</b></span>';
+ } else {
+ $msgs[] = ' Field data deleted from the database. Field : <b>'.$fields[$i]->getVar('field_name').'</b>';
+ }
+ }
+ }
+ }
+
+ // execute module specific uninstall script if any
+ $uninstall_script = $module->getInfo('onUninstall');
+ if (false != $uninstall_script && trim($uninstall_script) != '') {
+ include_once XOOPS_ROOT_PATH.'/modules/'.$dirname.'/'.trim($uninstall_script);
+ if (function_exists('xoops_module_uninstall_'.$dirname)) {
+ $func = 'xoops_module_uninstall_'.$dirname;
+ if (!$func($module)) {
+ $msgs[] = 'Failed to execute <b>'.$func.'</b>';
+ } else {
+ $msgs[] = '<b>'.$func.'</b> executed successfully.';
+ }
+ }
+ }
+
+ $msgs[] = '</code><p>'.sprintf(_MD_AM_OKUNINS, "<b>".$module->getVar('name')."</b>").'</p>';
+ }
+ $ret = '<code>';
+ foreach ($msgs as $msg) {
+ $ret .= $msg.'<br />';
+ }
+ return $ret;
+ }
+}
+
+function xoops_module_activate($mid)
+{
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->get($mid);
+ include_once XOOPS_ROOT_PATH.'/class/template.php';
+ xoops_template_clear_module_cache($module->getVar('mid'));
+ $module->setVar('isactive', 1);
+ if (!$module_handler->insert($module)) {
+ $ret = "<p>".sprintf(_MD_AM_FAILACT, "<b>".$module->getVar('name')."</b>")." "._MD_AM_ERRORSC."<br />".$module->getHtmlErrors();
+ return $ret."</p>";
+ }
+ $block_handler =& xoops_gethandler('block');
+ $block_handler->updateAll('isactive', 1, new Criteria('mid', $mid));
+ return "<p>".sprintf(_MD_AM_OKACT, "<b>".$module->getVar('name')."</b>")."</p>";
+}
+
+function xoops_module_deactivate($mid)
+{
+ global $xoopsConfig;
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->get($mid);
+ include_once XOOPS_ROOT_PATH.'/class/template.php';
+ xoops_template_clear_module_cache($mid);
+ $module->setVar('isactive', 0);
+ if ($module->getVar('dirname') == "system") {
+ return "<p>".sprintf(_MD_AM_FAILDEACT, "<b>".$module->getVar('name')."</b>")." "._MD_AM_ERRORSC."<br /> - "._MD_AM_SYSNO."</p>";
+ } elseif ($module->getVar('dirname') == $xoopsConfig['startpage']) {
+ return "<p>".sprintf(_MD_AM_FAILDEACT, "<b>".$module->getVar('name')."</b>")." "._MD_AM_ERRORSC."<br /> - "._MD_AM_STRTNO."</p>";
+ } else {
+ if (!$module_handler->insert($module)) {
+ $ret = "<p>".sprintf(_MD_AM_FAILDEACT, "<b>".$module->getVar('name')."</b>")." "._MD_AM_ERRORSC."<br />".$module->getHtmlErrors();
+ return $ret."</p>";
+ }
+ $block_handler =& xoops_gethandler('block');
+ $block_handler->updateAll('isactive', 1, new Criteria('mid', $mid));
+ return "<p>".sprintf(_MD_AM_OKDEACT, "<b>".$module->getVar('name')."</b>")."</p>";
+ }
+}
+
+function xoops_module_change($mid, $weight, $name)
+{
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->get($mid);
+ $module->setVar('weight', $weight);
+ $module->setVar('name', $name);
+ $myts =& MyTextSanitizer::getInstance();
+ if (!$module_handler->insert($module)) {
+ $ret = "<p>".sprintf(_MD_AM_FAILORDER, "<b>".$myts->stripSlashesGPC($name)."</b>")." "._MD_AM_ERRORSC."<br />";
+ $ret .= $module->getHtmlErrors()."</p>";
+ return $ret;
+ }
+ return "<p>".sprintf(_MD_AM_OKORDER, "<b>".$myts->stripSlashesGPC($name)."</b>")."</p>";
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/modulesadmin.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/xoops_version.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/xoops_version.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/xoops_version.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,44 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$modversion['name'] = _MD_AM_MDAD;
+$modversion['version'] = "";
+$modversion['description'] = "Modules Administration";
+$modversion['author'] = "Kazumi Ono<br>( http://www.mywebaddons.com/ )";
+$modversion['credits'] = "";
+$modversion['help'] = "modulesadmin.html";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 1;
+$modversion['image'] = "modulesadmin.gif";
+$modversion['hasAdmin'] = 1;
+$modversion['adminpath'] = "admin.php?fct=modulesadmin";
+$modversion['category'] = XOOPS_SYSTEM_MODULE;
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/modulesadmin/xoops_version.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/preferences/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/preferences/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/preferences/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/preferences/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/preferences/main.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/preferences/main.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/preferences/main.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,391 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit("Access Denied");
+} else {
+ $op = isset($_REQUEST['op']) ? trim($_REQUEST['op']) : "list";
+
+ if ($op == 'list') {
+ $gperm_handler =& xoops_gethandler('groupperm');
+ $admin_mids =& $gperm_handler->getItemIds('module_admin', $xoopsUser->getGroups());
+ if ($gperm_handler->checkRight('system_admin', XOOPS_SYSTEM_PREF, $xoopsUser->getGroups())) {
+ array_push($admin_mids, 1);
+ }
+
+ $confcat_handler =& xoops_gethandler('configcategory');
+ $confcats =& $confcat_handler->getObjects(new Criteria('confcat_modid', "(".implode(',', $admin_mids).")", "IN"));
+ $catcount = count($confcats);
+
+ foreach (array_keys($confcats) as $i) {
+ $modcats[$confcats[$i]->getVar('confcat_modid')]['categories'][$confcats[$i]->getVar('confcat_id')] =& $confcats[$i];
+ }
+
+ $module_handler =& xoops_gethandler('module');
+ $modules =& $module_handler->getList(new Criteria('mid', "(".implode(',', array_keys($modcats)).")", 'IN'));
+
+ foreach (array_keys($modules) as $modid) {
+ $modcats[$modid]['module'] = $modules[$modid];
+ $modnames[$modid] = ucfirst($modules[$modid]);
+ if ($modid == 1) {
+ //Put System module at the top of the list
+ $modnames[$modid] = " ".$modules[$modid];
+ }
+ }
+ array_multisort($modnames, SORT_ASC, $modcats);
+
+ xoops_cp_header();
+ foreach (array_keys($modcats) as $k) {
+ echo '<h4 style="text-align:left">'.sprintf(_MD_AM_SITEPREF, $modcats[$k]['module']).'</h4><ul>';
+ foreach (array_keys($modcats[$k]['categories']) as $i) {
+ echo '<li>'.constant($modcats[$k]['categories'][$i]->getVar('confcat_name')).' [<a href="admin.php?fct=preferences&op=showmod&confcat_id='.$modcats[$k]['categories'][$i]->getVar('confcat_id').'&mod='.$modcats[$k]['categories'][$i]->getVar('confcat_modid').'">'._EDIT.'</a>]</li>';
+ }
+ echo '</ul>';
+ }
+ xoops_cp_footer();
+ exit();
+ }
+
+ if ($op == 'showmod') {
+
+ $mod = isset($_REQUEST['mod']) ? intval($_REQUEST['mod']) : 1;
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->get($mod);
+ $confcat_id = isset($_REQUEST['confcat_id']) ? intval($_REQUEST['confcat_id']) : 0;
+
+ $confcat_handler =& xoops_gethandler('configcategory');
+// if ($confcat_id == 0) {
+// $confcat = $confcat_handler->getCatByModule($module->getVar('mid'), false);
+// $confcat = $confcat[0];
+// $confcat_id = $confcat->getVar('confcat_id');
+// }
+// else {
+ $confcat =& $confcat_handler->get(array($confcat_id, $mod));
+// }
+ $configcriteria = new CriteriaCompo(new Criteria('conf_catid', $confcat_id));
+ $configcriteria->add(new Criteria('conf_modid', $mod));
+
+ $config_handler =& xoops_gethandler('config');
+ $config =& $config_handler->getConfigs($configcriteria);
+ unset($configcriteria);
+
+ $count = count($config);
+ if ($count < 1) {
+ redirect_header('admin.php?fct=preferences', 1);
+ }
+
+ $module->loadLanguage('modinfo');
+ include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+ $form = new XoopsThemeForm(constant($confcat->getVar('confcat_name')), 'pref_form', 'admin.php?fct=preferences', 'post', true);
+
+ // if has comments feature, need comment lang file
+ if ($module->getVar('hascomments') == 1) {
+ include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
+ }
+ // RMV-NOTIFY
+ // if has notification feature, need notification lang file
+ if ($module->getVar('hasnotification') == 1) {
+ include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/notification.php';
+ }
+
+ $modname = $module->getVar('name');
+ for ($i = 0; $i < $count; $i++) {
+ $title = (!defined($config[$i]->getVar('conf_desc')) || constant($config[$i]->getVar('conf_desc')) == '') ? constant($config[$i]->getVar('conf_title')) : constant($config[$i]->getVar('conf_title')).'<br /><br /><span style="font-weight:normal;">'.constant($config[$i]->getVar('conf_desc')).'</span>';
+ switch ($config[$i]->getVar('conf_formtype')) {
+ case 'textarea':
+ $myts =& MyTextSanitizer::getInstance();
+ if ($config[$i]->getVar('conf_valuetype') == 'array') {
+ // this is exceptional.. only when value type is arrayneed a smarter way for this
+ $ele = ($config[$i]->getVar('conf_value') != '') ? new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), $myts->htmlspecialchars(implode('|', $config[$i]->getConfValueForOutput())), 5, 50) : new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), '', 5, 50);
+ } else {
+ $ele = new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), $myts->htmlspecialchars($config[$i]->getConfValueForOutput()), 5, 50);
+ }
+ break;
+ case 'select':
+ $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput());
+ $options =& $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id')));
+ $opcount = count($options);
+ for ($j = 0; $j < $opcount; $j++) {
+ $optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value');
+ $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name');
+ $ele->addOption($optval, $optkey);
+ }
+ break;
+ case 'select_multi':
+ $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), 5, true);
+ $options =& $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id')));
+ $opcount = count($options);
+ for ($j = 0; $j < $opcount; $j++) {
+ $optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value');
+ $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name');
+ $ele->addOption($optval, $optkey);
+ }
+ break;
+ case 'yesno':
+ $ele = new XoopsFormRadioYN($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), _YES, _NO);
+ break;
+ case 'group':
+ include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
+ $ele = new XoopsFormSelectGroup($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 1, false);
+ break;
+ case 'group_multi':
+ include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
+ $ele = new XoopsFormSelectGroup($title, $config[$i]->getVar('conf_name'), true, $config[$i]->getConfValueForOutput(), 5, true);
+ break;
+ // RMV-NOTIFY: added 'user' and 'user_multi'
+ case 'user':
+ include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
+ $ele = new XoopsFormSelectUser($title, $config[$i]->getVar('conf_name'), true, $config[$i]->getConfValueForOutput());
+ break;
+ case 'user_multi':
+ include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
+ $ele = new XoopsFormSelectUser($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), true, 10, true);
+ break;
+ case 'password':
+ $myts =& MyTextSanitizer::getInstance();
+ $ele = new XoopsFormPassword($title, $config[$i]->getVar('conf_name'), 50, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
+ break;
+ case 'textbox':
+ default:
+ $myts =& MyTextSanitizer::getInstance();
+ $ele = new XoopsFormText($title, $config[$i]->getVar('conf_name'), 50, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput()));
+ break;
+ case 'theme':
+ case 'theme_multi':
+ $ele = ($config[$i]->getVar('conf_formtype') != 'theme_multi') ? new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()) : new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), 5, true);
+ $handle = opendir(XOOPS_THEME_PATH.'/');
+ $dirlist = array();
+ while (false !== ($file = readdir($handle))) {
+ if (is_dir(XOOPS_THEME_PATH.'/'.$file) && !preg_match("/^[.]{1,2}$/",$file) && strtolower($file) != 'cvs') {
+ if (file_exists(XOOPS_THEME_PATH."/".$file."/theme.html") || file_exists(XOOPS_THEME_PATH."/".$file."/theme.php")) {
+ $dirlist[$file]=$file;
+ }
+ }
+ }
+ closedir($handle);
+ if (!empty($dirlist)) {
+ asort($dirlist);
+ $ele->addOptionArray($dirlist);
+ }
+ break;
+
+ case 'theme_admin':
+ $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput());
+ $ele->addOption(0, _MD_AM_FRONTSIDE_THEME);
+
+ $handle = opendir(XOOPS_THEME_PATH.'/');
+ $dirlist = array();
+ while (false !== ($file = readdir($handle))) {
+ if (is_dir(XOOPS_THEME_PATH.'/'.$file) && !preg_match("/^[.]{1,2}$/",$file) && strtolower($file) != 'cvs') {
+ if (file_exists(XOOPS_THEME_PATH."/".$file."/themeadmin.html")) {
+ $dirlist[$file]=$file;
+ }
+ }
+ }
+ closedir($handle);
+ if (!empty($dirlist)) {
+ asort($dirlist);
+ $ele->addOptionArray($dirlist);
+ }
+ break;
+
+ case 'tplset':
+ $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput());
+ $tplset_handler =& xoops_gethandler('tplset');
+ $tplsetlist =& $tplset_handler->getList();
+ asort($tplsetlist);
+ foreach ($tplsetlist as $key => $name) {
+ $ele->addOption($key, $name);
+ }
+ break;
+ case 'timezone':
+ $ele = new XoopsFormSelectTimezone($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput());
+ break;
+ case 'language':
+ $ele = new XoopsFormSelectLang($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput());
+ break;
+ case 'startpage':
+ $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput());
+ $module_handler =& xoops_gethandler('module');
+ $criteria = new CriteriaCompo(new Criteria('hasmain', 1));
+ $criteria->add(new Criteria('isactive', 1));
+ $moduleslist =& $module_handler->getList($criteria, true);
+ $moduleslist['--'] = _MD_AM_NONE;
+ $ele->addOptionArray($moduleslist);
+ break;
+ case 'site_cache':
+ $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput());
+ $ele->addOptionArray(array('0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK));
+ break;
+ case 'module_cache':
+ $module_handler =& xoops_gethandler('module');
+ $modules =& $module_handler->getObjects(new Criteria('hasmain', 1), true);
+ $currrent_val = $config[$i]->getConfValueForOutput();
+ $cache_options = array('0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK);
+ if (count($modules) > 0) {
+ $ele = new XoopsFormElementTray($title, '<br />');
+ foreach (array_keys($modules) as $mid) {
+ $c_val = isset($currrent_val[$mid]) ? intval($currrent_val[$mid]) : null;
+ $selform = new XoopsFormSelect($modules[$mid]->getVar('name'), $config[$i]->getVar('conf_name')."[$mid]", $c_val);
+ $selform->addOptionArray($cache_options);
+ $ele->addElement($selform);
+ unset($selform);
+ }
+ } else {
+ $ele = new XoopsFormLabel($title, _MD_AM_NOMODULE);
+ }
+ break;
+ }
+ $hidden = new XoopsFormHidden('conf_ids[]', $config[$i]->getVar('conf_id'));
+ $form->addElement($ele);
+ $form->addElement($hidden);
+ unset($ele);
+ unset($hidden);
+ }
+ $form->addElement(new XoopsFormHidden('op', 'save'));
+ $form->addElement(new XoopsFormButton('', 'button', _GO, 'submit'));
+ xoops_cp_header();
+ if ($confcat->getVar('confcat_description') != "") {
+ echo "<div style='float: right; width: 50%'>".constant($confcat->getVar('confcat_description'))."</div>";
+ }
+ echo '<div style="float: left; width: 45%;"><a href="admin.php?fct=preferences">'. _MD_AM_PREFMAIN .'</a> <span style="font-weight:bold;">»»</span> '.constant($confcat->getVar('confcat_name')).'</div><br style="clear:both;"/><br />';
+
+ $form->display();
+ xoops_cp_footer();
+ exit();
+ }
+
+ if ($op == 'save') {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=preferences", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $xoopsTpl->clear_all_cache();
+
+ $count = count($_REQUEST['conf_ids']);
+ $tpl_updated = false;
+ $theme_updated = false;
+ $startmod_updated = false;
+ $lang_updated = false;
+ if ($count > 0) {
+ array_map("intval", $_REQUEST['conf_ids']);
+ $configs =& $config_handler->getConfigs(new Criteria('conf_id', "(".implode(',', $_REQUEST['conf_ids']).")", "IN"));
+ foreach (array_keys($configs) as $i) {
+ $config =& $configs[$i];
+ $new_value =& $_REQUEST[$config->getVar('conf_name')];
+ if (is_array($new_value) || $new_value != $config->getVar('conf_value')) {
+ // if language has been changed
+ if (!$lang_updated && $config->getVar('conf_catid') == XOOPS_CONF && $config->getVar('conf_name') == 'language') {
+ // regenerate admin menu file
+ $xoopsConfig['language'] = ${$config->getVar('conf_name')};
+ $lang_updated = true;
+ }
+
+ // if default template set has been changed
+ if (!$tpl_updated && $config->getVar('conf_catid') == XOOPS_CONF && $config->getVar('conf_name') == 'template_set') {
+ // clear cached/compiled files and regenerate them if default theme has been changed
+ if ($xoopsConfig['template_set'] != ${$config->getVar('conf_name')}) {
+ $newtplset = ${$config->getVar('conf_name')};
+
+ // clear all compiled and cachedfiles
+ $xoopsTpl->clear_compiled_tpl();
+
+ // generate compiled files for the new theme
+ // block files only for now..
+ $tplfile_handler =& xoops_gethandler('tplfile');
+ $dtemplates =& $tplfile_handler->find('default', 'block');
+ $dcount = count($dtemplates);
+
+ // need to do this to pass to xoops_template_touch function
+ $GLOBALS['xoopsConfig']['template_set'] = $newtplset;
+
+ for ($i = 0; $i < $dcount; $i++) {
+ $found =& $tplfile_handler->find($newtplset, 'block', $dtemplates[$i]->getVar('tpl_refid'), null);
+ if (count($found) > 0) {
+ // template for the new theme found, compile it
+ xoops_template_touch($found[0]);
+ } else {
+ // not found, so compile 'default' template file
+ xoops_template_touch($dtemplates[$i]);
+ }
+ }
+
+ // generate image cache files from image binary data, save them under cache/
+ $image_handler =& xoops_gethandler('imagesetimg');
+ $imagefiles =& $image_handler->getObjects(new Criteria('tplset_name', $newtplset), true);
+ foreach (array_keys($imagefiles) as $i) {
+ if (!$fp = fopen(XOOPS_CACHE_PATH.'/'.$newtplset.'_'.$imagefiles[$i]->getVar('imgsetimg_file'), 'wb')) {
+ } else {
+ fwrite($fp, $imagefiles[$i]->getVar('imgsetimg_body'));
+ fclose($fp);
+ }
+ }
+ }
+ $tpl_updated = true;
+ }
+
+ // add read permission for the start module to all groups
+ if (!$startmod_updated && $new_value != '--' && $config->getVar('conf_catid') == XOOPS_CONF && $config->getVar('conf_name') == 'startpage') {
+ $member_handler =& xoops_gethandler('member');
+ $groups =& $member_handler->getGroupList();
+ $moduleperm_handler =& xoops_gethandler('groupperm');
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->getByDirname($new_value);
+ if (is_object($module)) {
+ foreach ($groups as $groupid => $groupname) {
+ if (!$moduleperm_handler->checkRight('module_read', $module->getVar('mid'), $groupid)) {
+ $moduleperm_handler->addRight('module_read', $module->getVar('mid'), $groupid);
+ }
+ }
+ }
+ $startmod_updated = true;
+ }
+
+ $config->setConfValueForInput($new_value);
+ $config_handler->insertConfig($config);
+ }
+ unset($new_value);
+ }
+ }
+ //regenerate profile field information that is cleared
+ $profile_handler =& xoops_gethandler('profile');
+ $profile_handler->updateCache();
+
+ if (!empty($_REQUEST['use_mysession']) && $xoopsConfig['use_mysession'] == 0 && $_REQUEST['session_name'] != '') {
+ setcookie($_REQUEST['session_name'], session_id(), time()+(60*intval($_REQUEST['session_expire'])), '/', '', 0);
+ }
+ if (isset($_REQUEST['redirect']) && $_REQUEST['redirect'] != '') {
+ redirect_header($_REQUEST['redirect'], 2, _MD_AM_DBUPDATED);
+ } else {
+ redirect_header("admin.php?fct=preferences",2,_MD_AM_DBUPDATED);
+ }
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/preferences/main.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/preferences/xoops_version.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/preferences/xoops_version.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/preferences/xoops_version.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,45 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$modversion['name'] = _MD_AM_PREF;
+$modversion['version'] = "";
+$modversion['description'] = "XOOPS Site Preferences";
+$modversion['author'] = "";
+$modversion['credits'] = "The XOOPS Project";
+$modversion['help'] = "preferences.html";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 1;
+$modversion['image'] = "pref.gif";
+
+$modversion['hasAdmin'] = 1;
+$modversion['adminpath'] = "admin.php?fct=preferences";
+$modversion['category'] = XOOPS_SYSTEM_PREF;
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/preferences/xoops_version.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/main.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/main.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/main.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,178 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit("Access Denied");
+}
+include_once XOOPS_ROOT_PATH."/modules/system/admin/smilies/smilies.php";
+$op ='SmilesAdmin';
+
+if (!empty($_GET['op'])) {
+ $op = $_GET['op'];
+} elseif (!empty($_POST['op'])) {
+ $op = $_POST['op'];
+}
+
+switch($op) {
+case "SmilesUpdate":
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=smilies', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $count = (!empty($_POST['smile_id']) && is_array($_POST['smile_id'])) ? count($_POST['smile_id']) : 0;
+ $db =& Database::getInstance();
+ for ($i = 0; $i < $count; $i++) {
+ $smile_id = intval($_POST['smile_id'][$i]);
+ if (empty($smile_id)) {
+ continue;
+ }
+ $smile_display = empty($_POST['smile_display'][$i]) ? 0 : 1;
+ if (isset($_POST['old_display'][$i]) && $_POST['old_display'][$i] != $smile_display[$i]) {
+ $db->query('UPDATE '.$db->prefix('smiles').' SET display='.$smile_display.' WHERE id ='.$smile_id);
+ }
+ }
+ redirect_header('admin.php?fct=smilies',2,_MD_AM_DBUPDATED);
+ break;
+
+case "SmilesAdd":
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=smilies', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $db =& Database::getInstance();
+ $myts =& MyTextSanitizer::getInstance();
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png'), 100000, 120, 120);
+ $uploader->setPrefix('smil');
+ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
+ if (!$uploader->upload()) {
+ $err = $uploader->getErrors();
+ } else {
+ $smile_url = $uploader->getSavedFileName();
+ $smile_code = $myts->stripSlashesGPC($_POST['smile_code']);
+ $smile_desc = $myts->stripSlashesGPC($_POST['smile_desc']);
+ $smile_display = intval($_POST['smile_display']) > 0 ? 1 : 0;
+ $newid = $db->genId($db->prefix('smilies')."_id_seq");
+ $sql = sprintf("INSERT INTO %s (id, code, smile_url, emotion, display) VALUES (%d, %s, %s, %s, %d)", $db->prefix('smiles'), $newid, $db->quoteString($smile_code), $db->quoteString($smile_url), $db->quoteString($smile_desc), $smile_display);
+ if (!$db->query($sql)) {
+ $err = 'Failed storing smiley data into the database';
+ }
+ }
+ } else {
+ $err = $uploader->getErrors();
+ }
+ if (!isset($err)) {
+ redirect_header('admin.php?fct=smilies&op=SmilesAdmin',2,_MD_AM_DBUPDATED);
+ } else {
+ xoops_cp_header();
+ xoops_error($err);
+ xoops_cp_footer();
+ }
+ break;
+
+case "SmilesEdit":
+ $id = isset($_GET['id']) ? intval($_GET['id']) : 0;
+ if ($id > 0) {
+ SmilesEdit($id);
+ }
+ break;
+
+case "SmilesSave":
+ $id = isset($_POST['id']) ? intval($_POST['id']) : 0;
+ if ($id <= 0 | !$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=smilies', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $myts =& MyTextSanitizer::getInstance();
+ $smile_code = $myts->stripSlashesGPC($_POST['smile_code']);
+ $smile_desc = $myts->stripSlashesGPC($_POST['smile_desc']);
+ $smile_display = intval($_POST['smile_display']) > 0 ? 1 : 0;
+ $db =& Database::getInstance();
+ if ($_FILES['smile_url']['name'] != "") {
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png'), 100000, 120, 120);
+ $uploader->setPrefix('smil');
+ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
+ if (!$uploader->upload()) {
+ $err = $uploader->getErrors();
+ } else {
+ $smile_url = $uploader->getSavedFileName();
+ if (!$db->query(sprintf("UPDATE %s SET code = %s, smile_url = %s, emotion = %s, display = %d WHERE id = %d", $db->prefix('smiles'), $db->quoteString($smile_code), $db->quoteString($smile_url), $db->quoteString($smile_desc), $smile_display, $id))) {
+ $err = 'Failed storing smiley data into the database';
+ } else {
+ $oldsmile_path = str_replace("\\", "/", realpath(XOOPS_UPLOAD_PATH.'/'.trim($_POST['old_smile'])));
+ if (0 === strpos($oldsmile_path, XOOPS_UPLOAD_PATH) && is_file($oldsmile_path)) {
+ unlink($oldsmile_path);
+ }
+ }
+ }
+ } else {
+ $err = $uploader->getErrors();
+ }
+ } else {
+ $sql = sprintf("UPDATE %s SET code = %s, emotion = %s, display = %d WHERE id = %d", $db->prefix('smiles'), $db->quoteString($smile_code), $db->quoteString($smile_desc), $smile_display, $id);
+ if (!$db->query($sql)) {
+ $err = 'Failed storing smiley data into the database';
+ }
+ }
+ if (!isset($err)) {
+ redirect_header('admin.php?fct=smilies&op=SmilesAdmin',2,_MD_AM_DBUPDATED);
+ } else {
+ xoops_cp_header();
+ xoops_error($err);
+ xoops_cp_footer();
+ exit();
+ }
+ break;
+
+case "SmilesDel":
+ $id = isset($_GET['id']) ? intval($_GET['id']) : 0;
+ if ($id > 0) {
+ xoops_cp_header();
+ xoops_confirm(array('fct' => 'smilies', 'op' => 'SmilesDelOk', 'id' => $id), 'admin.php', _AM_WAYSYWTDTS);
+ xoops_cp_footer();
+ }
+ break;
+
+case "SmilesDelOk":
+ $id = isset($_POST['id']) ? intval($_POST['id']) : 0;
+ if ($id <= 0 | !$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=smilies', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $db =& Database::getInstance();
+ $sql = sprintf("DELETE FROM %s WHERE id = %u", $db->prefix('smiles'), $id);
+ $db->query($sql);
+ redirect_header("admin.php?fct=smilies&op=SmilesAdmin",2,_MD_AM_DBUPDATED);
+ break;
+
+case "SmilesAdmin":
+default:
+ SmilesAdmin();
+ break;
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/main.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/smileform.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/smileform.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/smileform.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,48 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+$smile_form = new XoopsThemeForm($smiles['smile_form'], 'smileform', 'admin.php', 'post', true);
+$smile_form->setExtra('enctype="multipart/form-data"');
+$smile_form->addElement(new XoopsFormText(_AM_SMILECODE, 'smile_code', 26, 25, $smiles['smile_code']), true);
+$smile_form->addElement(new XoopsFormText(_AM_SMILEEMOTION, 'smile_desc', 26, 25, $smiles['smile_desc']), true);
+$smile_select = new XoopsFormFile('', 'smile_url', 5000000);
+$smile_label = new XoopsFormLabel('', '<img src="'.XOOPS_UPLOAD_URL.'/'.$smiles['smile_url'].'" alt="" />');
+$smile_tray = new XoopsFormElementTray(_IMAGEFILE.':', ' ');
+$smile_tray->addElement($smile_select);
+$smile_tray->addElement($smile_label);
+$smile_form->addElement($smile_tray);
+$smile_form->addElement(new XoopsFormRadioYN(_AM_DISPLAYF, 'smile_display', $smiles['smile_display']));
+$smile_form->addElement(new XoopsFormHidden('id', $smiles['id']));
+$smile_form->addElement(new XoopsFormHidden('op', $smiles['op']));
+$smile_form->addElement(new XoopsFormHidden('fct', 'smilies'));
+$smile_form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/smileform.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/smilies.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/smilies.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/smilies.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,123 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit("Access Denied");
+}
+
+function SmilesAdmin()
+{
+ $db =& Database::getInstance();
+ $url_smiles = XOOPS_UPLOAD_URL;
+ $myts =& MyTextSanitizer::getInstance();
+ xoops_cp_header();
+ echo "<h4 style='text-align:left;'>"._AM_SMILESCONTROL."</h4>";
+
+ if ($getsmiles = $db->query("SELECT * FROM ".$db->prefix("smiles"))) {
+ if (($numsmiles = $db->getRowsNum($getsmiles)) == "0") {
+ //EMPTY
+ } else {
+ echo '<form action="admin.php" method="post"><table width="100%" class="outer" cellpadding="4" cellspacing="1">';
+ echo "<tr align='center'><th align='left'>" ._AM_CODE."</th>";
+ echo "<th>" ._AM_SMILIE."</th>";
+ echo "<th>"._AM_SMILEEMOTION."</th>";
+ echo "<th>" ._AM_DISPLAYF."</th>";
+ echo "<th>"._AM_ACTION."</th>";
+ echo "</tr>\n";
+ $i = 0;
+ while ($smiles = $db->fetchArray($getsmiles)) {
+ if ($i % 2 == 0) {
+ $class = 'even';
+ } else {
+ $class= 'odd';
+ }
+ $smiles['code'] = $myts->makeTboxData4Show($smiles['code']);
+ $smiles['smile_url'] = $myts->makeTboxData4Edit($smiles['smile_url']);
+ $smiles['smile_emotion'] = $myts->makeTboxData4Edit($smiles['emotion']);
+ echo "<tr align='center' class='$class'>";
+ echo "<td align='left'>".$smiles['code']."</td>";
+ echo "<td><img src='".$url_smiles."/".$smiles['smile_url']."' alt='' /></td>";
+ echo '<td>'.$smiles['smile_emotion'].'</td>';
+ echo '<td><input type="hidden" name="smile_id['.$i.']" value="'.$smiles['id'].'" /><input type="hidden" name="old_display['.$i.']" value="'.$smiles['display'].'" /><input type="checkbox" value="1" name="smile_display['.$i.']"';
+ if ($smiles['display'] == 1) {
+ echo ' checked="checked"';
+ }
+ echo "</td><td><a href='admin.php?fct=smilies&op=SmilesEdit&id=".$smiles['id']."'>" ._AM_EDIT."</a> ";
+ echo "<a href='admin.php?fct=smilies&op=SmilesDel&id=".$smiles['id']."'>" ._AM_DEL."</a></td>";
+ echo "</tr>\n";
+ $i++;
+ }
+ echo '<tr><td class="foot" colspan="5" align="center"><input type="hidden" name="op" value="SmilesUpdate" /><input type="hidden" name="fct" value="smilies" />'.$GLOBALS['xoopsSecurity']->getTokenHTML().'<input type="submit" value="'._SUBMIT.'" /></tr></table></form>';
+ }
+ } else {
+ echo _AM_CNRFTSD;
+ }
+ $smiles['smile_code'] = '';
+ $smiles['smile_url'] = 'blank.gif';
+ $smiles['smile_desc'] = '';
+ $smiles['smile_display'] = 1;
+ $smiles['smile_form'] = _AM_ADDSMILE;
+ $smiles['op'] = 'SmilesAdd';
+ $smiles['id'] = '';
+ include XOOPS_ROOT_PATH.'/modules/system/admin/smilies/smileform.php';
+ $smile_form->display();
+ xoops_cp_footer();
+}
+
+function SmilesEdit($id)
+{
+ $db =& Database::getInstance();
+ $myts =& MyTextSanitizer::getInstance();
+ xoops_cp_header();
+ echo '<a href="admin.php?fct=smilies">'._AM_SMILESCONTROL .'</a> <span style="font-weight:bold;">»»</span> '._AM_EDITSMILE.'<br /><br />';
+ if ($getsmiles = $db->query("SELECT * FROM ".$db->prefix("smiles")." WHERE id = $id")) {
+ $numsmiles = $db->getRowsNum($getsmiles);
+ if ( $numsmiles == 0 ) {
+ //EMPTY
+ } else {
+ if ($smiles = $db->fetchArray($getsmiles)) {
+ $smiles['smile_code'] = $myts->makeTboxData4Edit($smiles['code']);
+ $smiles['smile_url'] = $myts->makeTboxData4Edit($smiles['smile_url']);
+ $smiles['smile_desc'] = $myts->makeTboxData4Edit($smiles['emotion']);
+ $smiles['smile_display'] = $smiles['display'];
+ $smiles['smile_form'] = _AM_EDITSMILE;
+ $smiles['op'] = 'SmilesSave';
+ include XOOPS_ROOT_PATH.'/modules/system/admin/smilies/smileform.php';
+ $smile_form->addElement(new XoopsFormHidden('old_smile', $smiles['smile_url']));
+ $smile_form->display();
+ }
+ }
+ } else {
+ echo _AM_CNRFTSD;
+ }
+ xoops_cp_footer();
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/smilies.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/xoops_version.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/xoops_version.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/xoops_version.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,45 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$modversion['name'] = _MD_AM_SMLS;
+$modversion['version'] = "";
+$modversion['description'] = "Smilies Settings";
+$modversion['author'] = "";
+$modversion['credits'] = "The MPN SE Project";
+$modversion['help'] = "smilies.html";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 1;
+$modversion['image'] = "smiles.gif";
+
+$modversion['hasAdmin'] = 1;
+$modversion['adminpath'] = "admin.php?fct=smilies";
+$modversion['category'] = XOOPS_SYSTEM_SMILE;
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/smilies/xoops_version.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/main.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/main.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/main.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,1150 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit("Access Denied");
+} else {
+ $op = 'list';
+ if (isset($_POST)) {
+ foreach ( $_POST as $k => $v ) {
+ ${$k} = $v;
+ }
+ }
+ if (isset($_GET['op'])) {
+ $op = trim($_GET['op']);
+ $id = $moddir = $file = $type = $tplset = null;
+ if (isset($_GET['id'])) {
+ $id = intval($_GET['id']);
+ }
+ if (isset($_GET['moddir'])) {
+ $moddir = trim($_GET['moddir']);
+ }
+ if (isset($_GET['file'])) {
+ $file = trim($_GET['file']);
+ }
+ if (isset($_GET['type'])) {
+ $type = trim($_GET['type']);
+ }
+ if (isset($_GET['tplset'])) {
+ $tplset = trim($_GET['tplset']);
+ }
+ }
+
+ if ($op == 'edittpl_go') {
+ if (isset($previewtpl)) {
+ $op = 'previewtpl';
+ }
+ }
+
+ switch ($op) {
+ case 'list':
+ $tplset_handler =& xoops_gethandler('tplset');
+ $tplsets =& $tplset_handler->getObjects();
+ xoops_cp_header();
+ echo '<h4 style="text-align:left">'._MD_TPLMAIN.'</h4>';
+ $installed = array();
+ $tpltpl_handler =& xoops_gethandler('tplfile');
+ $installed_mods = $tpltpl_handler->getModuleTplCount('default');
+ $tcount = count($tplsets);
+ echo '<table width="100%" cellspacing="1" class="outer"><tr align="center"><th width="25%">'._MD_THMSETNAME.'</th><th>'._MD_CREATED.'</th><th>'._MD_TEMPLATES.'</th><th>'._MD_ACTION.'</th><th> </th></tr>';
+ $class = 'even';
+ for ($i = 0; $i < $tcount; $i++) {
+ $tplsetname = $tplsets[$i]->getVar('tplset_name');
+ $installed_themes[] = $tplsetname;
+ $class = ($class == 'even') ? 'odd' : 'even';
+ echo '<tr class="'.$class.'" align="center"><td class="head">'.$tplsetname.'<br /><br /><span style="font-weight:normal;">'.$tplsets[$i]->getVar('tplset_desc').'</span></td><td>'.formatTimestamp($tplsets[$i]->getVar('tplset_created'), 's').'</td><td align="left"><ul>';
+ $tplstats = $tpltpl_handler->getModuleTplCount($tplsetname);
+ if (count($tplstats) > 0) {
+ $module_handler =& xoops_gethandler('module');
+ echo '<ul>';
+ foreach ($tplstats as $moddir => $filecount) {
+ $module =& $module_handler->getByDirname($moddir);
+ if ($installed_mods[$moddir] > $filecount) {
+ $filecount = '<span style="color:#ff0000;">'.$filecount.'</span>';
+ }
+ $modulename = is_object($module) ? $module->getVar('name') : $moddir;
+ echo '<li>'.$modulename.' [<a href="admin.php?fct=tplsets&op=listtpl&tplset='.$tplsetname.'&moddir='.$moddir.'">'._LIST.'</a> (<b>'.$filecount.'</b>)]</li>';
+ unset($module);
+ }
+ $not_installed = array_diff(array_keys($installed_mods), array_keys($tplstats));
+ } else {
+ $not_installed =& array_keys($installed_mods);
+ }
+ foreach ($not_installed as $ni) {
+ $module =& $module_handler->getByDirname($ni);
+ $modname = is_object($module) ? $module->getVar('name') : $ni;
+
+ echo '<li>'.$modname.' [<a href="admin.php?fct=tplsets&op=listtpl&tplset='.$tplsetname.'&moddir='.$ni.'">'._LIST.'</a> (<span style="color:#ff0000; font-weight: bold;">0</span>)] [<a href="admin.php?fct=tplsets&op=generatemod&tplset='.$tplsetname.'&moddir='.$ni.'">'._MD_GENERATE.'</a>]</li>';
+ }
+ echo '</ul></td><td>';
+ echo '[<a href="admin.php?fct=tplsets&op=download&method=tar&tplset='.$tplsetname.'">'._MD_DOWNLOAD.'</a>]<br />[<a href="admin.php?fct=tplsets&op=clone&tplset='.$tplsetname.'">'._CLONE.'</a>]';
+ if ($tplsetname != 'default' && $tplsetname != $xoopsConfig['template_set']) {
+ echo '<br />[<a href="admin.php?fct=tplsets&op=delete&tplset='.$tplsetname.'">'._DELETE.'</a>]';
+ }
+ echo '</td>';
+ if ($tplsetname == $xoopsConfig['template_set']) {
+ echo '<td><img src="'.XOOPS_URL.'/modules/system/images/check.gif" alt="'._MD_DEFAULTTHEME.'" /></td>';
+ } else {
+ echo '<td> </td>';
+ }
+ echo '</tr>';
+ }
+ echo '</table><br />';
+
+ include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+ $form = new XoopsThemeForm(_MD_UPLOADTAR, 'tplupload_form', 'admin.php', 'post', true);
+ $form->setExtra('enctype="multipart/form-data"');
+ $form->addElement(new XoopsFormFile(_MD_CHOOSETAR.'<br /><span style="color:#ff0000;">'._MD_ONLYTAR.'</span>', 'tpl_upload', 1000000));
+ $form->addElement(new XoopsFormText(_MD_NTHEMENAME.'<br /><span style="font-weight:normal;">'._MD_ENTERTH.'</span>', 'tplset_name', 20, 50));
+ $form->addElement(new XoopsFormHidden('op', 'uploadtar_go'));
+ $form->addElement(new XoopsFormHidden('fct', 'tplsets'));
+ $form->addElement(new XoopsFormButton('', 'upload_button', _MD_UPLOAD, 'submit'));
+ $form->display();
+ xoops_cp_footer();
+ break;
+ case 'listtpl':
+ $tplset = trim($_GET['tplset']);
+ if ($tplset == '') {
+ redirect_header('admin.php?fct=tplsets',1);
+ }
+ if ($moddir == '') {
+ redirect_header('admin.php?fct=tplsets',1);
+ }
+ xoops_cp_header();
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->getByDirname($moddir);
+ $modname = $module->getVar('name');
+ echo '<a href="admin.php?fct=tplsets">'. _MD_TPLMAIN .'</a> <span style="font-weight:bold;">»»</span> '.$tplset.'<br /><br />';
+
+ echo '<h4>'.$modname.'</h4><form action="admin.php" method="post" enctype="multipart/form-data"><table width="100%" class="outer" cellspacing="1"><tr><th width="40%">'._MD_FILENAME.'</th><th>'._MD_LASTMOD.'</th>';
+ if ($tplset != 'default') {
+ echo '<th>'._MD_LASTIMP.'</th><th colspan="2">'._MD_ACTION.'</th></tr>';
+ } else {
+ echo '<th>'._MD_ACTION.'</th></tr>';
+ }
+ $tpltpl_handler =& xoops_gethandler('tplfile');
+ // get files that are already installed
+ $templates =& $tpltpl_handler->find($tplset, 'module', null, $moddir);
+ $inst_files = array();
+ $tcount = count($templates);
+ for ($i = 0; $i < $tcount; $i++) {
+ if ($i % 2 == 0) {
+ $class = 'even';
+ } else {
+ $class = 'odd';
+ }
+ $last_modified = $templates[$i]->getVar('tpl_lastmodified');
+ $last_imported = $templates[$i]->getVar('tpl_lastimported');
+ $last_imported_f = ($last_imported > 0) ? formatTimestamp($last_imported, 'l') : '';
+ echo '<tr class="'.$class.'"><td class="head">'.$templates[$i]->getVar('tpl_file').'<br /><br /><span style="font-weight:normal;">'.$templates[$i]->getVar('tpl_desc').'</span></td><td>'.formatTimestamp($last_modified, 'l').'</td>';
+ $filename = $templates[$i]->getVar('tpl_file');
+ if ($tplset != 'default') {
+ $physical_file = XOOPS_THEME_PATH.'/'.$tplset.'/templates/'.$moddir.'/'.$filename;
+ if (file_exists($physical_file)) {
+ $mtime = filemtime($physical_file);
+ if ($last_imported < $mtime) {
+ if ($mtime > $last_modified) {
+ $bg = '#ff9999';
+ } elseif($mtime > $last_imported) {
+ $bg = '#99ff99';
+ }
+ echo '<td style="background-color:'.$bg.';">'.$last_imported_f.' [<a href="admin.php?fct=tplsets&tplset='.$tplset.'&moddir='.$moddir.'&op=importtpl&id='.$templates[$i]->getVar('tpl_id').'">'._MD_IMPORT.'</a>]';
+ } else {
+ echo '<td>'.$last_imported_f;
+ }
+ } else {
+ echo '<td>'.$last_imported_f;
+ }
+ echo '</td><td>[<a href="admin.php?fct=tplsets&op=edittpl&id='.$templates[$i]->getVar('tpl_id').'">'._EDIT.'</a>] [<a href="admin.php?fct=tplsets&op=deletetpl&id='.$templates[$i]->getVar('tpl_id').'">'._DELETE.'</a>] [<a href="admin.php?fct=tplsets&op=downloadtpl&id='.$templates[$i]->getVar('tpl_id').'">'._MD_DOWNLOAD.'</a>]</td><td align="right"><input type="file" name="'.$filename.'" id="'.$filename.'" /><input type="hidden" name="xoops_upload_file[]" id="xoops_upload_file[]" value="'.$filename.'" /><input type="hidden" name="old_template['.$filename.']" value="'.$templates[$i]->getVar('tpl_id').'" /></td>';
+ } else {
+ echo '<td>[<a href="admin.php?fct=tplsets&op=edittpl&id='.$templates[$i]->getVar('tpl_id').'">'._MD_VIEW.'</a>] [<a href="admin.php?fct=tplsets&op=downloadtpl&id='.$templates[$i]->getVar('tpl_id').'">'._MD_DOWNLOAD.'</a>]</td>';
+ }
+ echo '</tr>'."\n";
+ $inst_files[] = $filename;
+ }
+ if ($tplset != 'default') {
+ include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
+ // get difference between already installed files and the files under modules directory. which will be recognized as files that are not installed
+ $notinst_files = array_diff(XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH.'/modules/'.$moddir.'/templates/'), $inst_files);
+ foreach ($notinst_files as $nfile) {
+ if ($nfile != 'index.html') {
+ echo '<tr><td style="background-color:#FFFF99; padding: 5px;">'.$nfile.'</td><td style="background-color:#FFFF99; padding: 5px;"> </td><td style="background-color:#FFFF99; padding: 5px;">';
+ $physical_file = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$moddir.'/'.$nfile;
+ if (file_exists($physical_file)) {
+ echo '[<a href="admin.php?fct=tplsets&moddir='.$moddir.'&tplset='.$tplset.'&op=importtpl&file='.urlencode($nfile).'">'._MD_IMPORT.'</a>]';
+ } else {
+ echo ' ';
+ }
+ echo '</td><td style="background-color:#FFFF99; padding: 5px;">[<a href="admin.php?fct=tplsets&moddir='.$moddir.'&tplset='.$tplset.'&op=generatetpl&type=module&file='.urlencode($nfile).'">'._MD_GENERATE.'</a>]</td><td style="background-color:#FFFF99; padding: 5px; text-align:right;"><input type="file" name="'.$nfile.'" id="'.$nfile.'" /><input type="hidden" name="xoops_upload_file[]" id="xoops_upload_file[]" value="'.$nfile.'" /></td></tr>'."\n";
+ }
+ }
+ }
+ echo '</table><br /><table width="100%" class="outer" cellspacing="1"><tr><th width="40%">'._MD_FILENAME.'</th><th>'._MD_LASTMOD.'</th>';
+ if ($tplset != 'default') {
+ echo '<th>'._MD_LASTIMP.'</th><th colspan="2">'._MD_ACTION.'</th></tr>';
+ } else {
+ echo '<th>'._MD_ACTION.'</th></tr>';
+ }
+ $btemplates =& $tpltpl_handler->find($tplset, 'block', null, $moddir);
+ $binst_files = array();
+ $btcount = count($btemplates);
+ for ($j = 0; $j < $btcount; $j++) {
+ $last_imported = $btemplates[$j]->getVar('tpl_lastimported');
+ $last_imported_f = ($last_imported > 0) ? formatTimestamp($last_imported, 'l') : '';
+ $last_modified = $btemplates[$j]->getVar('tpl_lastmodified');
+ if ($j % 2 == 0) {
+ $class = 'even';
+ } else {
+ $class = 'odd';
+ }
+ echo '<tr class="'.$class.'"><td class="head"><span style="font-weight:bold;">'.$btemplates[$j]->getVar('tpl_file').'</span><br /><br /><span style="font-weight:normal;">'.$btemplates[$j]->getVar('tpl_desc').'</span></td><td>'.formatTimestamp($last_modified, 'l').'</td>';
+ $filename = $btemplates[$j]->getVar('tpl_file');
+ $physical_file = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$moddir.'/blocks/'.$filename;
+ if ($tplset != 'default') {
+ if (file_exists($physical_file)) {
+ $mtime = filemtime($physical_file);
+ if ($last_imported < $mtime) {
+ if ($mtime > $last_modified) {
+ $bg = '#ff9999';
+ } elseif($mtime > $last_imported) {
+ $bg = '#99ff99';
+ }
+ echo '<td style="background-color:'.$bg.';">'.$last_imported_f.' [<a href="admin.php?fct=tplsets&tplset='.$tplset.'&op=importtpl&moddir='.$moddir.'&id='.$btemplates[$j]->getVar('tpl_id').'">'._MD_IMPORT.'</a>]';
+ } else {
+ echo '<td>'.$last_imported_f;
+ }
+ } else {
+ echo '<td>'.$last_imported_f;
+ }
+ echo '</td><td>[<a href="admin.php?fct=tplsets&op=edittpl&id='.$btemplates[$j]->getVar('tpl_id').'">'._EDIT.'</a>] [<a href="admin.php?fct=tplsets&op=deletetpl&id='.$btemplates[$j]->getVar('tpl_id').'">'._DELETE.'</a>] [<a href="admin.php?fct=tplsets&op=downloadtpl&id='.$btemplates[$j]->getVar('tpl_id').'">'._MD_DOWNLOAD.'</a>]</td><td align="right"><input type="file" name="'.$filename.'" id="'.$filename.'" /><input type="hidden" name="xoops_upload_file[]" id="xoops_upload_file[]" value="'.$filename.'" /><input type="hidden" name="old_template['.$filename.']" value="'.$btemplates[$j]->getVar('tpl_id').'" /></td>';
+ } else {
+ echo '<td>[<a href="admin.php?fct=tplsets&op=edittpl&id='.$btemplates[$j]->getVar('tpl_id').'">'._MD_VIEW.'</a>] [<a href="admin.php?fct=tplsets&op=downloadtpl&id='.$btemplates[$j]->getVar('tpl_id').'">'._MD_DOWNLOAD.'</a>]</td>';
+ }
+ echo '</tr>'."\n";
+ $binst_files[] = $filename;
+ }
+ if ($tplset != 'default') {
+ include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
+ $bnotinst_files = array_diff(XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH.'/modules/'.$moddir.'/templates/blocks/'), $binst_files);
+ foreach ($bnotinst_files as $nfile) {
+ if ($nfile != 'index.html') {
+ echo '<tr style="background-color:#FFFF99;"><td style="background-color:#FFFF99; padding: 5px;">'.$nfile.'</td><td style="background-color:#FFFF99; padding: 5px;"> </td><td style="background-color:#FFFF99; padding: 5px;">';
+ $physical_file = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$moddir.'/blocks/'.$nfile;
+ if (file_exists($physical_file)) {
+ echo '[<a href="admin.php?fct=tplsets&moddir='.$moddir.'&tplset='.$tplset.'&op=importtpl&file='.urlencode($nfile).'">'._MD_IMPORT.'</a>]';
+ } else {
+ echo ' ';
+ }
+ echo '</td><td style="background-color:#FFFF99; padding: 5px;">[<a href="admin.php?fct=tplsets&moddir='.$moddir.'&tplset='.$tplset.'&op=generatetpl&type=block&file='.urlencode($nfile).'">'._MD_GENERATE.'</a>]</td><td style="background-color:#FFFF99; padding: 5px; text-align: right"><input type="file" name="'.$nfile.'" id="'.$nfile.'" /><input type="hidden" name="xoops_upload_file[]" id="xoops_upload_file[]" value="'.$nfile.'" /></td></tr>'."\n";
+ }
+ }
+ }
+ echo '</table>';
+ if ($tplset != 'default') {
+ echo '<div style="text-align: right; margin-top: 5px;"><input type="hidden" name="fct" value="tplsets" /><input type="hidden" name="op" value="update" />'.$GLOBALS['xoopsSecurity']->getTokenHTML().'<input type="hidden" name="moddir" value="'.$moddir.'" /><input type="hidden" name="tplset" value="'.$tplset.'" /><input type="submit" value="'._MD_UPLOAD.'" /></div></form>';
+ }
+ xoops_cp_footer();
+ break;
+ case 'edittpl':
+ if ($id <= 0) {
+ redirect_header('admin.php?fct=tplsets', 1);
+ }
+ $tpltpl_handler =& xoops_gethandler('tplfile');
+ $tplfile =& $tpltpl_handler->get($id, true);
+ if (is_object($tplfile)) {
+ $tplset = $tplfile->getVar('tpl_tplset');
+ $tform = array('tpl_tplset' => $tplset, 'tpl_id' => $id, 'tpl_file' => $tplfile->getVar('tpl_file'), 'tpl_desc' => $tplfile->getVar('tpl_desc'), 'tpl_lastmodified' => $tplfile->getVar('tpl_lastmodified'), 'tpl_source' => $tplfile->getVar('tpl_source', 'E'), 'tpl_module' => $tplfile->getVar('tpl_module'));
+ include_once XOOPS_ROOT_PATH.'/modules/system/admin/tplsets/tplform.php';
+ xoops_cp_header();
+ echo '<a href="admin.php?fct=tplsets">'. _MD_TPLMAIN .'</a> <span style="font-weight:bold;">»»</span> <a href="./admin.php?fct=tplsets&op=listtpl&moddir='.$tplfile->getVar('tpl_module').'&tplset='.$tplset.'">'.$tplset.'</a> <span style="font-weight:bold;">»»</span> '._MD_EDITTEMPLATE.'<br /><br />';
+ $form->display();
+ xoops_cp_footer();
+ exit();
+ } else {
+ $err[] = 'Selected template (ID: $id) does not exist';
+ }
+ xoops_cp_header();
+ xoops_error($err);
+ echo '<br /><a href="admin.php?fct=tplsets">'._MD_AM_BTOTADMIN.'</a>';
+ xoops_cp_footer();
+ break;
+ case 'edittpl_go':
+ if ($id <= 0 | !$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=tplsets', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $tpltpl_handler =& xoops_gethandler('tplfile');
+ $tplfile =& $tpltpl_handler->get($id, true);
+ $err = array();
+ if (!is_object($tplfile)) {
+ $err[] = 'Selected template (ID: $id) does not exist';
+ } else {
+ if ($tplfile->getVar('tpl_tplset') != 'default') {
+ $tplfile->setVar('tpl_source', $html);
+ $tplfile->setVar('tpl_lastmodified', time());
+ if (!$tpltpl_handler->insert($tplfile)) {
+ $err[] = 'Could not insert template file to the database.';
+ } else {
+ /*include_once XOOPS_ROOT_PATH.'/class/template.php';
+ $xoopsTpl = new XoopsTpl();*/
+ if ($xoopsTpl->is_cached('db:'.$tplfile->getVar('tpl_file'))) {
+ if (!$xoopsTpl->clear_cache('db:'.$tplfile->getVar('tpl_file'))) {
+ }
+ }
+ if ($tplfile->getVar('tpl_tplset') == $xoopsConfig['template_set']) {
+ xoops_template_touch($tplfile);
+ }
+ }
+ } else {
+ $err[] = 'Default template files cannot be edited.';
+ }
+ }
+ if (count($err) == 0) {
+ if (!empty($moddir)) {
+ redirect_header('admin.php?fct=tplsets&op=edittpl&id='.$tplfile->getVar('tpl_id'), 2, _MD_AM_DBUPDATED);
+ } elseif (isset($redirect)) {
+ redirect_header('admin.php?fct=tplsets&tplset='.$tplfile->getVar('tpl_tplset').'&op='.trim($redirect), 2, _MD_AM_DBUPDATED);
+ } else {
+ redirect_header('admin.php?fct=tplsets', 2, _MD_AM_DBUPDATED);
+ }
+ }
+ xoops_cp_header();
+ xoops_error($err);
+ echo '<br /><a href="admin.php?fct=tplsets">'._MD_AM_BTOTADMIN.'</a>';
+ xoops_cp_footer();
+ break;
+ case 'deletetpl':
+ xoops_cp_header();
+ xoops_confirm(array('id' => $id, 'op' => 'deletetpl_go', 'fct' => 'tplsets'), 'admin.php', _MD_RUSUREDELTPL, _YES);
+ xoops_cp_footer();
+ break;
+ case 'deletetpl_go':
+ if ($id <= 0 | !$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=tplsets', 1, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $tpltpl_handler =& xoops_gethandler('tplfile');
+ $tplfile =& $tpltpl_handler->get($id);
+ $err = array();
+ if (!is_object($tplfile)) {
+ $err[] = 'Selected template (ID: $id) does not exist';
+ } else {
+ if ($tplfile->getVar('tpl_tplset') != 'default') {
+ if (!$tpltpl_handler->delete($tplfile)) {
+ $err[] = 'Could not delete '.$tplfile->getVar('tpl_file').' from the database.';
+ } else {
+ // need to compile default xoops template
+ if ($tplfile->getVar('tpl_tplset') == $xoopsConfig['template_set']) {
+ $defaulttpl =& $tpltpl_handler->find('default', $tplfile->getVar('tpl_type'), $tplfile->getVar('tpl_refid'), null, $tplfile->getVar('tpl_file'));
+ if (count($defaulttpl) > 0) {
+ include_once XOOPS_ROOT_PATH.'/class/template.php';
+ xoops_template_touch($defaulttpl[0], true);
+ }
+ }
+ }
+ } else {
+ $err[] = 'Default template files cannot be deleted.';
+ }
+ }
+ if (count($err) == 0) {
+ redirect_header('admin.php?fct=tplsets&op=listtpl&moddir='.$tplfile->getVar('tpl_module').'&tplset='.urlencode($tplfile->getVar('tpl_tplset')), 2, _MD_AM_DBUPDATED);
+ }
+ xoops_cp_header();
+ xoops_error($err);
+ echo '<br /><a href="admin.php?fct=tplsets">'._MD_AM_BTOTADMIN.'</a>';
+ xoops_cp_footer();
+ break;
+ case 'delete':
+ xoops_cp_header();
+ xoops_confirm(array('tplset' => $tplset, 'op' => 'delete_go', 'fct' => 'tplsets'), 'admin.php', _MD_RUSUREDELTH, _YES);
+ xoops_cp_footer();
+ break;
+ case 'delete_go':
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=tplsets', 1, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $msgs = array();
+ if ($tplset != 'default' && $tplset != $xoopsConfig['template_set']) {
+ $tpltpl_handler =& xoops_gethandler('tplfile');
+ $templates =& $tpltpl_handler->getObjects(new Criteria('tpl_tplset', $tplset));
+ $tcount = count($templates);
+ if ($tcount > 0) {
+ $msgs[] = 'Deleting template files...';
+ for ($i = 0; $i < $tcount; $i++) {
+ if (!$tpltpl_handler->delete($templates[$i])) {
+ $msgs[] = ' <span style="color:#ff0000;">ERROR: Could not delete template <b>'.$templates[$i]->getVar('tpl_file').'</b>. ID: <b>'.$templates[$i]->getVar('tpl_id').'</b></span>';
+ } else {
+ $msgs[] = ' Template <b>'.$templates[$i]->getVar('tpl_file').'</b> deleted. ID: <b>'.$templates[$i]->getVar('tpl_id').'</b>';
+ }
+ }
+ }
+ $tplset_handler =& xoops_gethandler('tplset');
+ $tplsets =& $tplset_handler->getObjects(new Criteria('tplset_name', $tplset));
+ if (count($tplsets) > 0 && is_object($tplsets[0])) {
+ $msgs[] = 'Deleting template set data...';
+ if (!$tplset_handler->delete($tplsets[0])) {
+ $msgs[] = ' <span style="color:#ff0000;">ERROR: Template set '.$tplset.' could not be deleted.</span>';
+ } else {
+ $msgs[] = ' Template set data removed from the database.';
+ }
+ }
+ } else {
+ $msgs[] = '<span style="color:#ff0000;">ERROR: Default template files cannot be deleted</span>';
+ }
+ xoops_cp_header();
+ foreach ($msgs as $msg) {
+ echo '<code>'.$msg.'</code><br />';
+ }
+ echo '<br /><a href="admin.php?fct=tplsets">'._MD_AM_BTOTADMIN.'</a>';
+ xoops_cp_footer();
+ break;
+ case 'clone':
+ include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+ $form = new XoopsThemeForm(_MD_CLONETHEME, 'template_form', 'admin.php', 'post', true);
+ $form->addElement(new XoopsFormLabel(_MD_THEMENAME, $tplset));
+ $form->addElement(new XoopsFormText(_MD_NEWNAME, 'newtheme', 30, 50), true);
+ $form->addElement(new XoopsFormHidden('tplset', $tplset));
+ $form->addElement(new XoopsFormHidden('op', 'clone_go'));
+ $form->addElement(new XoopsFormHidden('fct', 'tplsets'));
+ $form->addElement(new XoopsFormButton('', 'tpl_button', _SUBMIT, 'submit'));
+ xoops_cp_header();
+ echo '<a href="admin.php?fct=tplsets">'. _MD_TPLMAIN .'</a> <span style="font-weight:bold;">»»</span> '._MD_CLONETHEME.'<br /><br />';
+ $form->display();
+ xoops_cp_footer();
+ break;
+ case 'clone_go':
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=tplsets', 1, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $msgs = array();
+ $tplset = trim($tplset);
+ $newtheme = trim($newtheme);
+ $tpltpl_handler =& xoops_gethandler('tplfile');
+ xoops_cp_header();
+ if ($tplset == $newtheme) {
+ xoops_error('Template set name must be a different name.');
+ } elseif ($tpltpl_handler->getCount(new Criteria('tpl_tplset', $newtheme)) > 0) {
+ xoops_error('Template set <b>'.$newtheme.'</b> already exists.');
+ } else {
+ $tplset_handler =& xoops_gethandler('tplset');
+ $tplsetobj =& $tplset_handler->create();
+ $tplsetobj->setVar('tplset_name', $newtheme);
+ $tplsetobj->setVar('tplset_created', time());
+ if (!$tplset_handler->insert($tplsetobj)) {
+ $msgs[] = '<span style="color:#ff0000;">ERROR: Could not create template set <b>'.$newtheme.'</b>.</span><br />';
+ } else {
+ $tplsetid = $tplsetobj->getVar('tplset_id');
+ $templates =& $tpltpl_handler->getObjects(new Criteria('tpl_tplset', $tplset), true);
+ $tcount = count($templates);
+ if ($tcount > 0) {
+ $msgs[] = 'Copying template files...';
+ for ($i = 0; $i < $tcount; $i++) {
+ $newtpl =& $templates[$i]->xoopsClone();
+ $newtpl->setVar('tpl_tplset', $newtheme);
+ $newtpl->setVar('tpl_id', 0);
+ $newtpl->setVar('tpl_lastimported', 0);
+ $newtpl->setVar('tpl_lastmodified', time());
+ if (!$tpltpl_handler->insert($newtpl)) {
+ $msgs[] = ' <span style="color:#ff0000;">ERROR: Failed copying template <b>'.$templates[$i]->getVar('tpl_file').'</b>. ID: <b>'.$templates[$i]->getVar('tpl_id').'</b></span>';
+ } else {
+ $msgs[] = ' Template <b>'.$templates[$i]->getVar('tpl_file').'</b> copied. ID: <b>'.$newtpl->getVar('tpl_id').'</b>';
+ }
+ unset($newtpl);
+ }
+
+ $msgs[] = 'Template set <b>'.$newtheme.'</b> created. (ID: <b>'.$tplsetid.'</b>)<br />';
+ } else {
+ $msgs[] = '<span style="color:#ff0000;">ERROR: Template files for '.$theme.' do not exist</span>';
+ }
+ }
+ }
+ foreach ($msgs as $msg) {
+ echo '<code>'.$msg.'</code><br />';
+ }
+ echo '<br /><a href="admin.php?fct=tplsets">'._MD_AM_BTOTADMIN.'</a>';
+ xoops_cp_footer();
+ break;
+
+ case 'viewdefault':
+ /**
+ * @TODO: change to use plain pagetype
+ **/
+ $tpltpl_handler =& xoops_gethandler('tplfile');
+ $tplfile =& $tpltpl_handler->get($id);
+ $default =& $tpltpl_handler->find('default', $tplfile->getVar('tpl_type'), $tplfile->getVar('tpl_refid'), null, $tplfile->getVar('tpl_file'));
+ echo "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>";
+ echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'._LANGCODE.'" lang="'._LANGCODE.'">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" />
+ <meta http-equiv="content-language" content="'._LANGCODE.'" />
+ <title>'.$xoopsConfig['sitename'].' Administration</title>
+ <link rel="stylesheet" type="text/css" media="all" href="'.XOOPS_URL.'/xoops.css" />
+ <link rel="stylesheet" type="text/css" media="all" href="'.XOOPS_URL.'/modules/system/style.css" />
+ </head><body>';
+ if (is_object($default[0])) {
+ $tpltpl_handler->loadSource($default[0]);
+ $last_modified = $default[0]->getVar('tpl_lastmodified');
+ $last_imported = $default[0]->getVar('tpl_lastimported');
+ if ($default[0]->getVar('tpl_type') == 'block') {
+ $path = XOOPS_ROOT_PATH.'/modules/'.$default[0]->getVar('tpl_module').'/blocks/'.$default[0]->getVar('tpl_file');
+ } else {
+ $path = XOOPS_ROOT_PATH.'/modules/'.$default[0]->getVar('tpl_module').'/'.$default[0]->getVar('tpl_file');
+ }
+ $colorchange = '';
+ if (!file_exists($path)) {
+ $filemodified_date = _MD_NOFILE;
+ $lastimported_date = _MD_NOFILE;
+ } else {
+ $tpl_modified = filemtime($path);
+ $filemodified_date = formatTimestamp($tpl_modified, 'l');
+ if ($tpl_modified > $last_imported) {
+ $colorchange = ' bgcolor="#ffCC99"';
+ }
+ $lastimported_date = formatTimestamp($last_imported, 'l');
+ }
+ include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+ $form = new XoopsThemeForm(_MD_VIEWDEFAULT, 'template_form', 'admin.php');
+ $form->addElement(new XoopsFormTextArea(_MD_FILEHTML, 'html', $default[0]->getVar('tpl_source'), 25));
+ $form->display();
+ } else {
+ echo 'Selected file does not exist';
+ }
+ echo '<div style="text-align:center;">[<a href="#" onclick="javascript:window.close();">'._CLOSE.'</a>]</div></body></html>';
+ break;
+ case 'downloadtpl':
+ $tpltpl_handler =& xoops_gethandler('tplfile');
+ $tpl =& $tpltpl_handler->get(intval($id), true);
+ if (is_object($tpl)) {
+ $output = $tpl->getVar('tpl_source');
+ strlen($output);
+ header('Cache-Control: no-cache, must-revalidate');
+ header('Pragma: no-cache');
+ header('Content-Type: application/force-download');
+ if (preg_match("/MSIE 5.5/", $_SERVER['HTTP_USER_AGENT'])) {
+ header('Content-Disposition: filename='.$tpl->getVar('tpl_file'));
+ } else {
+ header('Content-Disposition: attachment; filename='.$tpl->getVar('tpl_file'));
+ }
+ header('Content-length: '.strlen($output));
+ echo $output;
+ }
+ break;
+ case 'uploadtpl':
+ $tpltpl_handler =& xoops_gethandler('tplfile');
+ $id = intval($_GET['id']);
+ $tpl =& $tpltpl_handler->get($id);
+ xoops_cp_header();
+ echo '<a href="admin.php?fct=tplsets">'. _MD_TPLMAIN .'</a> <span style="font-weight:bold;">»»</span> <a href="./admin.php?fct=tplsets&op=listtpl&moddir='.$tpl->getVar('tpl_module').'&tplset='.$tpl->getVar('tpl_tplset').'">'.$tpl->getVar('tpl_tplset').'</a> <span style="font-weight:bold;">»»</span> '._MD_UPLOAD.'<br /><br />';
+ if (is_object($tpl)) {
+ include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+ $form = new XoopsThemeForm(_MD_UPLOAD, 'tplupload_form', 'admin.php', 'post', true);
+ $form->setExtra('enctype="multipart/form-data"');
+ $form->addElement(new XoopsFormLabel(_MD_FILENAME, $tpl->getVar('tpl_file').' ('.$tpl->getVar('tpl_tplset').')'));
+ $form->addElement(new XoopsFormFile(_MD_CHOOSEFILE.'<br /><span style="color:#ff0000;">'._MD_UPWILLREPLACE.'</span>', 'tpl_upload', 200000), true);
+ $form->addElement(new XoopsFormHidden('tpl_id', $id));
+ $form->addElement(new XoopsFormHidden('op', 'uploadtpl_go'));
+ $form->addElement(new XoopsFormHidden('fct', 'tplsets'));
+ $form->addElement(new XoopsFormButton('', 'upload_button', _MD_UPLOAD, 'submit'));
+ $form->display();
+ xoops_cp_footer();
+ exit();
+ } else {
+ echo 'Selected template does not exist';
+ }
+ xoops_cp_footer();
+ break;
+ case 'uploadtpl_go':
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=tplsets', 1, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $tpltpl_handler =& xoops_gethandler('tplfile');
+ $tpl =& $tpltpl_handler->get($tpl_id);
+ if (is_object($tpl)) {
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('text/html', 'application/x-cdf', 'text/plain'), 200000);
+ $uploader->setPrefix('tmp');
+ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
+ if (!$uploader->upload()) {
+ $err = $uploader->getErrors();
+ } else {
+ $tpl->setVar('tpl_lastmodified', time());
+ $fp = @fopen($uploader->getSavedDestination(), 'r');
+ $fsource = @fread($fp, filesize($uploader->getSavedDestination()));
+ @fclose($fp);
+ $tpl->setVar('tpl_source', $fsource, true);
+ @unlink($uploader->getSavedDestination());
+ if (!$tpltpl_handler->insert($tpl)) {
+ $err = 'Failed inserting data to database';
+ } else {
+ if ($tpl->getVar('tpl_tplset') == $xoopsConfig['template_set']) {
+ include_once XOOPS_ROOT_PATH.'/class/template.php';
+ xoops_template_touch($tpl, true);
+ }
+ }
+ }
+ } else {
+ $err = implode('<br />', $uploader->getErrors(false));
+ }
+ if (isset($err)) {
+ xoops_cp_header(false);
+ xoops_error($err);
+ xoops_cp_footer();
+ exit();
+ }
+ redirect_header('admin.php?fct=tplsets&op=listtpl&moddir='.$tpl->getVar('tpl_module').'&tplset='.urlencode($tpl->getVar('tpl_tplset')), 2, _MD_AM_DBUPDATED);
+ }
+ break;
+ // upload new file
+ case 'uploadtpl2':
+ xoops_cp_header();
+ $tplset = htmlspecialchars($tplset);
+ $moddir = htmlspecialchars($moddir);
+ echo '<a href="admin.php?fct=tplsets">'. _MD_TPLMAIN .'</a> <span style="font-weight:bold;">»»</span> <a href="./admin.php?fct=tplsets&op=listtpl&moddir='.$moddir.'&tplset='.$tplset.'">'.$tplset.'</a> <span style="font-weight:bold;">»»</span> '._MD_UPLOAD.'<br /><br />';
+ include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+ $form = new XoopsThemeForm(_MD_UPLOAD, 'tplupload_form', 'admin.php', 'post', true);
+ $form->setExtra('enctype="multipart/form-data"');
+ $form->addElement(new XoopsFormLabel(_MD_FILENAME, $file));
+ $form->addElement(new XoopsFormFile(_MD_CHOOSEFILE.'<br /><span style="color:#ff0000;">'._MD_UPWILLREPLACE.'</span>', 'tpl_upload', 200000), true);
+ $form->addElement(new XoopsFormHidden('moddir', $moddir));
+ $form->addElement(new XoopsFormHidden('tplset', $tplset));
+ $form->addElement(new XoopsFormHidden('file', $file));
+ $form->addElement(new XoopsFormHidden('type', $type));
+ $form->addElement(new XoopsFormHidden('op', 'uploadtpl2_go'));
+ $form->addElement(new XoopsFormHidden('fct', 'tplsets'));
+ $form->addElement(new XoopsFormButton('', 'ploadtarupload_button', _MD_UPLOAD, 'submit'));
+ $form->display();
+ xoops_cp_footer();
+ break;
+ case 'uploadtpl2_go':
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=tplsets', 1, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('text/html', 'application/x-cdf', 'text/plain'), 200000);
+ $uploader->setPrefix('tmp');
+ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
+ if (!$uploader->upload()) {
+ $err = $uploader->getErrors();
+ } else {
+ $tpltpl_handler =& xoops_gethandler('tplfile');
+ $tplfile =& $tpltpl_handler->find('default', $type, null, $moddir, $file);
+ if (is_array($tplfile)) {
+ $tpl =& $tplfile[0]->xoopsClone();
+ $tpl->setVar('tpl_id', 0);
+ $tpl->setVar('tpl_tplset', $tplset);
+ $tpl->setVar('tpl_lastmodified', time());
+ $fp = @fopen($uploader->getSavedDestination(), 'r');
+ $fsource = @fread($fp, filesize($uploader->getSavedDestination()));
+ @fclose($fp);
+ $tpl->setVar('tpl_source', $fsource, true);
+ @unlink($uploader->getSavedDestination());
+ if (!$tpltpl_handler->insert($tpl)) {
+ $err = 'Failed inserting data to database';
+ } else {
+ if ($tplset == $xoopsConfig['template_set']) {
+ include_once XOOPS_ROOT_PATH.'/class/template.php';
+ xoops_template_touch($tpl, true);
+ }
+ }
+ } else {
+ $err = 'This template file does not need to be installed (PHP files using this template file does not exist)';
+ }
+ }
+ } else {
+ $err = implode('<br />', $uploader->getErrors(false));
+ }
+ if (isset($err)) {
+ xoops_cp_header(false);
+ xoops_error($err);
+ xoops_cp_footer();
+ exit();
+ }
+ redirect_header('admin.php?fct=tplsets&op=listtpl&moddir='.$moddir.'&tplset='.urlencode($tplset), 2, _MD_AM_DBUPDATED);
+ break;
+ case 'download':
+ if (isset($tplset)) {
+ if (false != extension_loaded('zlib')) {
+ if (isset($_GET['method']) && $_GET['method'] == 'tar') {
+ if (@function_exists('gzencode')) {
+ require_once(XOOPS_ROOT_PATH.'/class/tardownloader.php');
+ $downloader = new XoopsTarDownloader();
+ }
+ } else {
+ if (@function_exists('gzcompress')) {
+ require_once(XOOPS_ROOT_PATH.'/class/zipdownloader.php');
+ $downloader = new XoopsZipDownloader();
+ }
+ }
+ $tplset_handler =& xoops_gethandler('tplset');
+ $tplsetobj =& $tplset_handler->getByName($tplset);
+ $xml = "<"."?xml version=\"1.0\"?".">\r\n<tplset>\r\n <name>".$tplset."</name>\r\n <dateCreated>".$tplsetobj->getVar('tplset_created')."</dateCreated>\r\n <credits>\r\n".$tplsetobj->getVar('tplset_credits')."\r\n </credits>\r\n <generator>".XOOPS_VERSION."</generator>\r\n <templates>";
+ $tpltpl_handler =& xoops_gethandler('tplfile');
+ $files =& $tpltpl_handler->getObjects(new Criteria('tpl_tplset', $tplset), true);
+ $fcount = count($files);
+ if ($fcount > 0) {
+ for ($i = 0; $i < $fcount; $i++) {
+ if ($files[$i]->getVar('tpl_type') == 'block') {
+ $path = $tplset.'/templates/'.$files[$i]->getVar('tpl_module').'/blocks/'.$files[$i]->getVar('tpl_file');
+ $xml .= "\r\n <template name=\"".$files[$i]->getVar('tpl_file')."\">\r\n <module>".$files[$i]->getVar('tpl_module')."</module>\r\n <type>block</type>\r\n <lastModified>".$files[$i]->getVar('tpl_lastmodified')."</lastModified>\r\n </template>";
+ } elseif ($files[$i]->getVar('tpl_type') == 'module') {
+ $path = $tplset.'/templates/'.$files[$i]->getVar('tpl_module').'/'.$files[$i]->getVar('tpl_file');
+ $xml .= "\r\n <template name=\"".$files[$i]->getVar('tpl_file')."\">\r\n <module>".$files[$i]->getVar('tpl_module')."</module>\r\n <type>module</type>\r\n <lastModified>".$files[$i]->getVar('tpl_lastmodified')."</lastModified>\r\n </template>";
+ }
+ $downloader->addFileData($files[$i]->getVar('tpl_source'), $path, $files[$i]->getVar('tpl_lastmodified'));
+ }
+
+ $xml .= "\r\n </templates>";
+/*
+ $xml ." "\r\n <images>";
+ $image_handler =& xoops_gethandler('imagesetimg');
+ $criteria = new CriteriaCompo(new Criteria('l.tplset_name', $tplset));
+ $criteria->add(new Criteria('s.imgset_refid', 0));
+ $ifiles =& $image_handler->getObjects($criteria);
+ $fcount = count($ifiles);
+ for ($i = 0; $i < $fcount; $i++) {
+ $dummyimage = XOOPS_CACHE_PATH.'/_dummyimage'.$i.time();
+ $fp = @fopen($dummyimage, 'wb');
+ @fwrite($fp, $ifiles[$i]->getVar('imgsetimg_body'));
+ @fclose($fp);
+ $downloader->addBinaryFile($dummyimage, $tplset.'/images/'.$ifiles[$i]->getVar('imgsetimg_file'));
+ @unlink($dummyimage);
+ $xml .= " \r\n <image name=\"".$ifiles[$i]->getVar('imgsetimg_file')."\"></image>";
+ }
+*/
+
+ }
+ //$xml .= "\r\n </images>
+ $xml .= "\r\n</tplset>";
+ $downloader->addFileData($xml, $tplset.'/tplset.xml', time());
+ echo $downloader->download($tplset, true);
+ } else {
+ xoops_cp_header();
+ xoops_error(_MD_NOZLIB);
+ xoops_cp_footer();
+ }
+ }
+ break;
+ case 'generatetpl':
+ xoops_cp_header();
+ xoops_confirm(array('tplset' => $tplset, 'moddir' => $moddir, 'file' => $file, 'type' => $type, 'op' => 'generatetpl_go', 'fct' => 'tplsets'), 'admin.php', _MD_PLZGENERATE, _MD_GENERATE);
+ xoops_cp_footer();
+ break;
+ case 'generatetpl_go':
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=tplsets', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $tpltpl_handler =& xoops_gethandler('tplfile');
+ $tplfile =& $tpltpl_handler->find('default', $type, null, $moddir, $file, true);
+ if (count($tplfile) > 0) {
+ $newtpl =& $tplfile[0]->xoopsClone();
+ $newtpl->setVar('tpl_id', 0);
+ $newtpl->setVar('tpl_tplset', $tplset);
+ $newtpl->setVar('tpl_lastmodified', time());
+ $newtpl->setVar('tpl_lastimported', 0);
+ if (!$tpltpl_handler->insert($newtpl)) {
+ $err = 'ERROR: Could not insert template <b>'.$tplfile[0]->getVar('tpl_file').'</b> to the database.';
+ } else {
+ if ($tplset == $xoopsConfig['template_set']) {
+ include_once XOOPS_ROOT_PATH.'/class/template.php';
+ xoops_template_touch($newtpl);
+ }
+ }
+ } else {
+ $err = 'Selected file does not exist)';
+ }
+ if (!isset($err)) {
+ redirect_header('admin.php?fct=tplsets&op=listtpl&moddir='.$newtpl->getVar('tpl_module').'&tplset='.urlencode($newtpl->getVar('tpl_tplset')), 2, _MD_AM_DBUPDATED);
+ }
+ xoops_cp_header();
+ xoops_error($err);
+ echo '<br /><a href="admin.php?fct=tplsets">'._MD_AM_BTOTADMIN.'</a>';
+ xoops_cp_footer();
+ break;
+ case 'generatemod':
+ xoops_cp_header();
+ xoops_confirm(array('tplset' => $tplset, 'op' => 'generatemod_go', 'fct' => 'tplsets', 'moddir' => $moddir), 'admin.php', _MD_PLZGENERATE, _MD_GENERATE);
+ xoops_cp_footer();
+ break;
+ case 'generatemod_go':
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=tplsets', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $tpltpl_handler =& xoops_gethandler('tplfile');
+ xoops_cp_header();
+ echo '<code>';
+ $tplfiles =& $tpltpl_handler->find('default', 'module', null, $moddir, null, true);
+ $fcount = count($tplfiles);
+ if ($fcount > 0) {
+ echo 'Installing module template files for template set '.$tplset.'...<br />';
+ for ($i = 0; $i < $fcount; $i++) {
+ $newtpl =& $tplfiles[$i]->xoopsClone();
+ $newtpl->setVar('tpl_id', 0);
+ $newtpl->setVar('tpl_tplset', $tplset);
+ $newtpl->setVar('tpl_lastmodified', time());
+ $newtpl->setVar('tpl_lastimported', 0);
+ if (!$tpltpl_handler->insert($newtpl)) {
+ echo ' <span style="color:#ff0000;">ERROR: Could not insert template <b>'.$file.'</b> to the database.</span><br />';
+ } else {
+ if ($tplset == $xoopsConfig['template_set']) {
+ include_once XOOPS_ROOT_PATH.'/class/template.php';
+ xoops_template_touch($newtpl);
+ }
+ echo ' Template <b>'.$tplfiles[$i]->getVar('tpl_file').'</b> added to the database.<br />';
+ }
+ }
+ flush();
+ unset($newtpl);
+ }
+ unset($files);
+ $tplfiles =& $tpltpl_handler->find('default', 'block', null, $moddir, null, true);
+ $fcount = count($tplfiles);
+ if ($fcount > 0) {
+ echo ' Installing block template files...<br />';
+ for ($i = 0; $i < $fcount; $i++) {
+ $newtpl =& $tplfiles[$i]->xoopsClone();
+ $newtpl->setVar('tpl_id', 0);
+ $newtpl->setVar('tpl_tplset', $tplset);
+ $newtpl->setVar('tpl_lastmodified', time());
+ $newtpl->setVar('tpl_lastimported', 0);
+ if (!$tpltpl_handler->insert($newtpl)) {
+ echo ' <span style="color:#ff0000;">ERROR: Could not insert block template <b>'.$tplfiles[$i]->getVar('tpl_file').'</b> to the database.</span><br />';echo $newtpl->getHtmlErrors();
+ } else {
+ if ($tplset == $xoopsConfig['template_set']) {
+ include_once XOOPS_ROOT_PATH.'/class/template.php';
+ xoops_template_touch($newtpl);
+ }
+ echo ' Block template <b>'.$tplfiles[$i]->getVar('tpl_file').'</b> added to the database.<br />';
+ }
+ }
+ flush();
+ unset($newtpl);
+ }
+ echo '<br />Module template files for template set <b>'.$tplset.'</b> generated and installed.<br /></code><br /><a href="admin.php?fct=tplsets">'._MD_AM_BTOTADMIN.'</a>';
+ xoops_cp_footer();
+ break;
+ case 'uploadtar_go':
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=tplsets', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('application/x-gzip', 'application/gzip', 'application/gzip-compressed', 'application/x-gzip-compressed', 'application/x-tar', 'application/x-tar-compressed', 'application/octet-stream'), 1000000);
+ $uploader->setPrefix('tmp');
+ xoops_cp_header();
+ echo '<code>';
+ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
+ if (!$uploader->upload()) {
+ xoops_error($uploader->getErrors());
+ } else {
+ include_once XOOPS_ROOT_PATH.'/class/class.tar.php';
+ $tar = new tar();
+ $tar->openTar($uploader->getSavedDestination());
+ @unlink($uploader->getSavedDestination());
+ $themefound = false;
+ foreach ($tar->files as $id => $info) {
+ $infoarr = explode('/', str_replace("\\", '/', $info['name']));
+ if (!isset($tplset_name)) {
+ $tplset_name = trim($infoarr[0]);
+ } else {
+ $tplset_name = trim($tplset_name);
+ if ($tplset_name == '') {
+ $tplset_name = trim($infoarr[0]);
+ }
+ }
+ if ($tplset_name != '') {
+ break;
+ }
+ }
+ if ($tplset_name == '') {
+ echo '<span style="color:#ff0000;">ERROR: Template file not found</span><br />';
+ } else {
+ $tplset_handler =& xoops_gethandler('tplset');
+ if ($tplset_handler->getCount(new Criteria('tplset_name', $tplset_name)) > 0) {
+ echo '<span style="color:#ff0000;">ERROR: Template set <b>'.$tplset_name.'</b> already exists.</span><br />';
+ } else {
+ $tplset =& $tplset_handler->create();
+ $tplset->setVar('tplset_name', $tplset_name);
+ $tplset->setVar('tplset_created', time());
+ if (!$tplset_handler->insert($tplset)) {
+ echo '<span style="color:#ff0000;">ERROR: Could not create template set <b>'.$tplset_name.'</b>.</span><br />';
+ } else {
+ $tplsetid = $tplset->getVar('tplset_id');
+ echo 'Template set <b>'.$tplset_name.'</b> created. (ID: <b>'.$tplsetid.'</b>)</span><br />';
+ $tpltpl_handler = xoops_gethandler('tplfile');
+ $themeimages = array();
+ foreach ($tar->files as $id => $info) {
+ $infoarr = explode('/', str_replace("\\", '/', $info['name']));
+ if (isset($infoarr[3]) && trim($infoarr[3]) == 'blocks') {
+ $default =& $tpltpl_handler->find('default', 'block', null, trim($infoarr[2]), trim($infoarr[4]));
+ } elseif ((!isset($infoarr[4]) || trim($infoarr[4]) == '') && $infoarr[1] == 'templates') {
+ $default =& $tpltpl_handler->find('default', 'module', null, trim($infoarr[2]), trim($infoarr[3]));
+ } elseif (isset($infoarr[3]) && trim($infoarr[3]) == 'images') {
+ $infoarr[2] = trim($infoarr[2]);
+ if (preg_match("/(.*)\.(gif|jpg|jpeg|png)$/i", $infoarr[2], $match)) {
+ $themeimages[] = array('name' => $infoarr[2], 'content' => $info['file']);
+ }
+ }
+ if (isset($default) && count($default) > 0) {
+ $newtpl =& $default[0]->xoopsClone();
+ $newtpl->setVar('tpl_id', 0);
+ $newtpl->setVar('tpl_tplset', $tplset_name);
+ $newtpl->setVar('tpl_source', $info['file'], true);
+ $newtpl->setVar('tpl_lastmodified', time());
+ if (!$tpltpl_handler->insert($newtpl)) {
+ echo ' <span style="color:#ff0000;">ERROR: Could not insert <b>'.$info['name'].'</b> to the database.</span><br />';
+ } else {
+ echo ' <b>'.$info['name'].'</b> inserted to the database.<br />';
+ }
+ unset($default);
+ }
+ unset($info);
+ }
+ $icount = count($themeimages);
+ if ($icount > 0) {
+ $imageset_handler =& xoops_gethandler('imageset');
+ $imgset =& $imageset_handler->create();
+ $imgset->setVar('imgset_name', $tplset_name);
+ $imgset->setVar('imgset_refid', 0);
+ if (!$imageset_handler->insert($imgset)) {
+ echo ' <span style="color:#ff0000;">ERROR: Could not create image set.</span><br />';
+ } else {
+ $newimgsetid = $imgset->getVar('imgset_id');
+ echo ' Image set <b>'.$tplset_name.'</b> created. (ID: <b>'.$newimgsetid.'</b>)<br />';
+ if (!$imageset_handler->linktplset($newimgsetid, $tplset_name)) {
+ echo ' <span style="color:#ff0000;">ERROR: Failed linking image set to template set <b>'.$tplset_name.'</b></span><br />';
+ }
+ $image_handler =& xoops_gethandler('imagesetimg');
+ for ($i = 0; $i < $icount; $i++) {
+ if (isset($themeimages[$i]['name']) && $themeimages[$i]['name'] != '') {
+ $image =& $image_handler->create();
+ $image->setVar('imgsetimg_file', $themeimages[$i]['name']);
+ $image->setVar('imgsetimg_imgset', $newimgsetid);
+ $image->setVar('imgsetimg_body', $themeimages[$i]['content'], true);
+ if (!$image_handler->insert($image)) {
+ echo ' <span style="color:#ff0000;">ERROR: Failed storing image file data to database.</span><br />';
+ } else {
+ echo ' Image file data stored into database. (ID: <b>'.$image->getVar('imgsetimg_id').'</b>)<br />';
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ } else {
+ $err = implode('<br />', $uploader->getErrors(false));
+ echo $err;
+ }
+ echo '</code><br /><a href="admin.php?fct=tplsets">'._MD_AM_BTOTADMIN.'</a>';
+ xoops_cp_footer();
+ break;
+ case 'previewtpl':
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=tplsets', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ require_once XOOPS_ROOT_PATH.'/class/template.php';
+ $myts =& MyTextsanitizer::getInstance();
+ $html = $myts->stripSlashesGPC($html);
+ $tpltpl_handler =& xoops_gethandler('tplfile');
+ $tplfile =& $tpltpl_handler->get($id, true);
+
+ if (is_object($tplfile)) {
+ $dummylayout = '<html><head><meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" /><meta http-equiv="content-language" content="'._LANGCODE.'" /><title>'.$xoopsConfig['sitename'].'</title><style type="text/css" media="all" href="'.xoops_getcss().'" />';
+ $dummylayout .= '</head><body><{$content}></body></html>';
+ if ($tplfile->getVar('tpl_type') == 'block') {
+ $block_handler =& xoops_gethandler('block');
+ $instance_handler =& xoops_gethandler('blockinstance');
+ $instance =& $instance_handler->get($tplfile->getVar('tpl_refid'));
+ $instance->setBlock($block_handler->get($instance->getVar('bid')));
+ $xoopsTpl->assign('block', $instance->buildBlock());
+ }
+ $dummytpl = '_dummytpl_'.time().'.html';
+ $fp = fopen(XOOPS_CACHE_PATH.'/'.$dummytpl, 'w');
+ fwrite($fp, $html);
+ fclose($fp);
+ $xoopsTpl->assign('content', $xoopsTpl->fetch('file:'.XOOPS_CACHE_PATH.'/'.$dummytpl));
+ $xoopsTpl->clear_compiled_tpl('file:'.XOOPS_CACHE_PATH.'/'.$dummytpl);
+ unlink(XOOPS_CACHE_PATH.'/'.$dummytpl);
+ $dummyfile = '_dummy_'.time().'.html';
+ $fp = fopen(XOOPS_CACHE_PATH.'/'.$dummyfile, 'w');
+ fwrite($fp, $dummylayout);
+ fclose($fp);
+ $tplset= $tplfile->getVar('tpl_tplset');
+ $tform = array('tpl_tplset' => $tplset, 'tpl_id' => $id, 'tpl_file' => $tplfile->getVar('tpl_file'), 'tpl_desc' => $tplfile->getVar('tpl_desc'), 'tpl_lastmodified' => $tplfile->getVar('tpl_lastmodified'), 'tpl_source' => htmlspecialchars($html, ENT_QUOTES), 'tpl_module' => $moddir);
+ include_once XOOPS_ROOT_PATH.'/modules/system/admin/tplsets/tplform.php';
+ xoops_cp_header();
+ echo '<a href="admin.php?fct=tplsets">'. _MD_TPLMAIN .'</a> <span style="font-weight:bold;">»»</span> <a href="./admin.php?fct=tplsets&op=listtpl&moddir='.$moddir.'&tplset='.$tplset.'">'.$tplset.'</a> <span style="font-weight:bold;">»»</span> '._MD_EDITTEMPLATE.'<br /><br />';
+ $form->display();
+ xoops_cp_footer();
+ echo '<script type="text/javascript">
+ <!--//
+ preview_window = openWithSelfMain("", "popup", 680, 450, true);
+ preview_window.document.clear();
+ ';
+ $lines = preg_split("/(\r\n|\r|\n)( *)/", $xoopsTpl->fetch('file:'.XOOPS_CACHE_PATH.'/'.$dummyfile));
+ $xoopsTpl->clear_compiled_tpl('file:'.XOOPS_CACHE_PATH.'/'.$dummyfile);
+ unlink(XOOPS_CACHE_PATH.'/'.$dummyfile);
+ foreach ($lines as $line) {
+ echo 'preview_window.document.writeln("'.str_replace('"', '\"', $line).'");';
+ }
+ echo '
+ preview_window.focus();
+ preview_window.document.close();
+ //-->
+ </script>';
+
+ }
+ break;
+ case 'update':
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=tplsets', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('text/html', 'application/x-cdf'), 200000);
+ $uploader->setPrefix('tmp');
+ $msg = array();
+ foreach ($_POST['xoops_upload_file'] as $upload_file) {
+ // '.' is converted to '_' when upload
+ $upload_file2 = str_replace('.', '_', $upload_file);
+ if ($uploader->fetchMedia($upload_file2)) {
+ if (!$uploader->upload()) {
+ $msg[] = $uploader->getErrors();
+ } else {
+ $tpltpl_handler =& xoops_gethandler('tplfile');
+ if (!isset($old_template[$upload_file])) {
+ $tplfile =& $tpltpl_handler->find('default', null, null, $moddir, $upload_file);
+ if (count($tplfile) > 0) {
+ $tpl =& $tplfile[0]->xoopsClone();
+ $tpl->setVar('tpl_id', 0);
+ $tpl->setVar('tpl_tplset', $tplset);
+ } else {
+ $msg[] = 'Template file <b>'.$upload_file.'</b> does not need to be installed (PHP files using this template file does not exist)';
+ continue;
+ }
+ } else {
+ $tpl =& $tpltpl_handler->get($old_template[$upload_file]);
+ }
+ $tpl->setVar('tpl_lastmodified', time());
+ $fp = @fopen($uploader->getSavedDestination(), 'r');
+ $fsource = @fread($fp, filesize($uploader->getSavedDestination()));
+ @fclose($fp);
+ $tpl->setVar('tpl_source', $fsource, true);
+ @unlink($uploader->getSavedDestination());
+ if (!$tpltpl_handler->insert($tpl)) {
+ $msg[] = 'Failed inserting data for '.$upload_file.' to database';
+ } else {
+ $msg[] = 'Template file <b>'.$upload_file.'</b> updated.';
+ if ($tplset == $xoopsConfig['template_set']) {
+ include_once XOOPS_ROOT_PATH.'/class/template.php';
+ if (xoops_template_touch($tpl, true)) {
+ $msg[] = 'Template file <b>'.$upload_file.'</b> compiled.';
+ }
+
+ }
+ }
+ }
+ } else {
+ if ($uploader->getMediaName() == '') {
+ continue;
+ } else {
+ $msg[] = $uploader->getErrors();
+ }
+ }
+ }
+ xoops_cp_header();
+ echo '<code>';
+ foreach ($msg as $m) {
+ echo $m.'<br />';
+ }
+ echo '</code><br /><a href="admin.php?fct=tplsets&op=listtpl&tplset='.$tplset.'&moddir='.$moddir.'">'._MD_AM_BTOTADMIN.'</a>';
+ xoops_cp_footer();
+ break;
+ case 'importtpl':
+ xoops_cp_header();
+ if (!empty($id)) {
+ xoops_confirm(array('tplset' => $tplset, 'moddir' => $moddir, 'id' => $id, 'op' => 'importtpl_go', 'fct' => 'tplsets'), 'admin.php', _MD_RUSUREIMPT, _MD_IMPORT);
+ } elseif (isset($file)) {
+ xoops_confirm(array('tplset' => $tplset, 'moddir' => $moddir, 'file' => $file, 'op' => 'importtpl_go', 'fct' => 'tplsets'), 'admin.php', _MD_RUSUREIMPT, _MD_IMPORT);
+ }
+ xoops_cp_footer();
+ break;
+ case 'importtpl_go':
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('admin.php?fct=tplsets', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $tpltpl_handler =& xoops_gethandler('tplfile');
+ $tplfile = '';
+ if (!empty($id)) {
+ $tplfile =& $tpltpl_handler->get($id, true);
+ } else {
+ $tplfiles =& $tpltpl_handler->find('default', null, null, null, trim($file), true);
+ $tplfile = (count($tplfiles) > 0) ? $tplfiles[0] : '';
+ }
+ $error = true;
+ if (is_object($tplfile)) {
+ switch ($tplfile->getVar('tpl_type')) {
+ case 'module':
+ $filepath = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$tplfile->getVar('tpl_module').'/'.$tplfile->getVar('tpl_file');
+ break;
+ case 'block':
+ $filepath = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$tplfile->getVar('tpl_module').'/blocks/'.$tplfile->getVar('tpl_file');
+ break;
+ default:
+ break;
+ }
+ if (file_exists($filepath)) {
+ if (false != $fp = fopen($filepath, 'r')) {
+ $filesource = fread($fp, filesize($filepath));
+ fclose($fp);
+ $tplfile->setVar('tpl_source', $filesource, true);
+ $tplfile->setVar('tpl_tplset', $tplset);
+ $tplfile->setVar('tpl_lastmodified', time());
+ $tplfile->setVar('tpl_lastimported', time());
+ if (!$tpltpl_handler->insert($tplfile)) {
+ } else {
+ $error = false;
+ }
+ }
+ }
+ }
+ if (false != $error) {
+ xoops_cp_header();
+ xoops_error('Could not import file '.$filepath);
+ echo '<br /><a href="admin.php?fct=tplsets&op=listtpl&tplset='.$tplset.'&moddir='.$moddir.'">'._MD_AM_BTOTADMIN.'</a>';
+ xoops_cp_footer();
+ exit();
+ }
+ redirect_header('admin.php?fct=tplsets&op=listtpl&moddir='.$tplfile->getVar('tpl_module').'&tplset='.urlencode($tplfile->getVar('tpl_tplset')), 2, _MD_AM_DBUPDATED);
+ break;
+ default:
+ break;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/main.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/themeimgform.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/themeimgform.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/themeimgform.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,56 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+$image_handler =& xoops_gethandler('imageset', 'imagesetimg');
+$criteria = new CriteriaCompo(new Criteria('tplset_name', $tplset));
+// skin image sets have reference ID 0
+$criteria->add(new Criteria('imgset_refid', 0));
+$imgs =& $image_handler->getObjects($criteria);
+$icount = count($imgs);
+if ($tplset != 'default') {
+ if ($icount > 0) {
+ echo '<form action="admin.php" method="post" enctype="multipart/form-data"><table width="100%" class="outer" cellspacing="1"><tr><th colspan="3">'._MD_EDITSKINIMG.'</th></tr>';
+ for ($i = 0; $i < $icount; $i++) {
+ echo '<tr><td rowspan="3" valign="middle" align="center" class="odd"><img src="admin.php?fct=tplsets&op=showimage&id='.$imgs[$i]->getVar('imgsetimg_id').'" alt="" /></td><td class="head">'._MD_IMGFILE.'</td><td class="even">'.$imgs[$i]->getVar('imgsetimg_file').'</td></tr><tr><td class="head">'._MD_IMGNEWFILE.'</td><td class="even"><input type="file" name="imgfiles['.$imgs[$i]->getVar('imgsetimg_id').']" /></td></tr><tr><td class="head">'._MD_IMGDELETE.'</td><td class="even"><input type="checkbox" name="imgdelete['.$imgs[$i]->getVar('imgsetimg_id').']" value="1" /><input type="hidden" name="imgids[]" value="'.$imgs[$i]->getVar('imgsetimg_id').'" /></td></tr>';
+ }
+ echo '<tr class="foot"><td colspan="3" align="center"><input type="hidden" name="tplset" value="'.$tplset.'" /><input type="hidden" name="op" value="updateimage" /><input type="hidden" name="fct" value="tplsets" /><input type="hidden" name="imgset" value="'.$imgs[0]->getVar('imgsetimg_imgset').'" /><input type="submit" name="imgsubmit" value="'._SUBMIT.'" /></td></tr></table></form>';
+ }
+ echo '<form action="admin.php" method="post" enctype="multipart/form-data"><table width="100%" class="outer" cellspacing="1"><tr><th colspan="3">'._MD_ADDSKINIMG.'</th></tr>';
+ echo '<tr><td class="head">'._MD_IMGNEWFILE.'</td><td class="even"><input type="file" name="imgfile" /></td></tr>';
+ echo '<tr><td class="head"> </td><td class="even"><input type="hidden" name="tplset" value="'.$tplset.'" /><input type="hidden" name="op" value="addimage" /><input type="hidden" name="fct" value="tplsets" /><input type="submit" name="imgsubmit" value="'._SUBMIT.'" /><input type="hidden" name="imgset" value="';
+ if ($icount > 0) {
+ echo $imgs[0]->getVar('imgsetimg_imgset');
+ }
+ echo '" /></td></tr></table></form>';
+} else {
+ echo '<table width="100%" class="outer" cellspacing="1"><tr><th colspan="3">'._MD_SKINIMGS.'</th></tr>';
+ for ($i = 0; $i < $icount; $i++) {
+ echo '<tr><td valign="middle" align="center" class="odd"><img src="admin.php?fct=tplsets&op=showimage&id='.$imgs[$i]->getVar('imgsetimg_id').'" alt="" /></td><td class="head">'._MD_IMGFILE.'</td><td class="even">'.$imgs[$i]->getVar('imgsetimg_file').'</td></tr>';
+ }
+ echo '</table>';
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/themeimgform.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/tplform.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/tplform.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/tplform.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,47 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+$form = new XoopsThemeForm(_MD_EDITTEMPLATE, 'template_form', 'admin.php', 'post', true);
+$form->addElement(new XoopsFormLabel(_MD_FILENAME, $tform['tpl_file']));
+$form->addElement(new XoopsFormLabel(_MD_FILEDESC, $tform['tpl_desc']));
+$form->addElement(new XoopsFormLabel(_MD_LASTMOD, formatTimestamp($tform['tpl_lastmodified'], 'l')));
+$form->addElement(new XoopsFormTextArea(_MD_FILEHTML, 'html', $tform['tpl_source'], 25, 70));
+$form->addElement(new XoopsFormHidden('id', $tform['tpl_id']));
+$form->addElement(new XoopsFormHidden('op', 'edittpl_go'));
+$form->addElement(new XoopsFormHidden('redirect', 'edittpl'));
+$form->addElement(new XoopsFormHidden('fct', 'tplsets'));
+$form->addElement(new XoopsFormHidden('moddir', $tform['tpl_module']));
+if ($tform['tpl_tplset'] != 'default') {
+ $button_tray = new XoopsFormElementTray('');
+ $button_tray->addElement(new XoopsFormButton('', 'previewtpl', _PREVIEW, 'submit'));
+ $button_tray->addElement(new XoopsFormButton('', 'submittpl', _SUBMIT, 'submit'));
+ $form->addElement($button_tray);
+} else {
+ $form->addElement(new XoopsFormButton('', 'previewtpl', _MD_VIEW, 'submit'));
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/tplform.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/xoops_version.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/xoops_version.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/xoops_version.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,45 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$modversion['name'] = _MD_AM_TPLSETS;
+$modversion['version'] = "";
+$modversion['description'] = "XOOPS Template Set Manager";
+$modversion['author'] = "";
+$modversion['credits'] = "The XOOPS Project";
+$modversion['help'] = "tplsets.html";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 1;
+$modversion['image'] = "tplsets.gif";
+
+$modversion['hasAdmin'] = 1;
+$modversion['adminpath'] = "admin.php?fct=tplsets";
+$modversion['category'] = XOOPS_SYSTEM_TPLSET;
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/tplsets/xoops_version.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/main.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/main.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/main.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,158 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+/**
+ * Manage user rank.
+ * @copyright XOOPS Project
+ * @todo Fix register_globals!
+ **/
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit("Access Denied");
+}
+
+$op = 'RankForumAdmin';
+
+if (isset($_GET['op'])) {
+ $op = $_GET['op'];
+} elseif (isset($_POST['op'])) {
+ $op = $_POST['op'];
+}
+
+switch ($op) {
+
+case "RankForumEdit":
+ $rank_id = isset($_GET['rank_id']) ? intval($_GET['rank_id']) : 0;
+ if ($rank_id > 0) {
+ include_once XOOPS_ROOT_PATH."/modules/system/admin/userrank/userrank.php";
+ RankForumEdit($rank_id);
+ }
+ break;
+
+case "RankForumDel":
+ $rank_id = isset($_GET['rank_id']) ? intval($_GET['rank_id']) : 0;
+ if ($rank_id > 0) {
+ xoops_cp_header();
+ xoops_confirm(array('fct' => 'userrank', 'op' => 'RankForumDelGo', 'rank_id' => $rank_id), 'admin.php', _AM_WAYSYWTDTR);
+ xoops_cp_footer();
+ }
+ break;
+
+case "RankForumDelGo":
+ $rank_id = isset($_POST['rank_id']) ? intval($_POST['rank_id']) : 0;
+ if ($rank_id <= 0 | !$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=userrank", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $db =& Database::getInstance();
+ $sql = sprintf("DELETE FROM %s WHERE rank_id = %u", $db->prefix("ranks"), $rank_id);
+ $db->query($sql);
+ redirect_header("admin.php?fct=userrank&op=ForumAdmin",1,_MD_AM_DBUPDATED);
+ break;
+
+case "RankForumAdd":
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=userrank", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $db =& Database::getInstance();
+ $myts =& MyTextSanitizer::getInstance();
+ $rank_special = isset($_POST['rank_special']) && intval($_POST['rank_special']) ? 1 : 0;
+ $rank_title = $myts->stripSlashesGPC($_POST['rank_title']);
+ $rank_image = '';
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png'), 100000, 120, 120);
+ $uploader->setPrefix('rank');
+ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
+ if ($uploader->upload()) {
+ $rank_image = $uploader->getSavedFileName();
+ }
+ }
+ $newid = $db->genId($db->prefix("ranks")."_rank_id_seq");
+ if ($rank_special == 1) {
+ $sql = "INSERT INTO ".$db->prefix("ranks")." (rank_id, rank_title, rank_min, rank_max, rank_special, rank_image) VALUES ($newid, ".$db->quoteString($rank_title).", -1, -1, 1, ".$db->quoteString($rank_image).")";
+ } else {
+ $sql = "INSERT INTO ".$db->prefix("ranks")." (rank_id, rank_title, rank_min, rank_max, rank_special, rank_image) VALUES ($newid, ".$db->quoteString($rank_title).", ".intval($_POST['rank_min'])." , ".intval($_POST['rank_max'])." , 0, ".$db->quoteString($rank_image).")";
+ }
+ if (!$db->query($sql)) {
+ xoops_cp_header();
+ xoops_error('Failed storing rank data into the database');
+ xoops_cp_footer();
+ } else {
+ redirect_header("admin.php?fct=userrank&op=RankForumAdmin",1,_MD_AM_DBUPDATED);
+ }
+ break;
+
+case "RankForumSave":
+ $rank_id = isset($_POST['rank_id']) ? intval($_POST['rank_id']) : 0;
+ if ($rank_id <= 0 | !$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=userrank", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $db =& Database::getInstance();
+ $myts =& MyTextSanitizer::getInstance();
+ $rank_special = isset($_POST['rank_special']) && intval($_POST['rank_special']) ? 1 : 0;
+ $rank_title = $myts->stripSlashesGPC($_POST['rank_title']);
+ $delete_old_image = false;
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png'), 100000, 120, 120);
+ $uploader->setPrefix('rank');
+ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
+ if ($uploader->upload()) {
+ $rank_image = $uploader->getSavedFileName();
+ $delete_old_image = true;
+ }
+ }
+ if ($rank_special > 0) {
+ $_POST['rank_min'] = $_POST['rank_max'] = -1;
+ }
+ $sql = "UPDATE ".$db->prefix("ranks")." SET rank_title = ".$db->quoteString($rank_title).", rank_min = ".intval($_POST['rank_min']).", rank_max = ".intval($_POST['rank_max']).", rank_special = ".$rank_special;
+ if ($delete_old_image) {
+ $sql .= ", rank_image = ".$db->quoteString($rank_image);
+ }
+ $sql .= " WHERE rank_id = ".$rank_id;
+ if (!$db->query($sql)) {
+ xoops_cp_header();
+ xoops_error('Failed storing rank data into the database');
+ xoops_cp_footer();
+ } else {
+ if ($delete_old_image) {
+ $old_rank_path = str_replace("\\", "/", realpath(XOOPS_UPLOAD_PATH.'/'.trim($_POST['old_rank'])));
+ if (0 === strpos($old_rank_path, XOOPS_UPLOAD_PATH) && is_file($old_rank_path)) {
+ unlink($old_rank_path);
+ }
+ }
+ redirect_header("admin.php?fct=userrank&op=RankForumAdmin",1,_MD_AM_DBUPDATED);
+ }
+ break;
+
+default:
+ include_once XOOPS_ROOT_PATH."/modules/system/admin/userrank/userrank.php";
+ RankForumAdmin();
+ break;
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/main.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/rankform.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/rankform.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/rankform.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,54 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+$rank_form = new XoopsThemeForm($rank['form_title'], 'rankform', 'admin.php', 'post', true);
+$rank_form->setExtra('enctype="multipart/form-data"');
+$rank_form->addElement(new XoopsFormText(_AM_RANKTITLE, 'rank_title', 50, 50, $rank['rank_title']), true);
+$rank_form->addElement(new XoopsFormText(_AM_MINPOST, 'rank_min', 10, 10, $rank['rank_min']));
+$rank_form->addElement(new XoopsFormText(_AM_MAXPOST, 'rank_max', 10, 10, $rank['rank_max']));
+$rank_tray = new XoopsFormElementTray(_AM_IMAGE, ' ');
+$rank_select = new XoopsFormFile('', 'rank_image', 5000000);
+$rank_tray->addElement($rank_select);
+if (trim($rank['rank_image']) != '' && file_exists(XOOPS_UPLOAD_PATH.'/'.$rank['rank_image'])) {
+ $rank_label = new XoopsFormLabel('', '<img src="'.XOOPS_UPLOAD_URL.'/'.$rank['rank_image'].'" alt="" />');
+ $rank_tray->addElement($rank_label);
+}
+$rank_form->addElement($rank_tray);
+$tray = new XoopsFormElementTray(_AM_SPECIAL, '<br />');
+$tray->addElement(new XoopsFormRadioYN('', 'rank_special', $rank['rank_special']));
+$tray->addElement(new XoopsFormLabel('', _AM_SPECIALCAN));
+$rank_form->addElement($tray);
+$rank_form->addElement(new XoopsFormHidden('rank_id', $rank['rank_id']));
+$rank_form->addElement(new XoopsFormHidden('op', $rank['op']));
+$rank_form->addElement(new XoopsFormHidden('fct', 'userrank'));
+$rank_form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/rankform.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/userrank.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/userrank.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/userrank.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,108 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit("Access Denied");
+}
+
+function RankForumAdmin()
+{
+ $db =& Database::getInstance();
+ xoops_cp_header();
+ echo "<h4 style='text-align:left;'>"._AM_RANKSSETTINGS."</h4>
+ <table width='100%' class='outer' cellpadding='4' cellspacing='1'>
+ <tr align='center'>
+ <th align='left'>"._AM_TITLE."</th>
+ <th>"._AM_MINPOST."</th>
+ <th>"._AM_MAXPOST."</th>
+ <th>"._AM_IMAGE."</th>
+ <th>"._AM_SPERANK."</th>
+ <th>"._AM_ACTION."</th></tr>";
+ $result = $db->query("SELECT * FROM ".$db->prefix("ranks")." ORDER BY rank_id");
+ $count = 0;
+ while ( $rank = $db->fetchArray($result) ) {
+ if ($count % 2 == 0) {
+ $class = 'even';
+ } else {
+ $class = 'odd';
+ }
+ echo "<tr class='$class' align='center'>
+ <td align='left'>".$rank['rank_title']."</td>
+ <td>".$rank['rank_min']."</td>
+ <td>".$rank['rank_max']."</td>
+ <td>";
+ if ($rank['rank_image'] && file_exists(XOOPS_UPLOAD_PATH.'/'.$rank['rank_image'])) {
+ echo '<img src="'.XOOPS_UPLOAD_URL.'/'.$rank['rank_image'].'" alt="" /></td>';
+ } else {
+ echo ' ';
+ }
+ if ($rank['rank_special'] == 1) {
+ echo '<td>'._AM_ON.'</td>';
+ } else {
+ echo '<td>'._AM_OFF.'</td>';
+ }
+ echo"<td><a href='admin.php?fct=userrank&op=RankForumEdit&rank_id=".$rank['rank_id']."'>"._AM_EDIT."</a> <a href='admin.php?fct=userrank&op=RankForumDel&rank_id=".$rank['rank_id']."&ok=0'>"._AM_DEL."</a></td></tr>";
+ $count++;
+ }
+ echo '</table><br /><br />';
+ $rank['rank_min'] = 0;
+ $rank['rank_max'] = 0;
+ $rank['rank_special'] = 0;
+ $rank['rank_id'] = '';
+ $rank['rank_title'] = '';
+ $rank['rank_image'] = 'blank.gif';
+ $rank['form_title'] = _AM_ADDNEWRANK;
+ $rank['op'] = 'RankForumAdd';
+ include_once XOOPS_ROOT_PATH.'/modules/system/admin/userrank/rankform.php';
+ $rank_form->display();
+ xoops_cp_footer();
+}
+
+
+function RankForumEdit($rank_id)
+{
+ $db =& Database::getInstance();
+ $myts =& MyTextSanitizer::getInstance();
+ xoops_cp_header();
+ echo '<a href="admin.php?fct=userrank">'. _AM_RANKSSETTINGS .'</a> <span style="font-weight:bold;">»»</span> '._AM_EDITRANK.'<br /><br />';
+ $result = $db->query("SELECT * FROM ".$db->prefix("ranks")." WHERE rank_id=".$rank_id);
+ $rank = $db->fetchArray($result);
+ $rank['rank_title'] = $myts->makeTboxData4Edit($rank['rank_title']);
+ $rank['rank_image'] = $myts->makeTboxData4Edit($rank['rank_image']);
+ $rank['form_title'] = _AM_EDITRANK;
+ $rank['op'] = 'RankForumSave';
+ include_once XOOPS_ROOT_PATH.'/modules/system/admin/userrank/rankform.php';
+ $rank_form->addElement(new XoopsFormHidden('old_rank', $rank['rank_image']));
+ $rank_form->display();
+ xoops_cp_footer();
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/userrank.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/xoops_version.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/xoops_version.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/xoops_version.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,45 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$modversion['name'] = _MD_AM_RANK;
+$modversion['version'] = "";
+$modversion['description'] = "User Posts Ranks Configuration";
+$modversion['author'] = "phpBB Group ( http://www.phpbb.com/ )";
+$modversion['credits'] = "";
+$modversion['help'] = "userrank.html";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 1;
+$modversion['image'] = "userrank.gif";
+
+$modversion['hasAdmin'] = 1;
+$modversion['adminpath'] = "admin.php?fct=userrank";
+$modversion['category'] = XOOPS_SYSTEM_URANK;
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/userrank/xoops_version.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/version/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/version/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/version/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/version/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/version/main.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/version/main.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/version/main.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,106 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->getVar('mid')) || !isset($_GET['mid'])) {
+ exit("Access Denied");
+}
+
+if (intval($_GET['mid'])) {
+ $module_handler =& xoops_gethandler('module');
+ $versioninfo =& $module_handler->get(intval($_GET['mid']));
+} else {
+ $mid = str_replace('..', '', trim($_GET['mid']));
+ if (file_exists(XOOPS_ROOT_PATH.'/modules/'.$mid.'/xoops_version.php')) {
+ $module_handler =& xoops_gethandler('module');
+ $versioninfo =& $module_handler->create();
+ $versioninfo->loadInfo($mid);
+ }
+}
+if (!isset($versioninfo) || !is_object($versioninfo)) {
+ exit();
+}
+
+//$css = getCss($theme);
+echo "<html>\n<head>\n";
+echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset="._CHARSET."\"></meta>\n";
+echo "<title>".htmlspecialchars($xoopsConfig['sitename'])."</title>\n";
+
+?>
+<script type="text/javascript">
+<!--//
+scrollID=0;
+vPos=0;
+
+function onWard() {
+ vPos+=2;
+ window.scroll(0,vPos);
+ vPos%=1000;
+ scrollID=setTimeout("onWard()",30);
+ }
+function stop(){
+ clearTimeout(scrollID);
+}
+//-->
+</script>
+<?php
+/*
+if($css){
+ echo "<link rel=\"stylesheet\" href=\"".$css."\" type=\"text/css\">\n\n";
+}
+*/
+echo "</head>\n";
+echo "<body onLoad=\"if(window.scroll)onWard()\" onmouseover=\"stop()\" onmouseout=\"if(window.scroll)onWard()\">\n";
+echo "<div><table width=\"100%\"><tr><td align=\"center\"><br /><br /><br /><br /><br />";
+if ($modimage = $versioninfo->getInfo('image')) {
+ $modimage_path = '/modules/'.$versioninfo->getInfo('dirname').'/'.$modimage;
+ $modimage_realpath = str_replace("\\", "/", realpath(XOOPS_ROOT_PATH.$modimage_path));
+ if (0 === strpos($modimage_realpath, XOOPS_ROOT_PATH) && is_file($modimage_realpath)) {
+ echo "<img src='".XOOPS_URL.$modimage_path."' border='0' /><br />";
+ }
+}
+if ($modname = $versioninfo->getInfo('name')) {
+ echo "<big><b>".htmlspecialchars($modname)."</b></big>";
+}
+
+$modinfo = array('Version', 'Description', 'Author', 'Credits', 'License');
+foreach ($modinfo as $info) {
+ if ($info_output = $versioninfo->getInfo(strtolower($info))) {
+ echo "<br /><br /><u>$info</u><br />";
+ echo htmlspecialchars($info_output);
+ }
+}
+echo "<br /><br /><br /><br /><br />";
+echo "<br /><br /><br /><br /><br />";
+echo "<a href=\"javascript:window.close();\">Close</a>";
+echo "<br /><br /><br /><br /><br /><br />";
+echo "</td></tr></table></div>";
+echo "</body></html>";
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/version/main.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/version/s_poweredby.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/version/s_poweredby.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/version/xoops_version.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/version/xoops_version.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/version/xoops_version.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,45 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$modversion['name'] = _MD_AM_VRSN;
+$modversion['type'] = "";
+$modversion['version'] = "XOOPS RC4";
+$modversion['description'] = "XOOPS Version";
+$modversion['author'] = "";
+$modversion['credits'] = "The XOOPS Project";
+$modversion['help'] = "";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 1;
+$modversion['image'] = "s_poweredby.gif";
+
+$modversion['hasAdmin'] = 0;
+$modversion['adminpath'] = "";
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin/version/xoops_version.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,134 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (isset($_POST['fct'])) {
+ $fct = trim($_POST['fct']);
+}
+if (isset($_GET['fct'])) {
+ $fct = trim($_GET['fct']);
+}
+$xoopsOption['pagetype'] = "admin";
+include "../../mainfile.php";
+if (!$xoopsUser) {
+ redirect_header(XOOPS_URL."/user.php", 3, _AD_NORIGHT);
+}
+include XOOPS_ROOT_PATH."/include/cp_functions.php";
+
+
+include_once XOOPS_ROOT_PATH."/modules/system/constants.php";
+$error = false;
+if (isset($fct) && $fct != '') {
+ if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php")) {
+
+ if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php")) {
+ include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php";
+ } elseif (file_exists(XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php")) {
+ include XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php";
+ }
+ include XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php";
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ $category = !empty($modversion['category']) ? intval($modversion['category']) : 0;
+ unset($modversion);
+ if ($category > 0) {
+ $groups =& $xoopsUser->getGroups();
+ if (in_array(XOOPS_GROUP_ADMIN, $groups) || false != $sysperm_handler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))){
+ if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php")) {
+ include_once XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php";
+ } else {
+ $error = true;
+ }
+ } else {
+ $error = true;
+ }
+ } elseif ($fct == 'version') {
+ if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/version/main.php")) {
+ include_once XOOPS_ROOT_PATH."/modules/system/admin/version/main.php";
+ } else {
+ $error = true;
+ }
+ } else {
+ $error = true;
+ }
+ } else {
+ $error = true;
+ }
+} else {
+ $error = true;
+}
+
+if (false != $error) {
+ xoops_cp_header();
+ echo "<h4>System Configuration</h4>";
+ echo '<table class="outer" cellpadding="4" cellspacing="1">';
+ echo '<tr>';
+ $groups = $xoopsUser->getGroups();
+ $all_ok = false;
+ if (!in_array(XOOPS_GROUP_ADMIN, $groups)) {
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ $ok_syscats =& $sysperm_handler->getItemIds('system_admin', $groups);
+ } else {
+ $all_ok = true;
+ }
+ $admin_dir = XOOPS_ROOT_PATH."/modules/system/admin";
+ $handle = opendir($admin_dir);
+ $counter = 0;
+ $class = 'even';
+ while ($file = readdir($handle)) {
+ if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir($admin_dir.'/'.$file)) {
+ include $admin_dir.'/'.$file.'/xoops_version.php';
+ if ($modversion['hasAdmin']) {
+ $category = isset($modversion['category']) ? intval($modversion['category']) : 0;
+ if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) {
+ echo "<td class='$class' align='center' valign='bottom' width='19%'>";
+ echo "<a href='".XOOPS_URL."/modules/system/admin.php?fct=".$file."'><b>" .trim($modversion['name'])."</b></a>\n";
+ echo "</td>";
+ $counter++;
+ $class = ($class == 'even') ? 'odd' : 'even';
+ }
+ if ( $counter > 4 ) {
+ $counter = 0;
+ echo "</tr>";
+ echo "<tr>";
+ }
+ }
+ unset($modversion);
+ }
+ }
+ while ($counter < 5) {
+ echo '<td class="'.$class.'"> </td>';
+ $class = ($class == 'even') ? 'odd' : 'even';
+ $counter++;
+ }
+ echo '</tr></table>';
+ xoops_cp_footer();
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/admin.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/blocks/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/blocks/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/blocks/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/blocks/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/blocks/system_blocks.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/blocks/system_blocks.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/blocks/system_blocks.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,568 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+function b_system_custom_show($options) {
+ $myts =& MyTextSanitizer::getInstance();
+ $content = $options[0];
+ $c_type = $options[1];
+ if ( $c_type == 'H' ) {
+ $block['content'] = str_replace('{X_SITEURL}', XOOPS_URL.'/', $content);
+ } elseif ( $c_type == 'P' ) {
+ ob_start();
+ echo eval($myts->stripSlashesGPC($content));
+ $content = ob_get_contents();
+ ob_end_clean();
+ $block['content'] = str_replace('{X_SITEURL}', XOOPS_URL.'/', $content);
+ } elseif ( $c_type == 'S' ) {
+ $block['content'] = str_replace('{X_SITEURL}', XOOPS_URL.'/', $myts->displayTarea($content, 1, 1));
+ } else {
+ $block['content'] = str_replace('{X_SITEURL}', XOOPS_URL.'/', $myts->displayTarea($content, 1, 0));
+ }
+ return $block;
+}
+
+function b_system_custom_edit($options) {
+ $ts =& MyTextSanitizer::getInstance();
+ include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+ $form = new XoopsFormElementTray('', '<br />', 'options');
+ $form->addElement(new XoopsFormDhtmlTextArea(_MB_SYSTEM_CONTENT, 'options[0]', htmlspecialchars($ts->stripSlashesGPC($options[0]), ENT_QUOTES), 15, 60));
+ $type_select = new XoopsFormSelect(_MB_SYSTEM_CONTENTTYPE, 'options[1]', $options[1]);
+ $type_select->addOption('H', _MB_SYSTEM_HTMLBLOCK);
+ $type_select->addOption('P', _MB_SYSTEM_PHPBLOCK);
+ $type_select->addOption('S', _MB_SYSTEM_SMILEYBLOCK);
+ $type_select->addOption('T', _MB_SYSTEM_NOSMILEYBLOCK);
+ $form->addElement($type_select);
+ return $form->render();
+}
+
+function b_system_online_show()
+{
+ global $xoopsUser, $xoopsModule;
+ $online_handler =& xoops_gethandler('online');
+ mt_srand((double)microtime()*1000000);
+ // set gc probabillity to 10% for now..
+ if (mt_rand(1, 100) < 11) {
+ $online_handler->gc(300);
+ }
+ if (is_object($xoopsUser)) {
+ $uid = $xoopsUser->getVar('uid');
+ $uname = $xoopsUser->getVar('uname');
+ } else {
+ $uid = 0;
+ $uname = '';
+ }
+ if (is_object($xoopsModule)) {
+ $online_handler->write($uid, $uname, time(), $xoopsModule->getVar('mid'), $_SERVER['REMOTE_ADDR']);
+ } else {
+ $online_handler->write($uid, $uname, time(), 0, $_SERVER['REMOTE_ADDR']);
+ }
+ $onlines =& $online_handler->getAll();
+ if (false != $onlines) {
+ $total = count($onlines);
+ $block = array();
+ $guests = 0;
+ $members = '';
+ for ($i = 0; $i < $total; $i++) {
+ if ($onlines[$i]['online_uid'] > 0) {
+ $members .= ' <a href="'.XOOPS_URL.'/userinfo.php?uid='.$onlines[$i]['online_uid'].'">'.$onlines[$i]['online_uname'].'</a>,';
+ } else {
+ $guests++;
+ }
+ }
+ $block['online_total'] = sprintf(_ONLINEPHRASE, $total);
+ if (is_object($xoopsModule)) {
+ $mytotal = $online_handler->getCount(new Criteria('online_module', $xoopsModule->getVar('mid')));
+ $block['online_total'] .= ' ('.sprintf(_ONLINEPHRASEX, $mytotal, $xoopsModule->getVar('name')).')';
+ }
+ $block['lang_members'] = _MEMBERS;
+ $block['lang_guests'] = _GUESTS;
+ $block['online_names'] = $members;
+ $block['online_members'] = $total - $guests;
+ $block['online_guests'] = $guests;
+ $block['lang_more'] = _MORE;
+ return $block;
+ } else {
+ return false;
+ }
+}
+
+function b_system_login_show()
+{
+ global $xoopsUser, $xoopsConfig;
+ if (!$xoopsUser) {
+ $block = array();
+ $block['lang_username'] = _USERNAME;
+ $block['unamevalue'] = "";
+ if (isset($_COOKIE[$xoopsConfig['usercookie']])) {
+ $block['unamevalue'] = $_COOKIE[$xoopsConfig['usercookie']];
+ }
+ $block['lang_password'] = _PASSWORD;
+ $block['lang_login'] = _LOGIN;
+ $block['lang_lostpass'] = _MB_SYSTEM_LPASS;
+ $block['lang_registernow'] = _MB_SYSTEM_RNOW;
+ //$block['lang_rememberme'] = _MB_SYSTEM_REMEMBERME;
+ if ($xoopsConfig['use_ssl'] == 1 && $xoopsConfig['sslloginlink'] != '') {
+ $block['sslloginlink'] = "<a href=\"javascript:openWithSelfMain('".$xoopsConfig['sslloginlink']."', 'ssllogin', 300, 200);\">"._MB_SYSTEM_SECURE."</a>";
+ }
+ return $block;
+ }
+ return false;
+}
+
+function b_system_main_show()
+{
+ global $xoopsUser,$xoopsModule;
+ $block = array();
+ $block['lang_home'] = _MB_SYSTEM_HOME;
+ $block['lang_close'] = _CLOSE;
+ $module_handler =& xoops_gethandler('module');
+ $criteria = new CriteriaCompo(new Criteria('hasmain', 1));
+ $criteria->add(new Criteria('isactive', 1));
+ $criteria->add(new Criteria('weight', 0, '>'));
+ $criteria->setSort('weight');
+ $modules =& $module_handler->getObjects($criteria, true);
+ $moduleperm_handler =& xoops_gethandler('groupperm');
+ $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
+ $read_allowed =& $moduleperm_handler->getItemIds('module_read', $groups);
+ foreach (array_keys($modules) as $i) {
+ if (in_array($i, $read_allowed)) {
+ $block['modules'][$i]['name'] = $modules[$i]->getVar('name');
+ $block['modules'][$i]['directory'] = $modules[$i]->getVar('dirname');
+ $sublinks =& $modules[$i]->subLink();
+ if ((count($sublinks) > 0) && (!empty($xoopsModule)) && ($i == $xoopsModule->getVar('mid'))) {
+ foreach($sublinks as $sublink){
+ $block['modules'][$i]['sublinks'][] = array('name' => $sublink['name'], 'url' => XOOPS_URL.'/modules/'.$modules[$i]->getVar('dirname').'/'.$sublink['url']);
+ }
+ } else {
+ $block['modules'][$i]['sublinks'] = array();
+ }
+ }
+ }
+ return $block;
+}
+
+function b_system_search_show()
+{
+ $block = array();
+ $block['lang_search'] = _MB_SYSTEM_SEARCH;
+ $block['lang_advsearch'] = _MB_SYSTEM_ADVS;
+ if (is_object($GLOBALS['xoopsModule'])) {
+ $block['modid'] = $GLOBALS['xoopsModule']->getVar('mid');
+ }
+ return $block;
+}
+
+function b_system_user_show()
+{
+ global $xoopsUser;
+ if (is_object($xoopsUser)) {
+ $block = array();
+ $block['lang_youraccount'] = _MB_SYSTEM_VACNT;
+ $block['lang_editaccount'] = _MB_SYSTEM_EACNT;
+ $block['lang_notifications'] = _MB_SYSTEM_NOTIF;
+ $block['lang_logout'] = _MB_SYSTEM_LOUT;
+ $block['lang_adminmenu'] = _MB_SYSTEM_ADMENU;
+ $block['admin'] = $xoopsUser->isAdmin(0);
+ $pm_module =& $GLOBALS["module_handler"]->getByDirname("pm");
+ if ($pm_module && $pm_module->getVar('isactive')) {
+ $block['lang_inbox'] = _MB_SYSTEM_INBOX;
+ $pm_handler =& xoops_getmodulehandler('privmessage', 'pm');
+ $criteria = new CriteriaCompo(new Criteria('read_msg',0));
+ $criteria->add(new Criteria('to_userid',$xoopsUser->getVar('uid')));
+ $count_pm = $pm_handler->getCount($criteria);
+ if($count_pm>0){
+ $block['lang_inbox'] .= " (<span style=\"color:#ff0000; font-weight: bold;\">".$count_pm."</span>)";
+ }
+ }
+ return $block;
+ }
+ return false;
+}
+
+// this block is deprecated
+function b_system_waiting_show()
+{
+ global $xoopsUser;
+ $xoopsDB =& Database::getInstance();
+ $module_handler =& xoops_gethandler('module');
+ $block = array();
+ if ($module_handler->getCount(new Criteria('dirname', 'news'))) {
+ $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("stories")." WHERE published=0");
+ if ( $result ) {
+ $block['modules'][0]['adminlink'] = XOOPS_URL."/modules/news/admin/index.php?op=newarticle";
+ list($block['modules'][0]['pendingnum']) = $xoopsDB->fetchRow($result);
+ $block['modules'][0]['lang_linkname'] = _MB_SYSTEM_SUBMS;
+ }
+ }
+ if ($module_handler->getCount(new Criteria('dirname', 'mylinks'))) {
+ $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_links")." WHERE status=0");
+ if ( $result ) {
+ $block['modules'][1]['adminlink'] = XOOPS_URL."/modules/mylinks/admin/index.php?op=listNewLinks";
+ list($block['modules'][1]['pendingnum']) = $xoopsDB->fetchRow($result);
+ $block['modules'][1]['lang_linkname'] = _MB_SYSTEM_WLNKS;
+ }
+ $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_broken"));
+ if ( $result ) {
+ $block['modules'][2]['adminlink'] = XOOPS_URL."/modules/mylinks/admin/index.php?op=listBrokenLinks";
+ list($block['modules'][2]['pendingnum']) = $xoopsDB->fetchRow($result);
+ $block['modules'][2]['lang_linkname'] = _MB_SYSTEM_BLNK;
+ }
+ $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_mod"));
+ if ( $result ) {
+ $block['modules'][3]['adminlink'] = XOOPS_URL."/modules/mylinks/admin/index.php?op=listModReq";
+ list($block['modules'][3]['pendingnum']) = $xoopsDB->fetchRow($result);
+ $block['modules'][3]['lang_linkname'] = _MB_SYSTEM_MLNKS;
+ }
+ }
+ if ($module_handler->getCount(new Criteria('dirname', 'mydownloads'))) {
+ $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE status=0");
+ if ( $result ) {
+ $block['modules'][4]['adminlink'] = XOOPS_URL."/modules/mydownloads/admin/index.php?op=listNewDownloads";
+ list($block['modules'][4]['pendingnum']) = $xoopsDB->fetchRow($result);
+ $block['modules'][4]['lang_linkname'] = _MB_SYSTEM_WDLS;
+ }
+ $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_broken")."");
+ if ( $result ) {
+ $block['modules'][5]['adminlink'] = XOOPS_URL."/modules/mydownloads/admin/index.php?op=listBrokenDownloads";
+ list($block['modules'][5]['pendingnum']) = $xoopsDB->fetchRow($result);
+ $block['modules'][5]['lang_linkname'] = _MB_SYSTEM_BFLS;
+ }
+ $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_mod")."");
+ if ( $result ) {
+ $block['modules'][6]['adminlink'] = XOOPS_URL."/modules/mydownloads/admin/index.php?op=listModReq";
+ list($block['modules'][6]['pendingnum']) = $xoopsDB->fetchRow($result);
+ $block['modules'][6]['lang_linkname'] = _MB_SYSTEM_MFLS;
+ }
+ }
+ $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("xoopscomments")." WHERE com_status=1");
+ if ( $result ) {
+ $block['modules'][7]['adminlink'] = XOOPS_URL."/modules/system/admin.php?module=0&status=1&fct=comments";
+ list($block['modules'][7]['pendingnum']) = $xoopsDB->fetchRow($result);
+ $block['modules'][7]['lang_linkname'] =_MB_SYSTEM_COMPEND;
+ }
+ return $block;
+}
+
+function b_system_info_show($options)
+{
+ global $xoopsConfig, $xoopsUser;
+ $xoopsDB =& Database::getInstance();
+ $myts =& MyTextSanitizer::getInstance();
+ $block = array();
+ if (!empty($options[3])) {
+ $block['showgroups'] = true;
+ $result = $xoopsDB->query("SELECT u.uid, u.uname AS name, u.email, p.user_viewemail, u.user_avatar, g.name AS groupname FROM ".$xoopsDB->prefix("groups_users_link")." l LEFT JOIN ".$xoopsDB->prefix("users")." u ON l.uid=u.uid LEFT JOIN ".$xoopsDB->prefix("groups")." g ON l.groupid=g.groupid LEFT JOIN ".$xoopsDB->prefix("user_profile")." p ON u.uid=p.profileid WHERE g.group_type='Admin' ORDER BY l.groupid, u.uid");
+ if ($xoopsDB->getRowsNum($result) > 0) {
+ $prev_caption = "";
+ $i = 0;
+ while ($userinfo = $xoopsDB->fetchArray($result)) {
+ if ($prev_caption != $userinfo['groupname']) {
+ $prev_caption = $userinfo['groupname'];
+ $block['groups'][$i]['name'] = $myts->htmlSpecialChars($userinfo['groupname']);
+ }
+ if ($xoopsUser != '') {
+ $block['groups'][$i]['users'][] = array('id' => $userinfo['uid'], 'name' => $myts->htmlspecialchars($userinfo['name']), 'msglink' => "<a href=\"javascript:openWithSelfMain('".XOOPS_URL."/pmlite.php?send2=1&to_userid=".$userinfo['uid']."','pmlite',450,370);\"><img src=\"".XOOPS_URL."/images/icons/pm_small.gif\" border=\"0\" width=\"27\" height=\"17\" alt=\"\" /></a>", 'avatar' => XOOPS_UPLOAD_URL.'/'.$userinfo['user_avatar']);
+ } else {
+ if ($userinfo['user_viewemail']) {
+ $block['groups'][$i]['users'][] = array('id' => $userinfo['uid'], 'name' => $myts->htmlspecialchars($userinfo['name']), 'msglink' => '<a href="mailto:'.$userinfo['email'].'"><img src="'.XOOPS_URL.'/images/icons/em_small.gif" border="0" width="16" height="14" alt="" /></a>', 'avatar' => XOOPS_UPLOAD_URL.'/'.$userinfo['user_avatar']);
+ } else {
+ $block['groups'][$i]['users'][] = array('id' => $userinfo['uid'], 'name' => $myts->htmlspecialchars($userinfo['name']), 'msglink' => ' ', 'avatar' => XOOPS_UPLOAD_URL.'/'.$userinfo['user_avatar']);
+ }
+ }
+ $i++;
+ }
+ }
+ } else {
+ $block['showgroups'] = false;
+ }
+ $block['logourl'] = XOOPS_URL.'/images/'.$options[2];
+ $block['recommendlink'] = "<a href=\"javascript:openWithSelfMain('".XOOPS_URL."/misc.php?action=showpopups&type=friend&op=sendform&t=".time()."','friend',".$options[0].",".$options[1].")\">"._MB_SYSTEM_RECO."</a>";
+ return $block;
+}
+
+function b_system_newmembers_show($options)
+{
+ $block = array();
+ $criteria = new CriteriaCompo(new Criteria('level', 0, '>'));
+ $limit = (!empty($options[0])) ? $options[0] : 10;
+ $criteria->setOrder('DESC');
+ $criteria->setSort('user_regdate');
+ $criteria->setLimit($limit);
+ $member_handler =& xoops_gethandler('member');
+ $newmembers =& $member_handler->getUsers($criteria);
+ $count = count($newmembers);
+ for ($i = 0; $i < $count; $i++) {
+ if ( $options[1] == 1 ) {
+ $block['users'][$i]['avatar'] = $newmembers[$i]->getVar('user_avatar') != 'blank.gif' ? XOOPS_UPLOAD_URL.'/'.$newmembers[$i]->getVar('user_avatar') : '';
+ } else {
+ $block['users'][$i]['avatar'] = '';
+ }
+ $block['users'][$i]['id'] = $newmembers[$i]->getVar('uid');
+ $block['users'][$i]['name'] = $newmembers[$i]->getVar('uname');
+ $block['users'][$i]['joindate'] = formatTimestamp($newmembers[$i]->getVar('user_regdate'), 's');
+ }
+ return $block;
+}
+
+function b_system_topposters_show($options)
+{
+ $block = array();
+ $criteria = new CriteriaCompo(new Criteria('level', 0, '>'));
+ $limit = (!empty($options[0])) ? $options[0] : 10;
+ $size = count($options);
+ for ( $i = 2; $i < $size; $i++) {
+ $criteria->add(new Criteria('rank', $options[$i], '<>'));
+ }
+ $criteria->setOrder('DESC');
+ $criteria->setSort('posts');
+ $criteria->setLimit($limit);
+ $member_handler =& xoops_gethandler('member');
+ $topposters =& $member_handler->getUsers($criteria);
+ $count = count($topposters);
+ for ($i = 0; $i < $count; $i++) {
+ $block['users'][$i]['rank'] = $i+1;
+ if ( $options[1] == 1 ) {
+ $block['users'][$i]['avatar'] = $topposters[$i]->getVar('user_avatar') != 'blank.gif' ? XOOPS_UPLOAD_URL.'/'.$topposters[$i]->getVar('user_avatar') : '';
+ } else {
+ $block['users'][$i]['avatar'] = '';
+ }
+ $block['users'][$i]['id'] = $topposters[$i]->getVar('uid');
+ $block['users'][$i]['name'] = $topposters[$i]->getVar('uname');
+ $block['users'][$i]['posts'] = $topposters[$i]->getVar('posts');
+ }
+ return $block;
+}
+
+
+function b_system_comments_show($options)
+{
+ $block = array();
+ include_once XOOPS_ROOT_PATH.'/include/comment_constants.php';
+ $comment_handler =& xoops_gethandler('comment');
+ $criteria = new CriteriaCompo(new Criteria('com_status', XOOPS_COMMENT_ACTIVE));
+ $criteria->setLimit(intval($options[0]));
+ $criteria->setSort('com_created');
+ $criteria->setOrder('DESC');
+ $comments =& $comment_handler->getObjects($criteria, true);
+ $member_handler =& xoops_gethandler('member');
+ $module_handler =& xoops_gethandler('module');
+ $modules =& $module_handler->getObjects(new Criteria('hascomments', 1), true);
+ $comment_config = array();
+ foreach (array_keys($comments) as $i) {
+ $mid = $comments[$i]->getVar('com_modid');
+ $com['module'] = '<a href="'.XOOPS_URL.'/modules/'.$modules[$mid]->getVar('dirname').'/">'.$modules[$mid]->getVar('name').'</a>';
+ if (!isset($comment_config[$mid])) {
+ $comment_config[$mid] = $modules[$mid]->getInfo('comments');
+ }
+ $com['id'] = $i;
+ $com['title'] = '<a href="'.XOOPS_URL.'/modules/'.$modules[$mid]->getVar('dirname').'/'.$comment_config[$mid]['pageName'].'?'.$comment_config[$mid]['itemName'].'='.$comments[$i]->getVar('com_itemid').'&com_id='.$i.'&com_rootid='.$comments[$i]->getVar('com_rootid').'&'.$comments[$i]->getVar('com_exparams').'#comment'.$i.'">'.$comments[$i]->getVar('com_title').'</a>';
+ $com['icon'] = htmlspecialchars( $comments[$i]->getVar('com_icon'), ENT_QUOTES );
+ $com['icon'] = ($com['icon'] != '') ? "subject/".$com['icon'] : 'subject/icon1.gif';
+ $com['time'] = formatTimestamp($comments[$i]->getVar('com_created'),'m');
+ if ($comments[$i]->getVar('com_uid') > 0) {
+ $poster =& $member_handler->getUser($comments[$i]->getVar('com_uid'));
+ if (is_object($poster)) {
+ $com['poster'] = '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$comments[$i]->getVar('com_uid').'">'.$poster->getVar('uname').'</a>';
+ } else {
+ $com['poster'] = $GLOBALS['xoopsConfig']['anonymous'];
+ }
+ } else {
+ $com['poster'] = $GLOBALS['xoopsConfig']['anonymous'];
+ }
+ $block['comments'][] =& $com;
+ unset($com);
+ }
+ return $block;
+}
+
+// RMV-NOTIFY
+function b_system_notification_show()
+{
+ global $xoopsConfig, $xoopsUser, $xoopsModule;
+ include_once XOOPS_ROOT_PATH . '/include/notification_functions.php';
+ include_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/notification.php';
+ // Notification must be enabled, and user must be logged in
+ if (empty($xoopsUser) || !notificationEnabled('block')) {
+ return false; // do not display block
+ }
+ $notification_handler =& xoops_gethandler('notification');
+ // Now build the a nested associative array of info to pass
+ // to the block template.
+ $block = array();
+ $categories =& notificationSubscribableCategoryInfo();
+ if (empty($categories)) {
+ return false;
+ }
+ foreach ($categories as $category) {
+ $section['name'] = $category['name'];
+ $section['title'] = $category['title'];
+ $section['description'] = $category['description'];
+ $section['itemid'] = $category['item_id'];
+ $section['events'] = array();
+ $subscribed_events =& $notification_handler->getSubscribedEvents ($category['name'], $category['item_id'], $xoopsModule->getVar('mid'), $xoopsUser->getVar('uid'));
+ foreach (notificationEvents($category['name'], true) as $event) {
+ if (!empty($event['admin_only']) && !$xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
+ continue;
+ }
+ $subscribed = in_array($event['name'], $subscribed_events) ? 1 : 0;
+ $section['events'][$event['name']] = array ('name'=>$event['name'], 'title'=>$event['title'], 'caption'=>$event['caption'], 'description'=>$event['description'], 'subscribed'=>$subscribed);
+ }
+ $block['categories'][$category['name']] = $section;
+ }
+ // Additional form data
+ $block['target_page'] = "notification_update.php";
+ // FIXME: better or more standardized way to do this?
+ $url = parse_url($_SERVER['REQUEST_URI']);
+ $script_url = explode('/', $url['path']);
+ $script_name = $script_url[count($script_url)-1];
+ $block['redirect_script'] = $script_name;
+ $block['submit_button'] = _NOT_UPDATENOW;
+ $block['notification_token'] = $GLOBALS['xoopsSecurity']->createToken();
+ return $block;
+}
+
+function b_system_comments_edit($options)
+{
+ $inputtag = "<input type='text' name='options[]' value='".intval($options[0])."' />";
+ $form = sprintf(_MB_SYSTEM_DISPLAYC, $inputtag);
+ return $form;
+}
+
+function b_system_topposters_edit($options)
+{
+ include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
+ $inputtag = "<input type='text' name='options[]' value='".intval($options[0])."' />";
+ $form = sprintf(_MB_SYSTEM_DISPLAY,$inputtag);
+ $form .= "<br />"._MB_SYSTEM_DISPLAYA." <input type='radio' id='options[]' name='options[]' value='1'";
+ if ( $options[1] == 1 ) {
+ $form .= " checked='checked'";
+ }
+ $form .= " /> "._YES."<input type='radio' id='options[]' name='options[]' value='0'";
+ if ( $options[1] == 0 ) {
+ $form .= " checked='checked'";
+ }
+ $form .= " /> "._NO."";
+ $form .= "<br />"._MB_SYSTEM_NODISPGR."<br /><select id='options[]' name='options[]' multiple='multiple'>";
+ $ranks =& XoopsLists::getUserRankList();
+ $size = count($options);
+ foreach ($ranks as $k => $v) {
+ $sel = "";
+ for ( $i = 2; $i < $size; $i++ ) {
+ if ($k == $options[$i]) {
+ $sel = " selected='selected'";
+ }
+ }
+ $form .= "<option value='$k'$sel>$v</option>";
+ }
+ $form .= "</select>";
+ return $form;
+}
+
+function b_system_newmembers_edit($options)
+{
+ $inputtag = "<input type='text' name='options[]' value='".$options[0]."' />";
+ $form = sprintf(_MB_SYSTEM_DISPLAY,$inputtag);
+ $form .= "<br />"._MB_SYSTEM_DISPLAYA." <input type='radio' id='options[]' name='options[]' value='1'";
+ if ( $options[1] == 1 ) {
+ $form .= " checked='checked'";
+ }
+ $form .= " /> "._YES."<input type='radio' id='options[]' name='options[]' value='0'";
+ if ( $options[1] == 0 ) {
+ $form .= " checked='checked'";
+ }
+ $form .= " /> "._NO."";
+ return $form;
+}
+
+function b_system_info_edit($options)
+{
+ $form = _MB_SYSTEM_PWWIDTH." ";
+ $form .= "<input type='text' name='options[]' value='".$options[0]."' />";
+ $form .= "<br />"._MB_SYSTEM_PWHEIGHT." ";
+ $form .= "<input type='text' name='options[]' value='".$options[1]."' />";
+ $form .= "<br />".sprintf(_MB_SYSTEM_LOGO,XOOPS_URL."/images/")." ";
+ $form .= "<input type='text' name='options[]' value='".$options[2]."' />";
+ $chk = "";
+ $form .= "<br />"._MB_SYSTEM_SADMIN." ";
+ if ( $options[3] == 1 ) {
+ $chk = " checked='checked'";
+ }
+ $form .= "<input type='radio' name='options[3]' value='1'".$chk." /> "._YES."";
+ $chk = "";
+ if ( $options[3] == 0 ) {
+ $chk = " checked=\"checked\"";
+ }
+ $form .= " <input type='radio' name='options[3]' value='0'".$chk." />"._NO."";
+ return $form;
+}
+
+function b_system_themes_show($options)
+{
+ global $xoopsConfig;
+ $theme_options = '';
+ foreach ($xoopsConfig['theme_set_allowed'] as $theme) {
+ $theme_options .= '<option value="'.$theme.'"';
+ if ($theme == $xoopsConfig['theme_set']) {
+ $theme_options .= ' selected="selected"';
+ }
+ $theme_options .= '>'.$theme.'</option>';
+ }
+ $block = array();
+ if ($options[0] == 1) {
+ $block['theme_select'] = "<img vspace=\"2\" id=\"xoops_theme_img\" src=\"".XOOPS_THEME_URL."/".$xoopsConfig['theme_set']."/shot.gif\" alt=\"screenshot\" width=\"".intval($options[1])."\" /><br /><select id=\"xoops_theme_select\" name=\"xoops_theme_select\" onchange=\"showImgSelected('xoops_theme_img', 'xoops_theme_select', 'themes', '/shot.gif', '".XOOPS_URL."');\">".$theme_options."</select><input type=\"submit\" value=\""._GO."\" />";
+ } else {
+ $block['theme_select'] = '<select name="xoops_theme_select" onchange="submit();" size="3">'.$theme_options.'</select>';
+ }
+
+ $block['theme_select'] .= '<br />('.sprintf(_MB_SYSTEM_NUMTHEME, '<b>'.count($xoopsConfig['theme_set_allowed']).'</b>').')<br />';
+ return $block;
+}
+
+function b_system_themes_edit($options)
+{
+
+ $chk = "";
+ $form = _MB_SYSTEM_THSHOW." ";
+ if ( $options[0] == 1 ) {
+ $chk = " checked='checked'";
+ }
+ $form .= "<input type='radio' name='options[0]' value='1'".$chk." /> "._YES;
+ $chk = "";
+ if ( $options[0] == 0 ) {
+ $chk = ' checked="checked"';
+ }
+ $form .= ' <input type="radio" name="options[0]" value="0"'.$chk.' />'._NO;
+ $form .= '<br />'._MB_SYSTEM_THWIDTH.' ';
+ $form .= "<input type='text' name='options[1]' value='".$options[1]."' />";
+ return $form;
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/blocks/system_blocks.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/constants.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/constants.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/constants.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,43 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+define('XOOPS_SYSTEM_GROUP', 1);
+//define('XOOPS_SYSTEM_USER', 2);
+define('XOOPS_SYSTEM_PREF', 3);
+define('XOOPS_SYSTEM_MODULE', 4);
+define('XOOPS_SYSTEM_BLOCK', 5);
+//define('XOOPS_SYSTEM_THEME', 6);
+define('XOOPS_SYSTEM_FINDU', 7);
+define('XOOPS_SYSTEM_MAILU', 8);
+define('XOOPS_SYSTEM_IMAGE', 9);
+define('XOOPS_SYSTEM_AVATAR', 10);
+define('XOOPS_SYSTEM_URANK', 11);
+define('XOOPS_SYSTEM_SMILE', 12);
+define('XOOPS_SYSTEM_BANNER', 13);
+define('XOOPS_SYSTEM_COMMENT', 14);
+define('XOOPS_SYSTEM_TPLSET', 15);
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/constants.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/bg_content.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/bg_content.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/bg_menu.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/bg_menu.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/check.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/check.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/hbar_left.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/hbar_left.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/hbar_middle.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/hbar_middle.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/hbar_right.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/hbar_right.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/info.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/info.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/install.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/install.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/logo.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/logo.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/lookup.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/lookup.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/menu.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/menu.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/powered_by_xoops.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/powered_by_xoops.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/system_slogo.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/system_slogo.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/uninstall.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/uninstall.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/update.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/update.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/xoops2.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/images/xoops2.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/include/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/include/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/include/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/include/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/include/update.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/include/update.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/include/update.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,364 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+function xoops_module_update_system(&$module) {
+ $oldversion = $module->getVar('version');
+ /* @var $module XoopsModule */
+ $config_handler =& xoops_gethandler('config');
+ /* @var $config_handler XoopsConfigHandler */
+ global $xoopsDB;
+ if ($oldversion < 201) {
+ $criteria = new Criteria('conf_name', 'debug_mode');
+
+ $config =& $config_handler->getConfigs($criteria);
+ $value = array($config[0]->getConfValueForOutput());
+ $config[0]->setVar('conf_formtype', 'select_multi');
+ $config[0]->setVar('conf_valuetype', 'array');
+ $config[0]->setConfValueForInput($value);
+ if (!$config_handler->insertConfig($config[0])) {
+ $module->setMessage("Could not insert debug mode config");
+ }
+ unset($config);
+ }
+ if ($oldversion < 202) {
+ $sql = "ALTER TABLE ".$GLOBALS['xoopsDB']->prefix('config')." CHANGE `conf_id` `conf_id` MEDIUMINT( 8 ) UNSIGNED NOT NULL AUTO_INCREMENT";
+ if (!$GLOBALS['xoopsDB']->query($sql)) {
+ $module->setMessage("Could not modify config table");
+ }
+ }
+
+ if ($oldversion < 203) {
+
+ $profile_handler =& xoops_gethandler('profile');
+ $user_handler =& xoops_gethandler('user');
+ $sql = "INSERT INTO ".$profile_handler->table."
+ (profileid, user_icq, user_from, user_sig, user_viewemail, user_aim, user_yim, user_msnm, user_occ, url, bio, user_intrest, umode, uorder, notify_method, notify_mode, user_regdate, posts, attachsig, timezone_offset, user_mailok, theme, actkey, last_login)
+ SELECT uid, user_icq, user_from, user_sig, user_viewemail, user_aim, user_yim, user_msnm, user_occ, url, bio, user_intrest, umode, uorder, notify_method, notify_mode, user_regdate, posts, attachsig, timezone_offset, user_mailok, theme, actkey, last_login FROM ".$user_handler->table;
+ if (!$xoopsDB->query($sql)) {
+ $module->setMessage($xoopsDB->error());
+ $module->setMessage($sql);
+ }
+ else {
+ $sql = "ALTER TABLE ".$user_handler->table."
+ DROP `user_icq`,
+ DROP `user_from`,
+ DROP `user_sig`,
+ DROP `user_viewemail`,
+ DROP `user_aim`,
+ DROP `user_yim`,
+ DROP `user_msnm`,
+ DROP `user_occ`,
+ DROP `url`,
+ DROP `bio`,
+ DROP `user_intrest`,
+ DROP `umode`,
+ DROP `uorder`,
+ DROP `notify_method`,
+ DROP `notify_mode`,
+ DROP `user_regdate`,
+ DROP `posts`,
+ DROP `attachsig`,
+ DROP `timezone_offset`,
+ DROP `user_mailok`,
+ DROP `theme`,
+ DROP `actkey`,
+ DROP `last_login`";
+ if (!$xoopsDB->query($sql)) {
+ $module->setMessage($xoopsDB->error());
+ }
+ }
+ $sql = "ALTER TABLE ".$xoopsDB->prefix("block_module_link")." DROP INDEX `block_id` ";
+ if (!$xoopsDB->query($sql)) {
+ $module->setMessage($xoopsDB->error());
+ }
+ $sql = "ALTER TABLE ".$xoopsDB->prefix("block_module_link")." DROP INDEX `module_id` ";
+ if (!$xoopsDB->query($sql)) {
+ $module->setMessage($xoopsDB->error());
+ }
+ }
+ if ($oldversion < 209) {
+ $sql = "ALTER TABLE ".$xoopsDB->prefix("block_module_link")." DROP PRIMARY KEY ";
+ if (!$xoopsDB->query($sql)) {
+ $module->setMessage($xoopsDB->error());
+ }
+ $sql = "ALTER TABLE ".$xoopsDB->prefix("block_module_link")." ADD pageid smallint(5) NOT NULL ";
+ if (!$xoopsDB->query($sql)) {
+ $module->setMessage($xoopsDB->error());
+ }
+ $sql = "ALTER TABLE ".$xoopsDB->prefix("block_module_link")." ADD PRIMARY KEY ( `block_id` , `module_id` , `pageid` )";
+ if (!$xoopsDB->query($sql)) {
+ $module->setMessage($xoopsDB->error());
+ }
+ }
+
+ if ($oldversion < 210) {
+ $sql = "ALTER TABLE ".$xoopsDB->prefix("users")." CHANGE `level` `level` TINYINT( 3 ) NOT NULL";
+ if (!$xoopsDB->query($sql)) {
+ $module->setMessage($xoopsDB->error());
+ }
+ }
+ if ($oldversion < 211) {
+ $sql = "ALTER TABLE ".$xoopsDB->prefix("config")." CHANGE `conf_desc` `conf_desc` VARCHAR( 50 ) NOT NULL";
+ if (!$xoopsDB->query($sql)) {
+ $module->setMessage($xoopsDB->error());
+ }
+ }
+ if ($oldversion < 212) {
+ $result=$xoopsDB->queryF("SHOW COLUMNS FROM ".$xoopsDB->prefix("users")." LIKE 'loginname'");
+ if ($xoopsDB->getRowsNum($result) == 0) {
+ $sql = "ALTER TABLE ".$xoopsDB->prefix("users")." ADD `loginname` varchar(25) NOT NULL DEFAULT '' AFTER `uname`";
+ if (!$xoopsDB->query($sql)) {
+ $module->setMessage($xoopsDB->error());
+ }else{
+ $module->setMessage("loginname field added");
+ }
+ $sql = "ALTER TABLE ".$xoopsDB->prefix("users")." CHANGE `uname` `uname` varchar(55) NOT NULL DEFAULT ''";
+ if (!$xoopsDB->query($sql)) {
+ $module->setMessage($xoopsDB->error());
+ }else{
+ $module->setMessage("uname field updated");
+ }
+ $sql = "UPDATE ".$xoopsDB->prefix('users')." SET loginname=uname WHERE loginname=''";
+ if (!$xoopsDB->query($sql)) {
+ $module->setMessage($xoopsDB->error());
+ }else{
+ $module->setMessage("loginname data updated");
+ }
+ }
+ }
+ // Remove blocks and templates with invalid module ID references - should this always be run or just once?
+ // We'll do it on every System update now - just in case.
+ $module_handler =& xoops_gethandler('module');
+ $sql = "SELECT mid, dirname FROM ".$module_handler->table;
+ if ($result = $xoopsDB->query($sql)) {
+ $available_mids = array();
+ while (list($mid, $dirname) = $xoopsDB->fetchRow($result)) {
+ $available_mids[] = $mid;
+ $available_dirnames[] = $dirname;
+ }
+ if (count($available_mids) > 0) {
+ $block_handler =& xoops_gethandler('block');
+ $blocks_with_invalid_mid = $block_handler->getObjects(new Criteria('mid NOT', "(".implode(',', $available_mids).")", "IN"));
+ if (count($blocks_with_invalid_mid) > 0) {
+ foreach (array_keys($blocks_with_invalid_mid) as $i) {
+ if (!$block_handler->delete($blocks_with_invalid_mid[$i])) {
+ $module->setMessage("Could not delete ".$blocks_with_invalid_mid[$i]->getVar('name'));
+ }
+ else {
+ $module->setMessage($blocks_with_invalid_mid[$i]->getVar('name'). " Deleted");
+ }
+ }
+ }
+ $tplfile_handler =& xoops_gethandler('tplfile');
+ $tplfiles_with_invalid_mid = $tplfile_handler->getObjects(new Criteria('tpl_module NOT', "(".implode(',', array_map(array($xoopsDB, "quoteString"), $available_dirnames)).")", "IN"));
+ if (count($tplfiles_with_invalid_mid) > 0) {
+ foreach (array_keys($tplfiles_with_invalid_mid) as $i) {
+ if (!$tplfile_handler->delete($tplfiles_with_invalid_mid[$i])) {
+ $module->setMessage("Could not delete ".$tplfiles_with_invalid_mid[$i]->getVar('tpl_file'));
+ }
+ else {
+ $module->setMessage($tplfiles_with_invalid_mid[$i]->getVar('tpl_file'). " Deleted");
+ }
+ }
+ }
+ }
+ }
+ return true;
+}
+
+function xoops_module_pre_update_system(&$module) {
+
+ $oldversion = $module->getVar('version');
+ if ($oldversion < 206) {
+ $sql = "ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("session")." CHANGE sess_data sess_data MEDIUMBLOB NOT NULL";
+ if (!$GLOBALS['xoopsDB']->query($sql)) {
+ $module->setMessage('Could not update session data field in session table');
+ }
+ $sql = "ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("configcategory")." ADD `confcat_nameid` VARCHAR( 50 ) NOT NULL";
+ if (!$GLOBALS['xoopsDB']->query($sql)) {
+ $module->setMessage('Could not add nameid field in configcategory table');
+ }
+ $sql = "ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("configcategory")." ADD `confcat_description` VARCHAR( 255 ) NOT NULL";
+ if (!$GLOBALS['xoopsDB']->query($sql)) {
+ $module->setMessage('Could not add description field in configcategory table');
+ }
+ $sql = "ALTER TABLE ".$GLOBALS['xoopsDB']->prefix("configcategory")." ADD `confcat_modid` smallint( 5 ) NOT NULL";
+ if (!$GLOBALS['xoopsDB']->query($sql)) {
+ $module->setMessage('Could not add module id field in configcategory table');
+ }
+ }
+ if ($oldversion < 208) {
+ $configcat_handler =& xoops_gethandler('configcategory');
+ $sql = "ALTER TABLE ".$configcat_handler->table." CHANGE `confcat_id` `confcat_id` SMALLINT( 5 ) UNSIGNED NOT NULL";
+ if (!$GLOBALS['xoopsDB']->query($sql)) {
+ $module->setMessage('Could not change confcat_id properties');
+ }
+ $sql = "ALTER TABLE ".$configcat_handler->table." DROP PRIMARY KEY";
+ if (!$GLOBALS['xoopsDB']->query($sql)) {
+ $module->setMessage('Could not drop confcat primary key');
+ }
+ $sql = "ALTER TABLE ".$configcat_handler->table." ADD PRIMARY KEY ( `confcat_id` , `confcat_modid` )";
+ if (!$GLOBALS['xoopsDB']->query($sql)) {
+ $module->setMessage('Could not add new primary key');
+ }
+ }
+ if ($oldversion < 203) {
+ global $xoopsDB;
+ //add profile tables by running upgrade.sql
+ $xoopsDB->queryFromFile(XOOPS_ROOT_PATH."/modules/system/sql/upgrade.sql");
+
+ //make sure that the profilefields.tmp cache file is NOT there
+ $profile_handler =& xoops_gethandler('profile');
+ $profile_handler->updateCache();
+
+ //insert profile module
+ $module_handler =& xoops_gethandler('module');
+ $profile_module =& $module_handler->create();
+ $profile_module->setVar('dirname', 'profile');
+ echo $profile_module->install(array(XOOPS_GROUP_ADMIN), array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS));
+ }
+ if ($oldversion < 205) {
+ //create block instance table
+ $GLOBALS['xoopsDB']->queryFromFile(XOOPS_ROOT_PATH."/modules/system/sql/upgrade205.sql");
+ //Upgrade block options to serialized array
+ $instance_handler =& xoops_gethandler('blockinstance');
+ $block_handler =& xoops_gethandler('block');
+
+ //Need to use a direct query because we need to access outdated columns
+ $sql = "SELECT * FROM ".$block_handler->table;
+ $result = $GLOBALS['xoopsDB']->query($sql);
+
+ while ($row = $GLOBALS['xoopsDB']->fetchArray($result)) {
+ $block =& $block_handler->create(false);
+ //Create block instance
+ $instance =& $instance_handler->create();
+ //Set block id value for the block object
+ $block->setVar('bid', $row['bid']);
+ if ($row["block_type"] != "C" ) {
+ $block->setVar('options', explode('|', $row['options']));
+ $block->setVar('name', $row['name']);
+ $block->setVar('mid', $row['mid']);
+ $block->setVar('func_file', $row['func_file']);
+ $block->setVar('show_func', $row['show_func']);
+ $block->setVar('edit_func', $row['edit_func']);
+ $block->setVar('template', $row['template']);
+ $block->setVar('dirname', $row['dirname']);
+ $block->setVar('isactive', $row['isactive']);
+ $block->setVar('last_modified', time());
+ //Set instance's block id
+ $instance->setVar('bid', $block->getVar('bid'));
+ }
+ else {
+ if (!isset($customblockid)) {
+ $customblockid = $row['bid'];
+ }
+ //Set instance's block id to the custom block's id
+ $instance->setVar('bid', $customblockid);
+
+ $block->setVar('options', array(0 => addslashes($row['content']), 1 => $row['c_type']));
+ $block->setVar('name', _MI_SYSTEM_BNAME14);
+ $block->setVar('mid', $module->getVar('mid'));
+ $block->setVar('func_file', 'system_blocks.php');
+ $block->setVar('show_func', 'b_system_custom_show');
+ $block->setVar('edit_func', 'b_system_custom_edit');
+ $block->setVar('template', 'system_block_dummy.html');
+ $block->setVar('dirname', 'system');
+ $block->setVar('isactive', 1);
+ $block->setVar('last_modified', time());
+ }
+ $block_handler->insert($block);
+
+ $instance->setVar('instanceid', $block->getVar('bid')); //to keep group permissions
+ $instance->setVar('options', $block->getVar('options'));
+ $instance->setVar('title', $row['title']);
+
+ $side = $row['visible'] ? $row['side'] : 0;
+ $instance->setVar('side', $side);
+ $instance->setVar('weight', $row['weight']);
+ $instance->setVar('visible', $row['visible']);
+ $instance->setVar('bcachetime', $row['bcachetime']);
+ $instance_handler->insert($instance);
+ unset($instance);
+ unset($block);
+ }
+
+ //Remove custom block types that are no longer used
+ $criteria = new CriteriaCompo(new Criteria('block_type', "C"));
+ if (isset($customblockid)) {
+ $criteria->add(new Criteria("bid", $customblockid, "!="));
+ }
+ $block_handler->deleteAll($criteria);
+ unset($criteria);
+
+ //Remove duplicate blocks
+ $sql = "SELECT b.bid AS newid, b2.bid AS oldid FROM ".$block_handler->table." b, ".$block_handler->table." b2
+ WHERE b.show_func = b2.show_func AND b.edit_func = b2.edit_func AND b.bid != b2.bid";
+ $result = $GLOBALS['xoopsDB']->query($sql);
+ $ids = array();
+ while ($row = $GLOBALS['xoopsDB']->fetchArray($result)) {
+ if (!isset($ids[$row['oldid']])) { //if "old id" is not set as the new joint id
+ $ids[$row['newid']][] = $row['oldid'];
+ }
+ }
+
+ if (count($ids) > 0) {
+ foreach ($ids as $newid => $oldids) {
+ $criteria = new Criteria('bid', "(".implode(',', $oldids).")", 'IN');
+ $instance_handler->updateAll('bid', $newid, $criteria); //set bid for instances to the new joint id
+ $block_handler->deleteAll($criteria); //remove old blocks
+ unset($criteria);
+ }
+ }
+
+ //Remove unneeded columns from newblocks table
+ $GLOBALS['xoopsDB']->query("ALTER TABLE ".$block_handler->table." DROP INDEX `isactive_visible_mid` ");
+ $GLOBALS['xoopsDB']->query("ALTER TABLE ".$block_handler->table." DROP INDEX `visible` ");
+ $GLOBALS['xoopsDB']->query("ALTER TABLE ".$block_handler->table." DROP INDEX `mid_funcnum` ");
+ $sql = "ALTER TABLE ".$block_handler->table."
+ DROP `func_num`,
+ DROP `title`,
+ DROP `content`,
+ DROP `side`,
+ DROP `weight`,
+ DROP `visible`,
+ DROP `block_type`,
+ DROP `c_type`,
+ DROP `bcachetime`";
+ $GLOBALS['xoopsDB']->query($sql);
+ $GLOBALS['xoopsDB']->query("ALTER TABLE ".$block_handler->table." ADD INDEX `active` (`bid`, `isactive`) ");
+ }
+
+ if ($oldversion < 207) {
+ $configcat_handler =& xoops_gethandler('configcategory');
+ $GLOBALS['xoopsDB']->query("UPDATE ".$configcat_handler->table." SET confcat_modid=1 WHERE confcat_modid=0 ");
+ $userconfigcategory =& $configcat_handler->get(array(2, 1));
+ if (!$configcat_handler->delete($userconfigcategory)) {
+ $module->setMessage("Could not delete user configuration category");
+ }
+ }
+ return true;
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/include/update.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/include/userselect.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/include/userselect.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/include/userselect.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,197 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+// Where to locate the file? Member search should be restricted
+// Limitation: Only work with javascript enabled
+
+include("../../../include/cp_header.php");
+include_once(XOOPS_ROOT_PATH . "/class/xoopsformloader.php");
+include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
+xoops_cp_header();
+
+$start = (isset($_GET['start']))?$_GET['start']:0;
+$_REQUEST['group'] = empty($_REQUEST['group'])?0:$_REQUEST['group'];
+$_REQUEST['rank'] = empty($_REQUEST['rank'])?0:$_REQUEST['rank'];
+$_REQUEST['searchText'] = isset($_REQUEST['searchText'])?trim($_REQUEST['searchText']):"";
+$limit = 200;
+$size = isset($_REQUEST['multiple']) && $_REQUEST['multiple'] ? 20 : 1;
+$valid_subjects = array("uname"=>_MA_SEARCH_NAME, "email"=>_MA_SEARCH_EMAIL, "uid"=> _MA_SEARCH_UID);
+
+$name_parent = $_REQUEST["target"];
+$name_current = 'users';
+echo $js_adduser='
+ <script type="text/javascript">
+ var multiple='.intval($_REQUEST['multiple']).';
+ function addusers(){
+ var sel_current = xoopsGetElementById("'.$name_current.'");
+ var sel_str="";
+ var num = 0;
+ for (var i = 0; i < sel_current.options.length; i++) {
+ if (sel_current.options[i].selected) {
+ var len=sel_current.options[i].text.length+sel_current.options[i].value.length;
+ sel_str +=len+":"+sel_current.options[i].value+":"+sel_current.options[i].text;
+ num ++;
+ }
+ }
+ if(num==0) {
+ if(multiple==0){
+ window.close();
+ }
+ return false;
+ }
+ sel_str = num+":"+sel_str;
+ window.opener.addusers(sel_str);
+ if(multiple==0){
+ window.close();
+ window.opener.focus();
+ }
+ return true;
+ }
+ </script>
+';
+
+$member_handler = &xoops_gethandler('member');
+if(!empty($_REQUEST["action"])){
+ $rank_handler = xoops_gethandler('rank');
+ $ranks =& $rank_handler->getList();
+ $groups =& $member_handler->getGroupList();
+ $ranks[0] = _NONE;
+ $groups[0] = _NONE;
+}
+
+if(empty($_REQUEST["action"])){
+ $form_sel = new XoopsThemeForm(_MA_LOOKUP_USER, "selectusers", xoops_getenv('PHP_SELF'));
+
+ $sel_box = new XoopsFormSelect(_MA_SEARCHBY, 'subject', empty($_REQUEST['subject'])?NULL:$_REQUEST['subject']);
+ $sel_box->addOptionArray($valid_subjects);
+ $form_sel->addElement($sel_box);
+
+ $searchtext = new XoopsFormText(_MA_SEARCH_TEXT, 'searchText', 60, 255, empty($_REQUEST['searchText'])?NULL:$_REQUEST['searchText']);
+ $searchtext->setDescription(_MA_SEARCH_TEXT_DESC);
+ $form_sel->addElement($searchtext);
+
+ $close_button = new XoopsFormButton('', '', _CLOSE, 'button');
+ $close_button->setExtra('onclick="window.close()"') ;
+
+ $button_tray = new XoopsFormElementTray("");
+ $button_tray->addElement(new XoopsFormButton('', 'search', _SEARCH, 'submit'));
+ $button_tray->addElement($close_button);
+
+ $form_sel->addElement(new XoopsFormHidden('action', $_REQUEST["action"]));
+ $form_sel->addElement(new XoopsFormHidden('target', $_REQUEST["target"]));
+ $form_sel->addElement(new XoopsFormHidden('multiple', $_REQUEST["multiple"]));
+ $form_sel->addElement($button_tray);
+ $form_sel->display();
+
+}
+
+if(!empty($_REQUEST["action"])||!empty($_REQUEST["search"])){
+ $form_user = new XoopsThemeForm(_MA_SEARCH_SELECTUSER, "selectusers", xoops_getenv('PHP_SELF'));
+
+ $myts =& MyTextSanitizer::getInstance();
+ $criteria = new CriteriaCompo();
+
+ if(!empty($_REQUEST['search'])){
+ $text = empty($_REQUEST['searchText'])?"%":$myts->addSlashes(trim($_REQUEST['searchText']));
+ $subject = in_array($_REQUEST['subject'], array_keys($valid_subjects))?trim($_REQUEST['subject']):"uname";
+ $crit = new Criteria($subject, $text, 'LIKE');
+ $criteria->add($crit);
+ $sort = $subject;
+ $nav_extra =
+ "action=".$_REQUEST["action"]."&target=".$_REQUEST["target"]."&multiple=".$_REQUEST["multiple"].
+ "&searchText=".$_REQUEST['searchText']."&search=1&subject=".$_REQUEST['subject'];
+ }else{
+ $crit = null;
+ $sort = "uname";
+ $nav_extra =
+ "action=".$_REQUEST["action"]."&target=".$_REQUEST["target"]."&multiple=".$_REQUEST["multiple"].
+ "&group=".$_REQUEST['group']."&rank=".$_REQUEST['rank'];
+ if(!empty($_REQUEST["group"])){
+ $uids = $member_handler->getUsersByGroup(intval($_REQUEST["group"]), false, $limit, $start);
+ $id_in = "(".implode(",", $uids).")";
+ $crit = new Criteria("uid", $id_in, "IN");
+ $criteria->add($crit);
+ $usercount = $member_handler->getUserCountByGroup(intval($_REQUEST["group"]));
+ }elseif(!empty($_REQUEST["rank"])){
+ $crit = new Criteria("rank", intval($_REQUEST["rank"]));
+ $criteria->add($crit);
+ }
+ }
+
+ $criteria->setSort($sort);
+ $criteria->setLimit($limit);
+ $criteria->setStart($start);
+ $select_form = new XoopsFormSelect("", "users", array(), $size, $_REQUEST["multiple"]);
+ $select_form->addOptionArray($member_handler->getUserList($criteria));
+
+ $user_select_tray = new XoopsFormElementTray(_MA_SEARCH_USERLIST, "<br />");
+ $user_select_tray->addElement($select_form);
+ $usercount = isset($usercount)? $usercount : $member_handler->getUserCount($crit);
+ $nav = new XoopsPageNav($usercount, $limit, $start, "start", $nav_extra);
+ $user_select_nav = new XoopsFormLabel(sprintf(_MA_SEARCH_COUNT, $usercount), $nav->renderNav(4));
+ $user_select_tray->addElement($user_select_nav);
+
+ $add_button = new XoopsFormButton('', '', _ADD, 'button');
+ $add_button->setExtra('onclick="addusers();"') ;
+
+ $close_button = new XoopsFormButton('', '', _CLOSE, 'button');
+ $close_button->setExtra('onclick="window.close()"') ;
+
+ $button_tray = new XoopsFormElementTray("");
+ $button_tray->addElement($add_button);
+ $button_tray->addElement(new XoopsFormButton('', '', _CANCEL, 'reset'));
+ $button_tray->addElement($close_button);
+
+ $form_user->addElement($user_select_tray);
+
+ if(!empty($_REQUEST["action"])){
+ $group_select = new XoopsFormSelect(_MA_SEARCH_GROUP, 'group', $_REQUEST['group']);
+ $group_select->addOptionArray($groups);
+ $rank_select = new XoopsFormSelect(_MA_SEARCH_RANK, 'rank', $_REQUEST['rank']);
+ $rank_select->addOptionArray($ranks);
+ $rank_select->setDescription(_MA_SEARCH_RANK_DESC);
+ $form_user->addElement($group_select);
+ $form_user->addElement($rank_select);
+
+ $refresh_button = new XoopsFormButton('', '', _MA_SEARCH_REFRESH, 'submit');
+ $button_tray->addElement($refresh_button);
+ }
+
+ $form_user->addElement(new XoopsFormHidden('action', $_REQUEST["action"]));
+ $form_user->addElement(new XoopsFormHidden('target', $_REQUEST["target"]));
+ $form_user->addElement(new XoopsFormHidden('multiple', $_REQUEST["multiple"]));
+ $form_user->addElement($button_tray);
+ $form_user->display();
+}
+
+$xoopsOption['output_type'] = "plain";
+xoops_cp_footer();
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/include/userselect.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/avatars.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/avatars.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/avatars.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,12 @@
+<?php
+// $Id
+//%%%%%% Avatar Manager %%%%%
+define('_MD_AVATARMAN','Avatar Manager');
+
+define('_MD_SYSAVATARS','System Avatars');
+define('_MD_CSTAVATARS','Custom Avatars');
+define('_MD_ADDAVT','Add Avatar');
+define('_MD_USERS','Users using this avatar');
+define('_MD_RUDELIMG','Are you sure that you want to delete this avatar image?');
+define('_MD_FAILDEL', 'Failed deleting avatar %s from the database');
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/avatars.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/banners.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/banners.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/banners.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,56 @@
+<?php
+// $Id$
+//%%%%%% Admin Module Name Banners %%%%%
+define("_AM_CURACTBNR","Current Active Banners");
+define("_AM_BANNERID","Banner ID");
+define("_AM_IMPRESION","Impressions");
+define("_AM_IMPLEFT","Imp. Left");
+define("_AM_CLICKS","Clicks");
+define("_AM_NCLICKS","% Clicks");
+define("_AM_CLINAME","Client Name");
+define("_AM_FUNCTION","Functions");
+define("_AM_UNLIMIT","Unlimited");
+define("_AM_EDIT","Edit");
+define("_AM_DELETE","Delete");
+define("_AM_FINISHBNR","Finished Banners");
+define("_AM_IMPD","Imp.");
+define("_AM_STARTDATE","Date Started");
+define("_AM_ENDDATE","Date Ended");
+define("_AM_ADVCLI","Advertising Clients");
+define("_AM_ACTIVEBNR","Active Banners");
+define("_AM_CONTNAME","Contact Name");
+define("_AM_CONTMAIL","Contact Email");
+define("_AM_CLINAMET","Client Name:");
+define("_AM_ADDNWBNR","Add a New Banner");
+define("_AM_IMPPURCHT","Impressions Purchased:");
+define("_AM_IMGURLT","Image URL:");
+define("_AM_CLICKURLT","Click URL:");
+define("_AM_ADDBNR","Add Banner");
+define("_AM_ADDNWCLI","Add a New Client");
+define("_AM_CONTNAMET","Contact Name:");
+define("_AM_CONTMAILT","Contact Email:");
+define("_AM_CLILOGINT","Client Login:");
+define("_AM_CLIPASST","Client Password:");
+define("_AM_ADDCLI","Add Client");
+define("_AM_DELEBNR","Delete Banner");
+define("_AM_SUREDELE","Are you sure you want to delete this Banner?");
+define("_AM_NO","No");
+define("_AM_YES","Yes");
+define("_AM_EDITBNR","Edit Banner");
+define("_AM_ADDIMPT","Add More Impressions:");
+define("_AM_PURCHT","Purchased:");
+define("_AM_MADET","Made:");
+define("_AM_CHGBNR","Change Banner");
+define("_AM_DELEADC","Delete Advertising Client");
+define("_AM_SUREDELCLI","You are about to delete client <b>%s</b> and all its Banners!!!");
+define("_AM_NOBNRRUN","This client doesn't have any banner running now.");
+define("_AM_WARNING","WARNING!!!");
+define("_AM_ACTBNRRUN","This client has the following ACTIVE BANNERS running on our site:");
+define("_AM_SUREDELBNR","Are you sure you want to delete this Client and ALL its Banners?");
+define("_AM_EDITADVCLI","Edit Advertising Client");
+define("_AM_EXTINFO","Extra Info:");
+define("_AM_CHGCLI","Change Client");
+define("_AM_USEHTML","Use Html?");
+define("_AM_CODEHTML","Code Html:");
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/banners.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/blocksadmin.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/blocksadmin.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/blocksadmin.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,64 @@
+<?php
+// $Id$
+
+//%%%%%% blocks.php %%%%%
+define("_AM_BADMIN","Blocks Administration");
+define("_AM_ADDBLOCK","Add a new block");
+define("_AM_LISTBLOCK","List all blocks");
+define("_AM_SIDE","Side");
+define("_AM_BLKDESC","Block Description");
+define("_AM_TITLE","Title");
+define("_AM_WEIGHT","Weight");
+define("_AM_ACTION","Action");
+define("_AM_BLKTYPE","Block Type");
+define("_AM_LEFT","Left");
+define("_AM_RIGHT","Right");
+define("_AM_CENTER","Center");
+define("_AM_VISIBLE","Visible");
+define("_AM_POSCONTT","Position of the additional content");
+define("_AM_ABOVEORG","Above the original content");
+define("_AM_AFTERORG","After the original content");
+define("_AM_EDIT","Edit");
+define("_AM_DELETE","Delete");
+define("_AM_SBLEFT","Side Block - Left");
+define("_AM_SBRIGHT","Side Block - Right");
+define("_AM_CBLEFT","Center Block - Left");
+define("_AM_CBRIGHT","Center Block - Right");
+define("_AM_CBCENTER","Center Block - Center");
+define("_AM_OPTIONS","Options");
+define("_AM_CONTENT", "Content");
+define("_AM_SUBMIT","Submit");
+define("_AM_DISPRIGHT","Display only rightblocks");
+define("_AM_SAVECHANGES","Save Changes");
+define("_AM_EDITBLOCK","Edit a block");
+define("_AM_SYSTEMCANT","System blocks cannot be deleted!");
+define("_AM_MODULECANT","This block cannot be deleted directly! If you wish to disable this block, deactivate the module.");
+define("_AM_RUSUREDEL","Are you sure you want to delete block <b>%s</b>?");
+define("_AM_NAME","Name");
+define("_AM_USEFULTAGS","Useful Tags:");
+define("_AM_BLOCKTAG1","%s will print %s");
+define('_AM_SVISIBLEIN', 'Show blocks visible in %s');
+define('_AM_TOPPAGE', 'Top Page');
+define('_AM_VISIBLEIN', 'Visible in');
+define('_AM_ALLPAGES', 'All Frontside Pages');
+define('_AM_TOPONLY', 'Top Page Only');
+define('_AM_ADVANCED', 'Advanced Settings');
+define('_AM_BCACHETIME', 'Cache lifetime');
+define('_AM_BALIAS', 'Alias name');
+define('_AM_CLONE', 'Clone'); // clone a block
+define('_AM_CLONEBLK', 'Clone'); // cloned block
+define('_AM_CLONEBLOCK', 'Create a clone block');
+define('_AM_NOTSELNG', "'%s' is not selected!"); // error message
+define('_AM_EDITTPL', 'Edit Template');
+define('_AM_MODULE', 'Module');
+define('_AM_GROUP', 'Group');
+define('_AM_UNASSIGNED', 'Unassigned');
+define('_AM_ADMINBLOCK', 'Admin Frontpage');
+define("_AM_NOTVISIBLE", "Not Visible");
+define("_AM_VISIBLETOGROUPS", "Visible to groups");
+
+define("_AM_ERRORDURINGSAVE", "Error during saves, please enable PHP and MySQL Debug and try again");
+
+define("_AM_ALLMODULEPAGES", "All module pages");
+define("_AM_SYSTEMLEVEL", "System Level");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/blocksadmin.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/comments.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/comments.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/comments.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,11 @@
+<?php
+// $Id$
+//%%%%%% Comment Manager %%%%%
+define('_MD_AM_COMMMAN','Comment Manager');
+
+define('_MD_AM_LISTCOMM','List Comments');
+define('_MD_AM_ALLMODS','All modules');
+define('_MD_AM_ALLSTATUS','Any status');
+define('_MD_AM_MODULE','Module');
+define('_MD_AM_COMFOUND','%s comment(s) found.');
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/comments.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/findusers.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/findusers.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/findusers.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,51 @@
+<?php
+// $Id$
+//%%%%%% File Name findusers.php %%%%%
+
+define("_AM_FINDUS","Find Users");
+define("_AM_AVATAR","Avatar");
+define("_AM_REALNAME","Displayname");
+define("_AM_REGDATE","Joined Date");
+define("_AM_EMAIL","Email");
+define("_AM_PM","PM");
+define("_AM_URL","URL");
+define("_AM_PREVIOUS","Previous");
+define("_AM_NEXT","Next");
+define("_AM_USERSFOUND","%s user(s) found");
+
+define("_AM_ACTUS", "Active Users: %s");
+define("_AM_INACTUS", "Inactive Users: %s");
+define("_AM_NOFOUND","No Users Found");
+define("_AM_UNAME","User Name");
+define("_AM_ICQ","ICQ Number");
+define("_AM_AIM","AIM Handle");
+define("_AM_YIM","YIM Handle");
+define("_AM_MSNM","MSNM Handle");
+define("_AM_LOCATION","Location contains");
+define("_AM_OCCUPATION","Occupation contains");
+define("_AM_INTEREST","Interest contains");
+define("_AM_URLC","URL contains");
+define("_AM_LASTLOGMORE","Last login is more than <span style='color:#ff0000;'>X</span> days ago");
+define("_AM_LASTLOGLESS","Last login is less than <span style='color:#ff0000;'>X</span> days ago");
+define("_AM_REGMORE","Joined date is more than <span style='color:#ff0000;'>X</span> days ago");
+define("_AM_REGLESS","Joined date is less than <span style='color:#ff0000;'>X</span> days ago");
+define("_AM_POSTSMORE","Number of Posts is greater than <span style='color:#ff0000;'>X</span>");
+define("_AM_POSTSLESS","Number of Posts is less than <span style='color:#ff0000;'>X</span>");
+define("_AM_SORT","Sort by");
+define("_AM_ORDER","Order");
+define("_AM_LASTLOGIN","Last login");
+define("_AM_POSTS","Number of posts");
+define("_AM_ASC","Ascending order");
+define("_AM_DESC","Descending order");
+define("_AM_LIMIT","Number of users per page");
+define("_AM_RESULTS", "Search results");
+define("_AM_SHOWMAILOK", "Type of users to show");
+define("_AM_MAILOK","Only users that accept mail");
+define("_AM_MAILNG","Only users that don't accept mail");
+define("_AM_SHOWTYPE", "Type of users to show");
+define("_AM_ACTIVE","Only active users");
+define("_AM_INACTIVE","Only inactive users");
+define("_AM_BOTH", "All users");
+define("_AM_SENDMAIL", "Send mail");
+define("_AM_ADD2GROUP", "Add users to %s group");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/findusers.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/groups.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/groups.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/groups.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,35 @@
+<?php
+// $Id$
+//%%%%%% Admin Module Name AdminGroup %%%%%
+define("_AM_EDITADG","Edit Groups");
+define("_AM_MODIFY","Modify");
+define("_AM_DELETE","Delete");
+define("_AM_CREATENEWADG","Create New Group");
+define("_AM_NAME","Name");
+define("_AM_DESCRIPTION","Description");
+define("_AM_INDICATES","* indicates required fields");
+define("_AM_SYSTEMRIGHTS","System Admin rights");
+define("_AM_ACTIVERIGHTS","Module Admin rights");
+define("_AM_IFADMIN","If admin right for a module is checked, access right for the module will always be enabled.");
+define("_AM_ACCESSRIGHTS","Module Access rights");
+define("_AM_UPDATEADG","Update Group");
+define("_AM_MODIFYADG","Modify Group");
+define("_AM_DELETEADG","Delete Group");
+define("_AM_AREUSUREDEL","Are you sure you want to delete this group?");
+define("_AM_YES","Yes");
+define("_AM_NO","No");
+define("_AM_EDITMEMBER","Edit Members of this Group");
+define("_AM_MEMBERS","Members");
+define("_AM_NONMEMBERS","Non-members");
+define("_AM_ADDBUTTON"," add --> ");
+define("_AM_DELBUTTON","<--delete");
+define("_AM_UNEED2ENTER","You need to enter required info!");
+
+// Added in RC3
+define("_AM_BLOCKRIGHTS","Block Access Rights");
+
+define('_AM_FINDU4GROUP', 'Find users for this group');
+define('_AM_GROUPSMAIN', 'Groups Main');
+
+define('_AM_ADMINNO', 'There must be at least one user in the webmasters group');
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/groups.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/images.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/images.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/images.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,25 @@
+<?php
+// $Id$
+//%%%%%% Image Manager %%%%%
+
+
+define('_MD_IMGMAIN','Image Manager Main');
+
+define('_MD_ADDIMGCAT','Add Image Category:');
+define('_MD_EDITIMGCAT','Edit Image Category:');
+define('_MD_IMGCATNAME','Category Name:');
+define('_MD_IMGCATRGRP','Select groups for image manager use:<br /><br /><span style="font-weight: normal;">These are groups allowed to use the image manager for selecting images but not uploading. Webmaster has automatic access.</span>');
+define('_MD_IMGCATWGRP','Select groups allowed to upload images:<br /><br /><span style="font-weight: normal;">Typical usage is for moderator and admin groups.</span>');
+define('_MD_IMGCATWEIGHT','Display order in image manager:');
+define('_MD_IMGCATDISPLAY','Display this category?');
+define('_MD_IMGCATSTRTYPE','Images are uploaded to:');
+define('_MD_STRTYOPENG','This can not be changed afterwards!');
+define('_MD_INDB',' Store in the database (as binary "blob" data)');
+define('_MD_ASFILE',' Store as files (in uploads directory)<br />');
+define('_MD_RUDELIMGCAT','Are you sure that you want to delete this category and all of its images files?');
+define('_MD_RUDELIMG','Are you sure that you want to delete this images file?');
+
+define('_MD_FAILDEL', 'Failed deleting image %s from the database');
+define('_MD_FAILDELCAT', 'Failed deleting image category %s from the database');
+define('_MD_FAILUNLINK', 'Failed deleting image %s from the server directory');
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/images.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/mailusers.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/mailusers.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/mailusers.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,38 @@
+<?php
+// $Id$
+//%%%%%% Admin Module Name MailUsers %%%%%
+
+//%%%%%% mailusers.php %%%%%
+define("_AM_SENDTOUSERS","Send message to users whose:");
+define("_AM_SENDTOUSERS2","Send to:");
+define("_AM_GROUPIS","Group is (optional)");
+define("_AM_TIMEFORMAT", "(Format yyyy-mm-dd, optional)");
+define("_AM_LASTLOGMIN","Last Login is after");
+define("_AM_LASTLOGMAX","Last Login is before");
+define("_AM_REGDMIN","Registered date is after");
+define("_AM_REGDMAX","Registered date is before");
+define("_AM_IDLEMORE","Last Login was more than X days ago (optional)");
+define("_AM_IDLELESS","Last Login was less than X days ago (optional)");
+define("_AM_MAILOK","Send message only to users that accept notification messages (optional)");
+define("_AM_INACTIVE","Send message to inactive users only (optional)");
+define("_AMIFCHECKD", "If this is checked, all the above plus private messaging will be ignored");
+define("_AM_MAILFNAME","From Name (email only)");
+define("_AM_MAILFMAIL","From Email (email only)");
+define("_AM_MAILSUBJECT","Subject");
+define("_AM_MAILBODY","Body");
+define("_AM_MAILTAGS","Useful Tags:");
+define("_AM_MAILTAGS1","{X_UID} will print user id");
+define("_AM_MAILTAGS2","{X_UNAME} will print user name");
+define("_AM_MAILTAGS3","{X_UEMAIL} will print user email");
+define("_AM_MAILTAGS4","{X_UACTLINK} will print user activation link");
+define("_AM_SENDTO","Send to");
+define("_AM_EMAIL","Email");
+define("_AM_PM","Private Message");
+define("_AM_SENDMTOUSERS", "Send Message to Users");
+define("_AM_SENT", "Sent Users");
+define("_AM_SENTNUM", "%s - %s (total: %s users)");
+define("_AM_SENDNEXT", "Next");
+define("_AM_NOUSERMATCH", "No user matched");
+define("_AM_SENDCOMP", "Sending message completed.");
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/mailusers.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/modulesadmin.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/modulesadmin.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/modulesadmin.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,64 @@
+<?php
+// $Id$
+//%%%%%% File Name modulesadmin.php %%%%%
+define("_MD_AM_MODADMIN","Modules Administration");
+define("_MD_AM_MODULE","Module");
+define("_MD_AM_VERSION","Version");
+define("_MD_AM_LASTUP","Last Update");
+define("_MD_AM_DEACTIVATED","Deactivated");
+define("_MD_AM_ACTION","Action");
+define("_MD_AM_DEACTIVATE","Deactivate");
+define("_MD_AM_ACTIVATE","Activate");
+define("_MD_AM_UPDATE","Update");
+define("_MD_AM_DUPEN","Duplicate entry in modules table!");
+define("_MD_AM_DEACTED","The selected module has been deactivated. You can now safely uninstall the module.");
+define("_MD_AM_ACTED","The selected module has been activated!");
+define("_MD_AM_UPDTED","The selected module has been updated!");
+define("_MD_AM_SYSNO","System module cannot be deactivated.");
+define("_MD_AM_STRTNO","This module is set as your default start page. Please change the start module to whatever suits your preferences.");
+
+// added in RC2
+define("_MD_AM_PCMFM","Please confirm:");
+
+// added in RC3
+define("_MD_AM_ORDER","Order");
+define("_MD_AM_ORDER0","(0 = hide)");
+define("_MD_AM_ACTIVE","Active");
+define("_MD_AM_INACTIVE","Inactive");
+define("_MD_AM_NOTINSTALLED","Not Installed");
+define("_MD_AM_NOCHANGE","No Change");
+define("_MD_AM_INSTALL","Install");
+define("_MD_AM_UNINSTALL","Uninstall");
+define("_MD_AM_SUBMIT","Submit");
+define("_MD_AM_CANCEL","Cancel");
+define("_MD_AM_DBUPDATE","Database updated successfully!");
+define("_MD_AM_BTOMADMIN","Back to Module Administration page");
+
+// %s represents module name
+define("_MD_AM_FAILINS","Unable to install %s.");
+define("_MD_AM_FAILACT","Unable to activate %s.");
+define("_MD_AM_FAILDEACT","Unable to deactivate %s.");
+define("_MD_AM_FAILUPD","Unable to update %s.");
+define("_MD_AM_FAILUNINS","Unable to uninstall %s.");
+define("_MD_AM_FAILORDER","Unable to reorder %s.");
+define("_MD_AM_FAILWRITE","Unable to write to main menu.");
+define("_MD_AM_ALEXISTS","Module %s already exists.");
+define("_MD_AM_ERRORSC", "Error(s):");
+define("_MD_AM_OKINS","Module %s installed successfully.");
+define("_MD_AM_OKACT","Module %s activated successfully.");
+define("_MD_AM_OKDEACT","Module %s deactivated successfully.");
+define("_MD_AM_OKUPD","Module %s updated successfully.");
+define("_MD_AM_OKUNINS","Module %s uninstalled successfully.");
+define("_MD_AM_OKORDER","Module %s changed successfully.");
+
+define('_MD_AM_RUSUREINS', 'Press the button below to install this module');
+define('_MD_AM_RUSUREUPD', 'Press the button below to update this module');
+define('_MD_AM_RUSUREUNINS', 'Are you sure you would like to uninstall this module?');
+define('_MD_AM_LISTUPBLKS', 'The following blocks will be updated.<br />Select the blocks of which contents (template and options) may be overwritten.<br />');
+define('_MD_AM_NEWBLKS', 'New Blocks');
+define('_MD_AM_DEPREBLKS', 'Deprecated Blocks');
+
+// added in 2.2
+define("_MD_AM_SELECT_ADMINS", "Select groups with admin rights");
+define("_MD_AM_SELECT_ACCESS", "Select groups with access rights");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/modulesadmin.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/preferences.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/preferences.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/preferences.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,188 @@
+<?php
+// $Id$
+//%%%%%% Admin Module Name AdminGroup %%%%%
+// dont change
+
+define("_MD_AM_SITEPREF","%s Preferences");
+define("_MD_AM_SITENAME","Site name");
+define("_MD_AM_SLOGAN","Slogan for your site");
+define("_MD_AM_ADMINML","Admin mail address");
+define("_MD_AM_LANGUAGE","Default language");
+define("_MD_AM_STARTPAGE","Module for your start page");
+define("_MD_AM_NONE","None");
+define("_MD_AM_SERVERTZ","Server timezone");
+define("_MD_AM_DEFAULTTZ","Default timezone");
+define("_MD_AM_DTHEME","Default theme");
+define("_MD_AM_THEMESET","Theme Set");
+define("_MD_AM_ANONNAME","Username for anonymous users");
+define("_MD_AM_LOADINGIMG","Display loading... image?");
+define("_MD_AM_USEGZIP","Use gzip compression?");
+define("_MD_AM_USERCOOKIE","Name for user cookies.");
+define("_MD_AM_USERCOOKIEDSC","This cookie contains only a user name and is saved in a user pc for a year (if the user wishes). If a user have this cookie, username will be automatically inserted in the login box.");
+define("_MD_AM_USEMYSESS","Use custom session");
+define("_MD_AM_USEMYSESSDSC","Select yes to customise session related values.");
+define("_MD_AM_SESSNAME","Session name");
+define("_MD_AM_SESSNAMEDSC","The name of session (Valid only when 'use custom session' is enabled)");
+define("_MD_AM_SESSEXPIRE","Session expiration");
+define("_MD_AM_SESSEXPIREDSC","Maximum duration of session idle time in minutes (Valid only when 'use custom session' is enabled. Works only when you are using PHP4.2.0 or later.)");
+define("_MD_AM_BANNERS","Activate banner ads?");
+define("_MD_AM_MYIP","Your IP address");
+define("_MD_AM_MYIPDSC","This IP will not counted as impression for banners");
+define("_MD_AM_ALWDHTML","HTML tags allowed in all posts.");
+define("_MD_AM_INVLDMINPASS","Invalid value for minimum length of password.");
+define("_MD_AM_INVLDUCOOK","Invalid value for usercookie name.");
+define("_MD_AM_INVLDSCOOK","Invalid value for sessioncookie name.");
+define("_MD_AM_INVLDSEXP","Invalid value for session expiration time.");
+define("_MD_AM_ADMNOTSET","Admin mail is not set.");
+define("_MD_AM_YES","Yes");
+define("_MD_AM_NO","No");
+define("_MD_AM_DONTCHNG","Don't change!");
+define("_MD_AM_REMEMBER","Remember to chmod 666 this file in order to let the system write to it properly.");
+define("_MD_AM_IFUCANT","If you can't change the permissions you can edit the rest of this file by hand.");
+
+
+define("_MD_AM_COMMODE","Default Comment Display Mode");
+define("_MD_AM_COMORDER","Default Comments Display Order");
+define("_MD_AM_ALLOWHTML","Allow HTML tags in user comments?");
+define("_MD_AM_DEBUGMODE","Debug mode");
+define("_MD_AM_DEBUGMODEDSC","Several debug options. A running website should have this turned off.");
+define("_MD_AM_AVATARCONF","Custom avatar settings");
+define("_MD_AM_CHNGUTHEME","Change all users' theme");
+define("_MD_AM_NOTIFYTO","Select group to which new user notification mail will be sent");
+define("_MD_AM_ALLOWTHEME","Allow users to select theme?");
+define("_MD_AM_ALLOWIMAGE","Allow users to display image files in posts?");
+
+define('_MD_AM_USESSL', 'Use SSL for login?');
+define('_MD_AM_SSLPOST', 'SSL Post variable name');
+define('_MD_AM_SSLPOSTDSC', 'The name of variable used to transfer session value via POST. If you are unsure, set any name that is hard to guess.');
+define('_MD_AM_DEBUGMODE0','Off');
+define('_MD_AM_DEBUGMODE1','PHP Debug');
+define('_MD_AM_DEBUGMODE2','MySQL/Blocks Debug');
+define('_MD_AM_DEBUGMODE3','Smarty Templates Debug');
+define('_MD_AM_GENERAL', 'General Settings');
+define('_MD_AM_IPBAN', 'IP Banning');
+define('_MD_AM_DOBADIPS', 'Enable IP bans?');
+define('_MD_AM_DOBADIPSDSC', 'Users from specified IP addresses will not be able to view your site');
+define('_MD_AM_BADIPS', 'Enter IP addresses that should be banned from the site.<br />Separate each with a <b>|</b>, case insensitive, regex enabled.');
+define('_MD_AM_BADIPSDSC', '^aaa.bbb.ccc will disallow visitors with an IP that starts with aaa.bbb.ccc<br />aaa.bbb.ccc$ will disallow visitors with an IP that ends with aaa.bbb.ccc<br />aaa.bbb.ccc will disallow visitors with an IP that contains aaa.bbb.ccc');
+define('_MD_AM_PREFMAIN', 'Preferences Main');
+define('_MD_AM_METAKEY', 'Meta Keywords');
+define('_MD_AM_METAKEYDSC', 'The keywords meta tag is a series of keywords that represents the content of your site. Type in keywords with each separated by a comma or a space in between. (Ex. XOOPS, PHP, mySQL, portal system)');
+define('_MD_AM_METARATING', 'Meta Rating');
+define('_MD_AM_METARATINGDSC', 'The rating meta tag defines your site age and content rating');
+define('_MD_AM_METAOGEN', 'General');
+define('_MD_AM_METAO14YRS', '14 years');
+define('_MD_AM_METAOREST', 'Restricted');
+define('_MD_AM_METAOMAT', 'Mature');
+define('_MD_AM_METAROBOTS', 'Meta Robots');
+define('_MD_AM_METAROBOTSDSC', 'The Robots Tag declares to search engines what content to index and spider');
+define('_MD_AM_INDEXFOLLOW', 'Index, Follow');
+define('_MD_AM_NOINDEXFOLLOW', 'No Index, Follow');
+define('_MD_AM_INDEXNOFOLLOW', 'Index, No Follow');
+define('_MD_AM_NOINDEXNOFOLLOW', 'No Index, No Follow');
+define('_MD_AM_METAAUTHOR', 'Meta Author');
+define('_MD_AM_METAAUTHORDSC', 'The author meta tag defines the name of the author of the document being read. Supported data formats include the name, email address of the webmaster, company name or URL.');
+define('_MD_AM_METACOPYR', 'Meta Copyright');
+define('_MD_AM_METACOPYRDSC', 'The copyright meta tag defines any copyright statements you wish to disclose about your web page documents.');
+define('_MD_AM_METADESC', 'Meta Description');
+define('_MD_AM_METADESCDSC', 'The description meta tag is a general description of what is contained in your web page');
+define('_MD_AM_METAFOOTER', 'Meta Tags and Footer');
+define('_MD_AM_FOOTER', 'Footer');
+define('_MD_AM_FOOTERDSC', 'Be sure to type links in full path starting from http://, otherwise the links will not work correctly in modules pages.');
+define('_MD_AM_CENSOR', 'Word Censoring Options');
+define('_MD_AM_DOCENSOR', 'Enable censoring of unwanted words?');
+define('_MD_AM_DOCENSORDSC', 'Words will be censored if this option is enabled. This option may be turned off for enhanced site speed.');
+define('_MD_AM_CENSORWRD', 'Words to censor');
+define('_MD_AM_CENSORWRDDSC', 'Enter words that should be censored in user posts.<br />Separate each with a <b>|</b>, case insensitive.');
+define('_MD_AM_CENSORRPLC', 'Bad words will be replaced with:');
+define('_MD_AM_CENSORRPLCDSC', 'Censored words will be replaced with the characters entered in this textbox');
+
+define('_MD_AM_SEARCH', 'Search Options');
+define('_MD_AM_DOSEARCH', 'Enable global searches?');
+define('_MD_AM_DOSEARCHDSC', 'Allow searching for posts/items within your site.');
+define('_MD_AM_MINSEARCH', 'Minimum keyword length');
+define('_MD_AM_MINSEARCHDSC', 'Enter the minimum keyword length that users are required to enter to perform search');
+define('_MD_AM_MODCONFIG', 'Module Config Options');
+define('_MD_AM_DSPDSCLMR', 'Display disclaimer?');
+define('_MD_AM_DSPDSCLMRDSC', 'Select yes to display disclaimer in registration page');
+define('_MD_AM_REGDSCLMR', 'Registration disclaimer');
+define('_MD_AM_REGDSCLMRDSC', 'Enter text to be displayed as registration disclaimer');
+define('_MD_AM_ALLOWREG', 'Allow new user registration?');
+define('_MD_AM_ALLOWREGDSC', 'Select yes to accept new user registration');
+define('_MD_AM_THEMEFILE', 'Update module template .html files from themes/your theme/templates directory?');
+define('_MD_AM_THEMEFILEDSC', 'If this option is enabled, module template .html files will be updated automatically if there are newer files under the themes/your theme/templates directory for the current theme. This should be turned off once the site goes public.');
+define('_MD_AM_CLOSESITE', 'Turn your site off?');
+define('_MD_AM_CLOSESITEDSC', 'Select yes to turn your site off so that only users in selected groups have access to the site. ');
+define('_MD_AM_CLOSESITEOK', 'Select groups that are allowed to access while the site is turned off.');
+define('_MD_AM_CLOSESITEOKDSC', 'Users in the default webmasters group are always granted access.');
+define('_MD_AM_CLOSESITETXT', 'Reason for turning off the site');
+define('_MD_AM_CLOSESITETXTDSC', 'The text that is presented when the site is closed.');
+define('_MD_AM_SITECACHE', 'Site-wide Cache');
+define('_MD_AM_SITECACHEDSC', 'Caches whole contents of the site for a specified amount of time to enhance performance. Setting site-wide cache will override module-level cache, block-level cache, and module item level cache if any.');
+define('_MD_AM_MODCACHE', 'Module-wide Cache');
+define('_MD_AM_MODCACHEDSC', 'Caches module contents for a specified amount of time to enhance performance. Setting module-wide cache will override module item level cache if any.');
+define('_MD_AM_NOMODULE', 'There is no module that can be cached.');
+define('_MD_AM_DTPLSET', 'Default template set');
+define('_MD_AM_SSLLINK', 'URL where SSL login page is located');
+
+// added for mailer
+define("_MD_AM_MAILER","Mail Setup");
+define("_MD_AM_MAILER_MAIL","");
+define("_MD_AM_MAILER_SENDMAIL","");
+define("_MD_AM_MAILER_","");
+define("_MD_AM_MAILFROM","FROM address");
+define("_MD_AM_MAILFROMDESC","");
+define("_MD_AM_MAILFROMNAME","FROM name");
+define("_MD_AM_MAILFROMNAMEDESC","");
+// RMV-NOTIFY
+define("_MD_AM_MAILFROMUID","FROM user");
+define("_MD_AM_MAILFROMUIDDESC","When the system sends a private message, which user should appear to have sent it?");
+define("_MD_AM_MAILERMETHOD","Mail delivery method");
+define("_MD_AM_MAILERMETHODDESC","Method used to deliver mail. Default is \"PHP mail()\", use others only if that makes trouble.");
+define("_MD_AM_SMTPHOST","SMTP host(s)");
+define("_MD_AM_SMTPHOSTDESC","List of SMTP servers to try to connect to. Separate multiple servers with semi-colon ; ");
+define("_MD_AM_SMTPUSER","SMTPAuth username");
+define("_MD_AM_SMTPUSERDESC","Username to connect to an SMTP host with SMTPAuth.");
+define("_MD_AM_SMTPPASS","SMTPAuth password");
+define("_MD_AM_SMTPPASSDESC","Password to connect to an SMTP host with SMTPAuth.");
+define("_MD_AM_SENDMAILPATH","Path to sendmail");
+define("_MD_AM_SENDMAILPATHDESC","Path to the sendmail program (or substitute) on the webserver.");
+define("_MD_AM_THEMEOK","Selectable themes");
+define("_MD_AM_THEMEOKDSC","Choose themes that users can select as the default theme");
+
+define("_MD_AM_ADMINTHEME", "Admin Theme");
+define("_MD_AM_FRONTSIDE_THEME", "Use frontside theme");
+
+define('_MD_AM_MODULEPREF', 'Module Preferences');
+
+// Authentication constants
+
+define("_MD_AM_AUTHENTICATION", "Authentication Options");
+define("_MD_AM_AUTHMETHOD", "Authentication Method");
+define("_MD_AM_AUTHMETHODDESC", "Which authentication method would you like to use for signing on users.");
+define("_MD_AM_LDAP_MAIL_ATTR", "LDAP - Mail Field Name");
+define("_MD_AM_LDAP_MAIL_ATTR_DESC","The name of the E-Mail field in your LDAP directory tree.");
+define("_MD_AM_LDAP_NAME_ATTR","LDAP - Common Name Field Name");
+define("_MD_AM_LDAP_NAME_ATTR_DESC","The name of the Comman Name field in your LDAP directory.");
+define("_MD_AM_LDAP_SURNAME_ATTR","LDAP - Surname Fiend Name");
+define("_MD_AM_LDAP_SURNAME_ATTR_DESC","The name of the Surname field in your LDAP directory.");
+define("_MD_AM_LDAP_GIVENNAME_ATTR","LDAP - Given Name Field Name");
+define("_MD_AM_LDAP_GIVENNAME_ATTR_DSC","The name of the Given Name field in your LDAP directory.");
+define("_MD_AM_LDAP_UID_ATTR","LDAP - UID Field Name");
+define("_MD_AM_LDAP_UID_ATTR_DESC","The name of the User ID field in your LDAP directory.");
+define("_MD_AM_LDAP_BASE_DN", "LDAP - Base DN");
+define("_MD_AM_LDAP_BASE_DN_DESC", "The base DN (Distinguished Name) of your LDAP directory tree.");
+define("_MD_AM_LDAP_PORT","LDAP - Port Number");
+define("_MD_AM_LDAP_PORT_DESC","The port number needed to access your LDAP directory server.");
+define("_MD_AM_LDAP_SERVER","LDAP - Server Name");
+define("_MD_AM_LDAP_SERVER_DESC","The name of your LDAP directory server.");
+define("_MD_AM_LDAP_UID_ASDN", "UID as DN");
+define("_MD_AM_LDAP_UID_ASDN_DESC", "The uid attribute is used as DN");
+
+define("_MD_AM_LDAP_MANAGER_DN", "DN of the LDAP manager");
+define("_MD_AM_LDAP_MANAGER_DN_DESC", "The DN of the user allow to make search (eg manager)");
+define("_MD_AM_LDAP_MANAGER_PASS", "Password of the LDAP manager");
+define("_MD_AM_LDAP_MANAGER_PASS_DESC", "The password of the user allow to make search");
+define("_MD_AM_LDAP_VERSION", "LDAP Version protocol");
+define("_MD_AM_LDAP_VERSION_DESC", "The LDAP Version protocol : 2 or 3");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/preferences.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/smilies.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/smilies.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/smilies.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,20 @@
+<?php
+// $Id$
+//%%%%%% Admin Module Name Smilies %%%%%
+
+define('_AM_SMILESCONTROL','Smilies Control');
+define('_AM_CODE','Code');
+define('_AM_SMILIE','Smilie');
+define('_AM_ACTION','Action');
+define('_AM_EDIT','Edit');
+define('_AM_DEL','Delete');
+define('_AM_CNRFTSD','Could not retrieve from the smilies database.');
+define('_AM_ADDSMILE','Add a Smilie');
+define('_AM_EDITSMILE','Edit a Smilie');
+define('_AM_SMILECODE','Smilie Code:');
+define('_AM_SMILEURL','Image URL:');
+define('_AM_SMILEEMOTION','Description:');
+define('_AM_ADD','Add');
+define('_AM_SAVE','Save');
+define('_AM_WAYSYWTDTS','WARNING: Are you sure you want to delete this Smile?');define('_AM_DISPLAYF', 'Display in form?');
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/smilies.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/tplsets.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/tplsets.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/tplsets.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,61 @@
+<?php
+// $Id$
+//%%%%%% Template Manager %%%%%
+define('_MD_TPLMAIN','Template Set Manager');
+define('_MD_INSTALL','Install');
+define('_MD_EDITTEMPLATE','Edit template file');
+define('_MD_FILENAME','File name');
+define('_MD_FILEDESC','Description');
+define('_MD_LASTMOD','Last modified');
+define('_MD_FILEMOD','Last modified (file)');
+define('_MD_FILECSS','CSS');
+define('_MD_FILEHTML','HTML');
+define('_MD_AM_BTOTADMIN', 'Back to template set manager');
+define('_MD_RUSUREDELTH', 'Are you sure that you want to delete this template set and all its template data?');
+define('_MD_RUSUREDELTPL', 'Are you sure that you want to delete this template data?');
+define('_MD_PLZINSTALL', 'Press the button below to start installation');
+define('_MD_PLZGENERATE', 'Press the button below to generate file(s)');
+define('_MD_CLONETHEME','Clone a template set');
+define('_MD_THEMENAME','Base template set');
+define('_MD_NEWNAME','Enter new template set name');
+define('_MD_IMPORT','Import');
+define('_MD_RUSUREIMPT', 'Importing template data from the templates directory will overwrite your changes in database.<br />Click "Import" to proceed.');
+define('_MD_THMSETNAME','Name');
+define('_MD_CREATED','Created');
+define('_MD_SKIN','Skin');
+define('_MD_TEMPLATES','Templates');
+define('_MD_EDITSKIN','Edit skin');
+define('_MD_NOFILE','No File');
+define('_MD_VIEW','View');
+define('_MD_COPYDEFAULT','Copy default file');
+define('_MD_DLDEFAULT','Download default file');
+define('_MD_VIEWDEFAULT','View default template');
+define('_MD_DOWNLOAD','Download');
+define('_MD_UPLOAD','Upload');
+define('_MD_GENERATE','Generate');
+define('_MD_CHOOSEFILE', 'Choose file to upload');
+define('_MD_UPWILLREPLACE', 'Uploading this file will overwrite the data in database!');
+define('_MD_UPLOADTAR', 'Upload a template set');
+define('_MD_CHOOSETAR', 'Choose a template set package to upload');
+define('_MD_ONLYTAR', 'Must be a tar.gz/.tar file with a valid XOOPS template set structure');
+define('_MD_NTHEMENAME', 'New template set name');
+define('_MD_ENTERTH', 'Enter a template set name for this package. Leave it blank for automatic detection.');
+define('_MD_TITLE','Title');
+define('_MD_CONTENT','Content');
+define('_MD_ACTION','Action');
+define('_MD_DEFAULTTHEME','Your site uses this template set as default');
+define('_MD_AM_ERRTHEME', 'The following template sets have no valid skin files data. Press delete to remove data related to the template set.');
+define('_MD_SKINIMGS','Skin image files');
+define('_MD_EDITSKINIMG','Edit skin image files');
+define('_MD_IMGFILE','File name');
+define('_MD_IMGNEWFILE','Upload new file');
+define('_MD_IMGDELETE','Delete');
+define('_MD_ADDSKINIMG','Add skin image file');
+define('_MD_BLOCKHTML', 'Block HTML');
+define('_MD_IMAGES', 'Images');
+define('_MD_NOZLIB', 'Zlib support must be enabled on your server');
+define('_MD_LASTIMP', 'Last Imported');
+define('_MD_FILENEWER', 'A newer file that has not been imported yet exists under the <b>templates</b> directory.');
+define('_MD_FILEIMPORT', 'An older file that has not been imported yet exists under the <b>templates</b> directory.');
+define('_MD_FILEGENER', 'Template file does not eixst. It can be generated (copied from the <b>default</b> template), uploaded, or imported from the <b>templates</b> directory.');
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/tplsets.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/userrank.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/userrank.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/userrank.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,27 @@
+<?php
+// $Id$
+//%%%%%% Admin Module Name UserRank %%%%%
+define("_AM_RANKSSETTINGS","User Ranks Settings");
+define("_AM_TITLE","Title");
+define("_AM_MINPOST","Min. Posts");
+define("_AM_MAXPOST","Max. Posts");
+define("_AM_IMAGE","Image");
+define("_AM_SPERANK","Special Ranks");
+define("_AM_ON","on");
+define("_AM_OFF","off");
+define("_AM_EDIT","Edit");
+define("_AM_DEL","Delete");
+define("_AM_ADDNEWRANK","Add a New Rank");
+define("_AM_RANKTITLE","Rank Title");
+define("_AM_SPECIAL","Special");
+define("_AM_ADD","Add");
+define("_AM_EDITRANK","Edit Ranks");
+define("_AM_ACTIVE","active");
+define("_AM_SAVECHANGE","Save Changes");
+define("_AM_WAYSYWTDTR","WARNING: Are you sure you want to delete this Ranking?");
+define("_AM_YES","Yes");
+define("_AM_NO","No");
+define("_AM_VALIDUNDER","(A valid image file under <b>%s</b> directory)");
+define("_AM_SPECIALCAN","(Special ranks can be assigned to users irrespective of the number of user posts)");
+define("_AM_ACTION","Action");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/userrank.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/version.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/version.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/version.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,6 @@
+<?php
+// $Id$
+//%%%%%% Admin Module Name Version %%%%%
+
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin/version.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,29 @@
+<?php
+// $Id$
+//%%%%%% File Name admin.php %%%%%
+define('_MD_AM_DBUPDATED','Database Updated Successfully!');
+
+
+// Admin Module Names
+define('_MD_AM_ADGS','Groups');
+define('_MD_AM_BANS','Banners');
+define('_MD_AM_BKAD','Blocks');
+define('_MD_AM_MDAD','Modules');
+define('_MD_AM_SMLS','Smilies');
+define('_MD_AM_RANK','User Ranks');
+define('_MD_AM_USER','Edit Users');
+define('_MD_AM_FINDUSER', 'Find Users');
+define('_MD_AM_PREF','Preferences');
+define('_MD_AM_VRSN','Version');
+define('_MD_AM_MLUS', 'Mail Users');
+define('_MD_AM_IMAGES', 'Image Manager');
+define('_MD_AM_AVATARS', 'Avatars');
+define('_MD_AM_TPLSETS', 'Templates');
+define('_MD_AM_COMMENTS', 'Comments');
+
+// Group permission phrases
+define('_MD_AM_PERMADDNG', 'Could not add %s permission to %s for group %s');
+define('_MD_AM_PERMADDOK','Added %s permission to %s for group %s');
+define('_MD_AM_PERMRESETNG','Could not reset group permission for module %s');
+define('_MD_AM_PERMADDNGP', 'All parent items must be selected.');
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/admin.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/blocks.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/blocks.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/blocks.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,53 @@
+<?php
+// $Id$
+// Blocks
+define("_MB_SYSTEM_ADMENU","Administration Menu");
+define("_MB_SYSTEM_RNOW","Register now!");
+define("_MB_SYSTEM_LPASS","Lost Password?");
+define("_MB_SYSTEM_SEARCH","Search");
+define("_MB_SYSTEM_ADVS","Advanced Search");
+define("_MB_SYSTEM_VACNT","View Account");
+define("_MB_SYSTEM_EACNT","Edit Account");
+// RMV-NOTIFY
+define("_MB_SYSTEM_NOTIF", "Notifications");
+define("_MB_SYSTEM_LOUT","Logout");
+define("_MB_SYSTEM_INBOX","Inbox");
+define("_MB_SYSTEM_SUBMS","Submitted News");
+define("_MB_SYSTEM_WLNKS","Waiting Links");
+define("_MB_SYSTEM_BLNK","Broken Links");
+define("_MB_SYSTEM_MLNKS","Modified Links");
+define("_MB_SYSTEM_WDLS","Waiting Downloads");
+define("_MB_SYSTEM_BFLS","Broken Files");
+define("_MB_SYSTEM_MFLS","Modified Downloads");
+define("_MB_SYSTEM_HOME","Home"); // link to home page in main menu block
+define("_MB_SYSTEM_RECO","Recommend Us");
+define("_MB_SYSTEM_PWWIDTH","Pop-Up Window Width");
+define("_MB_SYSTEM_PWHEIGHT","Pop-Up Window Height");
+define("_MB_SYSTEM_LOGO","Logo image file under %s directory"); // %s is your root image directory name
+define("_MB_SYSTEM_COMPEND", "Comments");
+
+//define("_MB_SYSTEM_LOGGEDINAS", "Logged in as");
+define("_MB_SYSTEM_SADMIN","Show admin groups");
+define("_MB_SYSTEM_SPMTO","Send Private Message to %s");
+define("_MB_SYSTEM_SEMTO","Send Email to %s");
+
+define("_MB_SYSTEM_DISPLAY","Display %s members");
+define("_MB_SYSTEM_DISPLAYA","Display member avatars");
+define("_MB_SYSTEM_NODISPGR","Do not display users whose rank is:");
+
+define("_MB_SYSTEM_DISPLAYC","Display %s comments");
+define("_MB_SYSTEM_SECURE", "Secure Login");
+
+define("_MB_SYSTEM_NUMTHEME", "%s themes");
+define("_MB_SYSTEM_THSHOW", "Display screenshot image");
+define("_MB_SYSTEM_THWIDTH", "Screenshot image width");
+//define('_MB_SYSTEM_REMEMBERME', 'Remember me');
+
+//Custom block
+define("_MB_SYSTEM_CONTENT", "Content");
+define("_MB_SYSTEM_CONTENTTYPE", "Content Type");
+define("_MB_SYSTEM_HTMLBLOCK","HTML");
+define("_MB_SYSTEM_PHPBLOCK","PHP Script");
+define("_MB_SYSTEM_SMILEYBLOCK","Auto Format (smilies enabled)");
+define("_MB_SYSTEM_NOSMILEYBLOCK","Auto Format (smilies disabled)");
+?>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/blocks.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/error.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/error.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/error.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,80 @@
+<?php
+// $Id$
+// Error messages
+define("SYSTEM_ERROR1", "[b]Why am I being redirected here?[/b]
+
+{SITE_NAME} site security has detected that your computer has a firewall setting that is preventing you from registering on the site. We use 'Referrer-checking' know as HTTP_REFERER which makes sure that all contents posted are from authorised users only. Your firewall settings are blocking this information, so this will prevent you from registering properly if you try and proceed.
+
+Maybe you have already registered successfully before and are now having problems posting to the forums, news, or other form submissions. If this is the case, you have possibly installed a firewall since registration, or changed the settings of an existing installation.
+
+[b]Tell me more...[/b]
+
+When you click a Web page button or link on our site, your browser notes the current page that you are on and sends that information to the server before accessing a new page. This way, our website server knows the last Web page that you viewed was part of our site. This is important because certain pages are only accessible after you have logged. In other words, the browser sends a message back saying 'It's OK so serve a registered users page, because this person is registered and already logged in' Some firewalls block this information by default so that you do not broadcast this information to potentially unsafe websites. [i]There is nothing wrong with either the XOOPS security or your firewall settings, they simply need to be enabled to talk to each other.[/i]
+
+[b]What can I do?[/b]
+
+First turn off /disable any other protection or monitoring programmes such as:
+
+- WebWasher Standard Filter/URL Filter
+- advert. blocking software
+- Pop-up blockers
+
+These may require their own changes if they have local security settings.
+
+[b]Additionally, your browser must also be set up to accept cookies from {SITE_URL} [/b]Please see cookies help page (link to that page shown below)
+
+The following simple steps are necessary for us to offer the best security for our site and registered users.
+Please check your firewall and cookie settings, then follow the 'Register' link again.
+
+[b]Here are example step by step procedures for Norton (NIS), Zone Alarm Pro and Windows XP - [/b]
+
+The procedure here is to add {SITE_URL} to the Trusted Sites list of your firewall application.
+
+[b]Norton Internet Security 2002 (or earlier) [/b]
+
+1. Open NIS or NPF.
+2. Click Options.
+3. Click Internet Security or Personal Firewall. (This step is not always needed.) The Options window appears.
+4. Click Advanced Options.
+5. Click the Web tab.
+6. Click Add Site. A new site/domain box appears.
+7. Enter {SITE_URL} and click OK. The site name now appears in the left frame of the Advanced Options window.
+8. Click the name of the new site.
+9. Click the Privacy tab.
+10. Check the \"Use these rules for...\" box.
+11. Change the Referrer from \"Block\" to \"Permit\"
+12. Click Apply, and then click OK.
+13. Click OK to close the Options window.
+----------------------------------------------------------
+[b]Norton Internet Security 2003/2004 [/b]
+
+1. Open NIS or NPF.
+2. Do one of the following.
+* In NIS/NPF 2003, click Options > Internet Security or Personal Firewall (This step is not always needed), and then click the Web Content tab.
+* In NIS/NPF 2004, double-click Privacy Control, and then click Advanced.
+3. Click Add Site. A new site/domain box appears.
+4. Enter {SITE_URL} and click OK. The site name now appears in the left frame of the Advanced Options window.
+5. Click the name of the new site.
+6. Click the Global Settings tab.
+7. In the \"Information about visited sites\" section, clear \"Use default settings\"
+8. Click Permit.
+9. Click OK to close the Options window.
+----------------------------------------------------------
+[b]Zone Alarm Pro: [/b]
+
+1. Click Privacy
+2. Click Cookie Control
+3. Click Custom
+4. Uncheck \"remove private header information\"
+5- You may have to also 'allow third party cookies'
+----------------------------------------------------------
+[b]Windows XP's Internal Firewall [/b]
+
+1. Open XP's Control Panel
+2. Double-click Networking and Internet Connections
+3. Select Network Connections
+4. Right-click on the connection to disable, then select Properties
+5. On the Advanced tab, clear the Protect my computer or network checkbox
+6. Press OK ");
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/error.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/main.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/main.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/main.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,24 @@
+<?php
+// User Lookup
+define("_MA_LOOKUP_USER", "Lookup User");
+define("_MA_SEARCH", "Search");
+define("_MA_SEARCHBY", "Search By");
+define("_MA_SEARCH_EMAIL", "Email");
+define("_MA_SEARCH_NAME", "Name");
+define("_MA_SEARCH_UID", "User ID");
+define("_MA_FIND_USER", "Find User");
+define("_MA_RESET", "Reset");
+define("_MA_CHOOSE_USER", "Choose User");
+define("_MA_NO_USERS", "No Users Found");
+define("_MA_SEARCH_AGAIN", "Search Again");
+
+define("_MA_SEARCH_SELECTUSER", "Select user");
+define("_MA_SEARCH_USERLIST", "User list");
+define("_MA_SEARCH_GROUP", "Group");
+define("_MA_SEARCH_RANK", "Rank");
+define("_MA_SEARCH_RANK_DESC", "Rank will be ignored if group selected");
+define("_MA_SEARCH_REFRESH", "Refresh");
+define("_MA_SEARCH_TEXT", "Text");
+define("_MA_SEARCH_TEXT_DESC", "<strong>text</strong> - Exact match; <br /><i>text</i><strong>%</strong> - Start with; <br /><strong>%</strong><i>text</i> - End with; <br /><strong>%</strong><i>text</i><strong>%</strong> - Include");
+define("_MA_SEARCH_COUNT", "Found: %d");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/main.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/modinfo.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/modinfo.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/modinfo.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,59 @@
+<?php
+// $Id$
+// Module Info
+
+// The name of this module
+define("_MI_SYSTEM_NAME","System");
+
+// A brief description of this module
+define("_MI_SYSTEM_DESC","For administration of core settings of the site.");
+
+// Names of blocks for this module (Not all module has blocks)
+define("_MI_SYSTEM_BNAME2","User Menu");
+define("_MI_SYSTEM_BNAME3","Login");
+define("_MI_SYSTEM_BNAME4","Search");
+define("_MI_SYSTEM_BNAME5","Waiting Contents");
+define("_MI_SYSTEM_BNAME6","Main Menu");
+define("_MI_SYSTEM_BNAME7","Site Info");
+define('_MI_SYSTEM_BNAME8', "Who's Online");
+define('_MI_SYSTEM_BNAME9', "Top Posters");
+define('_MI_SYSTEM_BNAME10', "New Members");
+define('_MI_SYSTEM_BNAME11', "Recent Comments");
+// RMV-NOTIFY
+define('_MI_SYSTEM_BNAME12', "Notification Options");
+define('_MI_SYSTEM_BNAME13', "Themes");
+define("_MI_SYSTEM_BNAME14", "Custom Block");
+
+// Names of admin menu items
+define("_MI_SYSTEM_ADMENU1","Banners");
+define("_MI_SYSTEM_ADMENU2","Blocks");
+define("_MI_SYSTEM_ADMENU3","Groups");
+define("_MI_SYSTEM_ADMENU5","Modules");
+define("_MI_SYSTEM_ADMENU6","Preferences");
+define("_MI_SYSTEM_ADMENU7","Smilies");
+define("_MI_SYSTEM_ADMENU9","User Ranks");
+define("_MI_SYSTEM_ADMENU10","Edit User");
+define("_MI_SYSTEM_ADMENU11","Mail Users");
+define("_MI_SYSTEM_ADMENU12", "Find Users");
+define("_MI_SYSTEM_ADMENU13", "Images");
+define("_MI_SYSTEM_ADMENU14", "Avatars");
+define("_MI_SYSTEM_ADMENU15", "Templates");
+define("_MI_SYSTEM_ADMENU16", "Comments");
+
+define("_MI_SYSTEM_UMODE_TITLE", "Comments Display Mode");
+define("_MI_SYSTEM_UORDER_TITLE", "Comments Sort Order");
+define("_MI_SYSTEM_REALNAME", "Displayname");
+define("_MI_SYSTEM_USERREGDATE", "Member Since");
+define("_MI_SYSTEM_USERPOSTS", "Posts");
+define("_MI_SYSTEM_ATTACHSIG", "Always attach my signature");
+define("_MI_SYSTEM_TIMEZONEOFFSET", "Time Zone");
+define("_MI_SYSTEM_MAILOK", "Receive occasional email notices?");
+define("_MI_SYSTEM_USERTHEME", "Theme");
+define("_MI_SYSTEM_ACTKEY", "User activation key");
+define("_MI_SYSTEM_LASTLOGIN", "Last Login");
+define("_MI_SYSTEM_MAILOK_DESC", "By enabling this, administrators and moderators are allowed to send you notices occasionally via email");
+
+//configurations
+define("_MI_SYSTEM_ANONYMOUS","Anonymous");
+define("_MI_SYSTEM_SITECLOSEDMSG","The site is currently closed for maintainance. Please come back later.");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/english/modinfo.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/language/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/menu.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/menu.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/menu.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,60 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$adminmenu[1]['title'] = _MI_SYSTEM_ADMENU3;
+$adminmenu[1]['link'] = "admin.php?fct=groups";
+//$adminmenu[2]['title'] = _MI_SYSTEM_ADMENU10;
+//$adminmenu[2]['link'] = "admin.php?fct=users";
+$adminmenu[3]['title'] = _MI_SYSTEM_ADMENU6;
+$adminmenu[3]['link'] = "admin.php?fct=preferences";
+$adminmenu[4]['title'] = _MI_SYSTEM_ADMENU5;
+$adminmenu[4]['link'] = "admin.php?fct=modulesadmin";
+$adminmenu[5]['title'] = _MI_SYSTEM_ADMENU2;
+$adminmenu[5]['link'] = "admin.php?fct=blocksadmin";
+$adminmenu[7]['title'] = _MI_SYSTEM_ADMENU12;
+$adminmenu[7]['link'] = "admin.php?fct=findusers";
+$adminmenu[8]['title'] = _MI_SYSTEM_ADMENU11;
+$adminmenu[8]['link'] = "admin.php?fct=mailusers";
+$adminmenu[9]['title'] = _MI_SYSTEM_ADMENU13;
+$adminmenu[9]['link'] = "admin.php?fct=images";
+$adminmenu[10]['title'] = _MI_SYSTEM_ADMENU14;
+$adminmenu[10]['link'] = "admin.php?fct=avatars";
+$adminmenu[11]['title'] = _MI_SYSTEM_ADMENU9;
+$adminmenu[11]['link'] = "admin.php?fct=userrank";
+$adminmenu[12]['title'] = _MI_SYSTEM_ADMENU7;
+$adminmenu[12]['link'] = "admin.php?fct=smilies";
+$adminmenu[13]['title'] = _MI_SYSTEM_ADMENU1;
+$adminmenu[13]['link'] = "admin.php?fct=banners";
+$adminmenu[14]['title'] = _MI_SYSTEM_ADMENU16;
+$adminmenu[14]['link'] = "admin.php?fct=comments";
+$adminmenu[15]['title'] = _MI_SYSTEM_ADMENU15;
+$adminmenu[15]['link'] = "admin.php?fct=tplsets";
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/menu.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/sql/upgrade.sql
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/sql/upgrade.sql 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/sql/upgrade.sql 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,27 @@
+CREATE TABLE `user_profile` (
+ `profileid` int(12) unsigned NOT NULL auto_increment,
+ PRIMARY KEY (`profileid`)
+) TYPE=MyISAM;
+
+CREATE TABLE `user_profile_field` (
+ `fieldid` int(12) unsigned NOT NULL auto_increment,
+ `field_type` varchar(30) NOT NULL default '',
+ `field_valuetype` tinyint(2) unsigned NOT NULL default '0',
+ `field_name` varchar(255) NOT NULL default '',
+ `field_title` varchar(255) NOT NULL default '',
+ `field_description` text NOT NULL,
+ `field_required` tinyint(2) unsigned NOT NULL default '0',
+ `field_maxlength` tinyint(6) unsigned NOT NULL default '0',
+ `field_weight` tinyint(6) unsigned NOT NULL default '0',
+ `field_default` text NOT NULL,
+ `field_moduleid` int(12) unsigned NOT NULL default '0',
+ `field_notnull` tinyint(2) unsigned NOT NULL default '0',
+ `field_edit` tinyint(2) unsigned NOT NULL default '0',
+ `field_show` tinyint(2) unsigned NOT NULL default '0',
+ `field_config` tinyint(2) unsigned NOT NULL default '0',
+ `field_options` text NOT NULL default '',
+ `field_register` tinyint(2) unsigned NOT NULL default '0',
+ PRIMARY KEY (`fieldid`),
+ UNIQUE KEY `field_name` (`field_name`)
+) TYPE=MyISAM;
+
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/sql/upgrade.sql
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/sql/upgrade205.sql
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/sql/upgrade205.sql 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/sql/upgrade205.sql 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,12 @@
+CREATE TABLE `block_instance` (
+ `instanceid` int(12) unsigned NOT NULL auto_increment,
+ `bid` int(12) unsigned NOT NULL,
+ `options` text NOT NULL default '',
+ `title` varchar(255) NOT NULL default '',
+ `side` tinyint(1) unsigned NOT NULL default '0',
+ `weight` smallint(5) unsigned NOT NULL default '0',
+ `visible` tinyint(1) unsigned NOT NULL default '0',
+ `bcachetime` int(10) unsigned NOT NULL default '0',
+ PRIMARY KEY (`instanceid`),
+ KEY `join` (`instanceid`, `visible`, `weight`)
+) TYPE=MyISAM;
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/sql/upgrade205.sql
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/style.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/style.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/style.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,66 @@
+/* General definitions */
+html { scrollbar-face-color: #eeeeee; scrollbar-highlight-color: #ffffff; scrollbar-shadow-color: #d5d5d5; scrollbar-3dlight-color: #000000; scrollbar-arrow-color: #000000; scrollbar-track-color: #ffffff; scrollbar-darkshadow-color: #000000;}
+
+body { background-color : transparent; font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif; margin: 0px; padding: 0px;}
+
+img {border: none;}
+
+hr { height: 3px; border: 3px #E18A00 solid; width: 95%;}
+
+ul { margin: 2px; padding: 2px; list-style: decimal inside; text-align: left;}
+li { margin-left: 2px; list-style: square inside; color: #000000;}
+
+h1 { font-size: 20px;}
+h2 { font-size: 18px;}
+h3 { font-size: 16px;}
+h4 { font-size: 14px;}
+
+th {background-color: #2F5376; color: #FFFFFF; padding : 2px; vertical-align : middle;}
+
+a:link {text-decoration: none; color: #666666; font-weight: bold; background-color: transparent;}
+a:visited {text-decoration: none; color: #666666; font-weight: bold; background-color: transparent;}
+a:hover {text-decoration: none; color: #ff9966; font-weight: bold; background-color: transparent;}
+
+
+/* Code and Quote Definition */
+div.xoopsCode { font-size: 11px; color: #006600; background-color: #FAFAFA; border: #c2cdd6 1px dashed;}
+div.xoopsQuote { font-size: 11px; color: #444444; line-height: 125%; text-align: justify; background-color: #FAFAFA; border: #c2cdd6 1px dashed;}
+
+/* Links for Quotes */
+div.xoopsQuote a:link, div.xoopsQuote a:visited { color: #444444; font-weight: bold; background-color: transparent;}
+div.xoopsQuote a:hover, div.xoopsQuote a:active { color: #1778cb; background-color: transparent;}
+
+/* Redirect messages */
+div.errorMsg { background-color: #FF3737; color: White; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold; padding: 10px;}
+div.confirmMsg { background-color : #DDFFDF; color: #136C99; text-align:center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight : bold;}
+
+/* General small */
+.fontSmall { font-size : 10px; background-color: transparent;}
+a.fontSmall { color: #006699;}
+a.fontSmall:hover { color: #C23030; text-decoration: underline;}
+
+/*forms elements*/
+input { border-right: #000000 1px solid; border-top: #000000 1px solid; font: 11px verdana, arial, helvetica, sans-serif; border-left: #000000 1px solid;color: #000000; border-bottom: #000000 1px solid; background-color: #ffffff;}
+textarea { border: #000000 1px solid; width: 430px; font: 11px verdana, arial, helvetica, sans-serif;}
+input.formTextBox { border: #000000 1px solid; background: #ffffff; font: 11px verdana, arial, helvetica, sans-serif;}
+select { border: #000000 1px solid; font: 11px verdana, arial, helvetica, sans-serif;}
+
+div.content { text-align: left; padding: 0px 15px 0px 15px;}
+
+.xoopsCenter { text-align:center;}
+
+.bg1 { background-color: #E6E6E6;}
+.bg2 { background-color: #2F5376;}
+.bg3 { background-color: #2F5376; color: #ffffff;}
+.bg4 { background-color: #ECECEC;}
+.bg5 { background-color: #ECECEC;}
+
+.outer {border: 1px solid silver;}
+.head {background-color: #c2cdd6; padding: 5px; font-weight: bold;}
+.even {background-color: #dee3e7; padding: 5px;}
+.odd {background-color: #E6E6E6; padding: 5px;}
+.foot {background-color: #c2cdd6; padding: 5px; font-weight: bold;}
+tr.head td {background-color: #c2cdd6; padding: 5px; font-weight: bold;}
+tr.even td {background-color: #dee3e7; padding: 5px;}
+tr.odd td {background-color: #E6E6E6; padding: 5px;}
+tr.foot td {background-color: #c2cdd6; padding: 5px; font-weight: bold;}
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/style.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_comments.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_comments.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_comments.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,11 @@
+<table width="100%" cellspacing="1" class="outer">
+ <{foreach item=comment from=$block.comments}>
+ <tr class="<{cycle values="even,odd"}>">
+ <td align="center"><img src="<{$xoops_url}>/images/<{$comment.icon}>" alt="" /></td>
+ <td><{$comment.title}></td>
+ <td align="center"><{$comment.module}></td>
+ <td align="center"><{$comment.poster}></td>
+ <td align="right"><{$comment.time}></td>
+ </tr>
+ <{/foreach}>
+</table>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_comments.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_dummy.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_dummy.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_dummy.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+<{$block.content}>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_dummy.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_login.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_login.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_login.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,14 @@
+<form style="margin-top: 0px;" action="<{$xoops_url}>/user.php" method="post">
+ <{$block.lang_username}><br />
+ <input type="text" name="uname" size="12" value="<{$block.unamevalue}>" maxlength="25" /><br />
+ <{$block.lang_password}><br />
+ <input type="password" name="pass" size="12" maxlength="32" /><br />
+ <!-- <input type="checkbox" name="rememberme" value="On" class ="formButton" /><{$block.lang_rememberme}><br /> //-->
+ <input type="hidden" name="xoops_redirect" value="<{$xoops_requesturi}>" />
+ <input type="hidden" name="op" value="login" />
+ <input class="formbutton" type="submit" value="<{$block.lang_login}>" /><br />
+ <{$block.sslloginlink}>
+</form>
+<a href="<{$xoops_url}>/user.php#lost"><{$block.lang_lostpass}></a>
+<br /><br />
+<a href="<{$xoops_url}>/register.php"><{$block.lang_registernow}></a>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_login.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_mainmenu.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_mainmenu.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_mainmenu.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,15 @@
+<table cellspacing="0">
+ <tr>
+ <td id="mainmenu">
+ <a class="menuTop" href="<{$xoops_url}>/"><{$block.lang_home}></a>
+ <!-- start module menu loop -->
+ <{foreach item=module from=$block.modules}>
+ <a class="menuMain" href="<{$xoops_url}>/modules/<{$module.directory}>/"><{$module.name}></a>
+ <{foreach item=sublink from=$module.sublinks}>
+ <a class="menuSub" href="<{$sublink.url}>"><{$sublink.name}></a>
+ <{/foreach}>
+ <{/foreach}>
+ <!-- end module menu loop -->
+ </td>
+ </tr>
+</table>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_mainmenu.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_newusers.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_newusers.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_newusers.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,13 @@
+<table cellspacing="1" class="outer">
+ <{foreach item=user from=$block.users}>
+ <tr class="<{cycle values="even,odd"}>" valign="middle">
+ <td align="center">
+ <{if $user.avatar != ""}>
+ <img src="<{$user.avatar}>" alt="" width="32" /><br />
+ <{/if}>
+ <a href="<{$xoops_url}>/userinfo.php?uid=<{$user.id}>"><{$user.name}></a>
+ </td>
+ <td align="center"><{$user.joindate}></td>
+ </tr>
+ <{/foreach}>
+</table>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_newusers.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_notification.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_notification.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_notification.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,20 @@
+<form action="<{$block.target_page}>" method="post">
+<table class="outer">
+ <{foreach item=category from=$block.categories}>
+ <{foreach name=inner item=event from=$category.events}>
+ <{if $smarty.foreach.inner.first}>
+ <tr>
+ <td class="head" colspan="2"><{$category.title}></td>
+ </tr>
+ <{/if}>
+ <tr>
+ <td class="odd"><{counter assign=index}><input type="hidden" name="not_list[<{$index}>][params]" value="<{$category.name}>,<{$category.itemid}>,<{$event.name}>" /><input type="checkbox" name="not_list[<{$index}>][status]" value="1" <{if $event.subscribed}>checked="checked"<{/if}> /></td>
+ <td class="odd"><{$event.caption}></td>
+ </tr>
+ <{/foreach}>
+ <{/foreach}>
+ <tr>
+ <td class="foot" colspan="2"><input type="hidden" name="not_redirect" value="<{$block.redirect_script}>"><input type="hidden" value="<{$block.notification_token}>" name="XOOPS_TOKEN_REQUEST" /><input type="submit" name="not_submit" value="<{$block.submit_button}>" /></td>
+ </tr>
+</table>
+</form>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_notification.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_online.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_online.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_online.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+<{$block.online_total}><br /><br /><{$block.lang_members}>: <{$block.online_members}><br /><{$block.lang_guests}>: <{$block.online_guests}><br /><br /><{$block.online_names}> <a href="javascript:openWithSelfMain('<{$xoops_url}>/misc.php?action=showpopups&type=online','Online',420,350);"><{$block.lang_more}></a>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_online.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_search.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_search.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_search.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,7 @@
+<form class="search_block" action="<{$xoops_url}>/search.php" method="get">
+ <input type="text" name="query" size="14" /><input type="hidden" name="action" value="results" /><br /><input class="formbutton" type="submit" value="<{$block.lang_search}>" />
+ <{if $block.modid > 1}>
+ <input type="hidden" name="mids[]" value="<{$block.modid}>" />
+ <{/if}>
+</form>
+<a href="<{$xoops_url}>/search.php"><{$block.lang_advsearch}></a>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_search.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_siteinfo.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_siteinfo.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_siteinfo.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,28 @@
+<table class="outer" cellspacing="0">
+
+ <{if $block.showgroups == true}>
+
+ <!-- start group loop -->
+ <{foreach item=group from=$block.groups}>
+ <tr>
+ <th colspan="2"><{$group.name}></th>
+ </tr>
+
+ <!-- start group member loop -->
+ <{foreach item=user from=$group.users}>
+ <tr>
+ <td class="even" valign="middle" align="center"><img src="<{$user.avatar}>" alt="" width="32" /><br /><a href="<{$xoops_url}>/userinfo.php?uid=<{$user.id}>"><{$user.name}></a></td><td class="odd" width="20%" align="right" valign="middle"><{$user.msglink}></td>
+ </tr>
+ <{/foreach}>
+ <!-- end group member loop -->
+
+ <{/foreach}>
+ <!-- end group loop -->
+ <{/if}>
+</table>
+
+<br />
+
+<div style="margin: 3px; text-align:center;">
+ <img src="<{$block.logourl}>" alt="" border="0" /><br /><{$block.recommendlink}>
+</div>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_siteinfo.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_themes.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_themes.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_themes.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,5 @@
+<div style="text-align: center;">
+<form action="index.php" method="post">
+<{$block.theme_select}>
+</form>
+</div>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_themes.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_topusers.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_topusers.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_topusers.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,14 @@
+<table cellspacing="1" class="outer">
+ <{foreach item=user from=$block.users}>
+ <tr class="<{cycle values="even,odd"}>" valign="middle">
+ <td><{$user.rank}></td>
+ <td align="center">
+ <{if $user.avatar != ""}>
+ <img src="<{$user.avatar}>" alt="" width="32" /><br />
+ <{/if}>
+ <a href="<{$xoops_url}>/userinfo.php?uid=<{$user.id}>"><{$user.name}></a>
+ </td>
+ <td align="center"><{$user.posts}></td>
+ </tr>
+ <{/foreach}>
+</table>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_topusers.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_user.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_user.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_user.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,16 @@
+<table cellspacing="0">
+ <tr>
+ <td id="usermenu">
+ <a class="menuTop" href="<{$xoops_url}>/user.php"><{$block.lang_youraccount}></a>
+ <a href="<{$xoops_url}>/edituser.php"><{$block.lang_editaccount}></a>
+ <{if $block.lang_inbox}>
+ <a href="<{$xoops_url}>/modules/pm/"><{$block.lang_inbox}></a>
+ <{/if}>
+ <a href="<{$xoops_url}>/notifications.php"><{$block.lang_notifications}></a>
+ <a href="<{$xoops_url}>/user.php?op=logout"><{$block.lang_logout}></a>
+ <{if $block.admin}>
+ <a href="<{$xoops_url}>/admin.php"><{$block.lang_adminmenu}></a>
+ <{/if}>
+ </td>
+ </tr>
+</table>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_user.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_waiting.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_waiting.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_waiting.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,5 @@
+<ul>
+ <{foreach item=module from=$block.modules}>
+ <li><a href="<{$module.adminlink}>"><{$module.lang_linkname}></a>: <{$module.pendingnum}></li>
+ <{/foreach}>
+</ul>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/blocks/system_block_waiting.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_admin_block.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_admin_block.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_admin_block.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,63 @@
+<h4 style='text-align:left;'><{$smarty.const._AM_BADMIN}></h4>
+
+<div>
+ <form name="<{$newform.name}>" id="<{$newform.name}>" action="<{$newform.action}>" method="<{$newform.method}>" <{$newform.extra}> >
+ <{foreach item=element from=$newform.elements}>
+ <{if $element.hidden != true}>
+ <{$element.caption}> <{$element.body}>
+ <{else}>
+ <{$element.body}>
+ <{/if}>
+ <{/foreach}>
+ </form>
+</div>
+
+<form name="<{$blockform.name}>" id="<{$blockform.name}>" action="<{$blockform.action}>" method="<{$blockform.method}>" <{$blockform.extra}> >
+ <table width='100%' class='outer' cellpadding='4' cellspacing='1'>
+ <tr valign='middle'>
+ <th width='20%'><{$smarty.const._AM_BLKDESC}></th>
+ <th><{$smarty.const._AM_TITLE}></th>
+ <th><{$smarty.const._AM_MODULE}></th>
+ <th align='center'><{$smarty.const._AM_SIDE}></th>
+ <th align='center'><{$smarty.const._AM_WEIGHT}></th>
+ <th align='center'><{$smarty.const._AM_VISIBLEIN}></th>
+ <th align='right'><{$smarty.const._AM_ACTION}></th>
+ </tr>
+
+ <{foreach item=instance from=$instances}>
+ <tr valign='top' class='<{cycle values="odd, even"}>'>
+ <td><{$instance.title}></td>
+ <td><{$instance.block_name}></td>
+ <td><{$instance.module_name}></td>
+ <td>
+ <select name="side[<{$instance.instanceid}>]">
+ <{html_options options=$side_options selected=$instance.side}>
+ </select>
+ </td>
+ <td align='center'>
+ <input type='text' name='weight[<{$instance.instanceid}>]' value='<{$instance.weight}>' size='5' maxlength='5' />
+ </td>
+ <td align='center'>
+ <select name="module[<{$instance.instanceid}>][]" multiple="multiple" size="8">
+ <{html_options options=$module_options selected=$instance.visiblein}>
+ </select>
+ </td>
+ <td align='right'><a href='admin.php?fct=blocksadmin&op=edit&id=<{$instance.instanceid}>&selmod=<{$selmod}>'><{$smarty.const._EDIT}></a>
+ <a href='admin.php?fct=blocksadmin&op=delete&id=<{$instance.instanceid}>&selmod=<{$selmod}>'><{$smarty.const._DELETE}></a>
+ </td>
+ </tr>
+ <{/foreach}>
+
+ <tr>
+ <td class='foot' align='center' colspan='7'>
+ <{foreach item=element from=$blockform.elements}>
+ <{if $element.hidden != true}>
+ <{$element.caption}> <{$element.body}>
+ <{else}>
+ <{$element.body}>
+ <{/if}>
+ <{/foreach}>
+ </td>
+ </tr>
+ </table>
+</form>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_admin_block.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comment.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comment.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comment.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,36 @@
+<div class="comContainer">
+ <div class="com_tl"><div class="com_tr"><div class="com_br"><div class="com_bl">
+ <h2 class="comTitle"><a id="comment<{$comment.id}>"></a><{$comment.image}><{$comment.title}></h2>
+ <div class="comIcons">
+ <{if $xoops_iscommentadmin == true}>
+ <a href="<{$editcomment_link}>&com_id=<{$comment.id}>"><img src="<{$xoops_url}>/themes/default/images/edit_small.gif" width="16" height="16" alt="<{$lang_edit}>" title="<{$lang_edit}>" /></a> <a href="<{$deletecomment_link}>&com_id=<{$comment.id}>"><img src="<{$xoops_url}>/themes/default/images/delete_small.gif" width="16" height="16" alt="<{$lang_delete}>" title="<{$lang_delete}>" /></a> <a href="<{$replycomment_link}>&com_id=<{$comment.id}>"><img src="<{$xoops_url}>/themes/default/images/reply_small.gif" width="16" height="16" alt="<{$lang_reply}>" title="<{$lang_reply}>" /></a>
+ <{elseif $xoops_isuser == true && $xoops_userid == $comment.poster.id}>
+ <a href="<{$editcomment_link}>&com_id=<{$comment.id}>"><img src="<{$xoops_url}>/themes/default/images/edit_small.gif" width="16" height="16" alt="<{$lang_edit}>" /></a>
+ <a href="<{$replycomment_link}>&com_id=<{$comment.id}>"><img src="<{$xoops_url}>/themes/default/images/reply_small.gif" width="16" height="16" alt="<{$lang_reply}>" /></a>
+ <{elseif $xoops_isuser == true || $anon_canpost == true}>
+ <a href="<{$replycomment_link}>&com_id=<{$comment.id}>"><img src="<{$xoops_url}>/themes/default/images/reply_small.gif" width="16" height="16" alt="<{$lang_reply}>" /></a>
+ <{/if}>
+ </div>
+
+ <div>
+ <span class="comDateCaption"><{$lang_posted}>:</span> <{$comment.date_posted}> <span class="comDateCaption"><{$lang_updated}>:</span> <{$comment.date_modified}>
+ </div>
+
+ <{if $comment.poster.id != 0}>
+ <div class="comUserdetails">
+ <img class="comUserImg" src="<{$xoops_upload_url}>/<{$comment.poster.avatar}>" alt="" /><br />
+ <span class="comUserName"><{$comment.poster.uname}></span><br />
+ <img class="comUserRankImg" src="<{$xoops_upload_url}>/<{$comment.poster.rank_image}>" alt="" /><br />
+ <span class="comUserName"><{$comment.poster.rank_title}></span><br />
+ <span class="comUserStatCaption"><{$lang_joined}>:</span> <{$comment.poster.regdate}><br />
+ <span class="comUserStatCaption"><{$lang_from}>:</span> <{$comment.poster.from}><br />
+ <span class="comUserStatCaption"><{$lang_posts}>:</span> <{$comment.poster.postnum}><br />
+ <span class="comUserStatus"><{$comment.poster.status}></span>
+ </div>
+ <{/if}>
+
+ <div class="comText">
+ <{$comment.text}>
+ </div>
+
+</div></div></div></div></div>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comment.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comments_flat.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comments_flat.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comments_flat.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,9 @@
+<table cellpadding="1" cellspacing="4">
+<tr>
+<td>
+ <{foreach item=comment from=$comments}>
+ <{include file="db:system_comment.html" comment=$comment}>
+ <{/foreach}>
+</td>
+</tr>
+</table>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comments_flat.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comments_nest.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comments_nest.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comments_nest.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,30 @@
+<{section name=i loop=$comments}>
+<br />
+<table cellspacing="1">
+ <tr>
+ <td>
+ <{include file="db:system_comment.html" comment=$comments[i]}>
+ </td>
+</tr>
+</table>
+
+<!-- start comment replies -->
+<{foreach item=reply from=$comments[i].replies}>
+<br />
+<table cellspacing="0" border="0">
+ <tr>
+ <td width="<{$reply.prefix}>"></td>
+ <td>
+ <table cellspacing="1">
+ <tr>
+ <td>
+ <{include file="db:system_comment.html" comment=$reply}>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<{/foreach}>
+<!-- end comment tree -->
+<{/section}>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comments_nest.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comments_thread.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comments_thread.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comments_thread.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,37 @@
+<{section name=i loop=$comments}>
+<br />
+<table cellspacing="1">
+ <tr>
+ <td>
+ <{include file="db:system_comment.html" comment=$comments[i]}>
+ </td>
+</tr>
+</table>
+
+<{if $show_threadnav == true}>
+<div style="text-align:left; margin:3px; padding: 5px;">
+<a href="<{$comment_url}>"><{$lang_top}></a> | <a href="<{$comment_url}>&com_id=<{$comments[i].pid}>&com_rootid=<{$comments[i].rootid}>#newscomment<{$comments[i].pid}>"><{$lang_parent}></a>
+</div>
+<{/if}>
+
+<{if $comments[i].show_replies == true}>
+<!-- start comment tree -->
+<br />
+<table cellspacing="1" class="outer" width="90%">
+ <tr>
+ <th width="50%"><{$lang_subject}></th>
+ <th width="20%" align="center"><{$lang_poster}></th>
+ <th align="right"><{$lang_posted}></th>
+ </tr>
+ <{foreach item=reply from=$comments[i].replies}>
+ <tr>
+ <td class="even"><{$reply.prefix}> <a href="<{$comment_url}>&com_id=<{$reply.id}>&com_rootid=<{$reply.root_id}>"><{$reply.title}></a></td>
+ <td class="odd" align="center"><{$reply.poster.uname}></td>
+ <td class="even" align="right"><{$reply.date_posted}></td>
+ </tr>
+ <{/foreach}>
+</table>
+<!-- end comment tree -->
+<{/if}>
+
+<{/section}>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_comments_thread.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_dummy.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_dummy.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_dummy.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+<{$dummy_content}>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_dummy.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_error.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_error.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_error.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+<div class="errorPage"><{$errormsg}></div>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_error.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_imagemanager.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_imagemanager.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_imagemanager.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,112 @@
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
+<meta http-equiv="content-language" content="<{$xoops_langcode}>" />
+<title><{$sitename}> <{$lang_imgmanager}></title>
+<!--
+define the function in each wysiwyg editor
+function XoopsEditor_InsertImage(id,src,alt,align)
+{
+ return editor_InsertImage(id,src,alt,align);
+}
+-->
+<script type="text/javascript">
+<!--//
+var wysiwyg=<{$wysiwyg}>;
+function appendCode(addCode) {
+ if(wysiwyg==1){
+ var cmd = "window.opener.XoopsEditor_InsertImage('<{$target}>',"+addCode+")";
+ eval(cmd);
+ }else{
+ var targetDom = window.opener.xoopsGetElementById('<{$target}>');
+ if (targetDom.createTextRange && targetDom.caretPos){
+ var caretPos = targetDom.caretPos;
+ caretPos.text = caretPos.text.charAt(caretPos.text.length - 1)
+ == ' ' ? addCode + ' ' : addCode;
+ } else if (targetDom.getSelection && targetDom.caretPos){
+ var caretPos = targetDom.caretPos;
+ caretPos.text = caretPos.text.charat(caretPos.text.length - 1)
+ == ' ' ? addCode + ' ' : addCode;
+ } else {
+ targetDom.value = targetDom.value + addCode;
+ }
+ }
+ window.close();
+ return;
+}
+//-->
+</script>
+<style type="text/css" media="all">
+body {margin: 0;}
+img {border: 0;}
+table {width: 100%; margin: 0;}
+a:link {color: #3a76d6; font-weight: bold; background-color: transparent;}
+a:visited {color: #9eb2d6; font-weight: bold; background-color: transparent;}
+a:hover {color: #e18a00; background-color: transparent;}
+table td {background-color: white; font-size: 12px; padding: 0; border-width: 0; vertical-align: top; font-family: Verdana, Arial, Helvetica, sans-serif;}
+table#imagenav td {vertical-align: bottom; padding: 5px;}
+table#imagemain td {border-right: 1px solid silver; border-bottom: 1px solid silver; padding: 5px; vertical-align: middle;}
+table#imagemain th {border: 0; background-color: #2F5376; color:white; font-size: 12px; padding: 5px; vertical-align: top; text-align:center; font-family: Verdana, Arial, Helvetica, sans-serif;}
+table#header td {width: 100%; background-color: #2F5376; vertical-align: middle;}
+table#header td#headerbar {border-bottom: 1px solid silver; background-color: #dddddd;}
+div#pagenav {text-align:center;}
+div#footer {text-align:right; padding: 5px;}
+</style>
+</head>
+
+<body onload="window.resizeTo(<{$xsize}>, <{$ysize}>);">
+ <table id="header" cellspacing="0">
+ <tr>
+ <td><a href="<{$xoops_url}>/"><img src="<{$xoops_url}>/images/logo.gif" width="150" height="80" alt="" /></a></td><td> </td>
+ </tr>
+ <tr>
+ <td id="headerbar" colspan="2"> </td>
+ </tr>
+ </table>
+
+ <form action="imagemanager.php" method="get">
+ <table cellspacing="0" id="imagenav">
+ <tr>
+ <td>
+ <select name="cat_id" onchange="location='<{$xoops_url}>/imagemanager.php?target=<{$target}>&cat_id='+this.options[this.selectedIndex].value+'&wysiwyg=<{$wysiwyg}>'"><{$cat_options}></select> <input type="hidden" name="target" value="<{$target}>" /><input type="submit" value="<{$lang_go}>" />
+ </td>
+
+ <{if $show_cat > 0}>
+ <td align="right"><a href="<{$xoops_url}>/imagemanager.php?target=<{$target}>&op=upload&imgcat_id=<{$show_cat}>&wysiwyg=<{$wysiwyg}>"><{$lang_addimage}></a></td>
+ <{/if}>
+
+ </tr>
+ </table>
+ </form>
+
+ <{if $image_total > 0}>
+
+ <table cellspacing="0" id="imagemain">
+ <tr>
+ <th><{$lang_imagename}></th>
+ <th><{$lang_image}></th>
+ <th><{$lang_imagemime}></th>
+ <th><{$lang_align}></th>
+ </tr>
+
+ <{section name=i loop=$images}>
+ <tr align="center">
+ <td><input type="hidden" name="image_id[]" value="<{$images[i].id}>" /><{$images[i].nicename}></td>
+ <td><img src="<{$images[i].src}>" alt="" /></td>
+ <td><{$images[i].mimetype}></td>
+ <td><a href="#" onclick='javascript:appendCode("<{$images[i].lxcode}>");'><img src="<{$xoops_url}>/images/alignleft.gif" alt="Left" /></a> <a href="#" onclick='javascript:appendCode("<{$images[i].xcode}>");'><img src="<{$xoops_url}>/images/aligncenter.gif" alt="Center" /></a> <a href="#" onclick='javascript:appendCode("<{$images[i].rxcode}>");'><img src="<{$xoops_url}>/images/alignright.gif" alt="Right" /></a></td>
+ </tr>
+ <{/section}>
+ </table>
+
+ <{/if}>
+
+ <div id="pagenav"><{$pagenav}></div>
+
+ <div id="footer">
+ <input value="<{$lang_close}>" type="button" onclick="javascript:window.close();" />
+ </div>
+
+ </body>
+</html>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_imagemanager.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_imagemanager2.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_imagemanager2.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_imagemanager2.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,65 @@
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
+<meta http-equiv="content-language" content="<{$xoops_langcode}>" />
+<title><{$xoops_sitename}> <{$lang_imgmanager}></title>
+<{$image_form.javascript}>
+<style type="text/css" media="all">
+body {margin: 0;}
+img {border: 0;}
+table {width: 100%; margin: 0;}
+a:link {color: #3a76d6; font-weight: bold; background-color: transparent;}
+a:visited {color: #9eb2d6; font-weight: bold; background-color: transparent;}
+a:hover {color: #e18a00; background-color: transparent;}
+table td {background-color: white; font-size: 12px; padding: 0; border-width: 0; vertical-align: top; font-family: Verdana, Arial, Helvetica, sans-serif;}
+table#imagenav td {vertical-align: bottom; padding: 5px;}
+td.body {padding: 5px; vertical-align: middle;}
+td.caption {border: 0; background-color: #2F5376; color:white; font-size: 12px; padding: 5px; vertical-align: top; text-align:left; font-family: Verdana, Arial, Helvetica, sans-serif;}
+table#imageform {border: 1px solid silver;}
+table#header td {width: 100%; background-color: #2F5376; vertical-align: middle;}
+table#header td#headerbar {border-bottom: 1px solid silver; background-color: #dddddd;}
+div#footer {text-align:right; padding: 5px;}
+</style>
+</head>
+
+<body onload="window.resizeTo(<{$xsize}>, <{$ysize}>);">
+ <table id="header" cellspacing="0">
+ <tr>
+ <td><a href="<{$xoops_url}>/"><img src="<{$xoops_url}>/images/logo.gif" width="150" height="80" alt="" /></a></td><td> </td>
+ </tr>
+ <tr>
+ <td id="headerbar" colspan="2"> </td>
+ </tr>
+ </table>
+
+ <table cellspacing="0" id="imagenav">
+ <tr>
+ <td align="left"><a href="<{$xoops_url}>/imagemanager.php?target=<{$target}>&cat_id=<{$show_cat}>"><{$lang_imgmanager}></a></td>
+ </tr>
+ </table>
+
+ <form name="<{$image_form.name}>" id="<{$image_form.name}>" action="<{$image_form.action}>" method="<{$image_form.method}>" <{$image_form.extra}>>
+ <table id="imageform" cellspacing="0">
+ <!-- start of form elements loop -->
+ <{foreach item=element from=$image_form.elements}>
+ <{if $element.hidden != true}>
+ <tr valign="top">
+ <td class="caption"><{$element.caption}></td>
+ <td class="body"><{$element.body}></td>
+ </tr>
+ <{else}>
+ <{$element.body}>
+ <{/if}>
+ <{/foreach}>
+ <!-- end of form elements loop -->
+ </table>
+ </form>
+
+
+ <div id="footer">
+ <input value="<{$lang_close}>" type="button" onclick="javascript:window.close();" />
+ </div>
+
+ </body>
+</html>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_imagemanager2.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_notification_list.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_notification_list.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_notification_list.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,40 @@
+<h4><{$lang_activenotifications}></h4>
+<form name="notificationlist" action="notifications.php" method="post">
+<table class="outer">
+ <tr>
+ <th><input name="allbox" id="allbox" onclick="xoopsCheckGroup('notificationlist', 'allbox', 'del_mod[]');" type="checkbox" value="<{$lang_checkall}>" /></th>
+ <th><{$lang_event}></th>
+ <th><{$lang_category}></th>
+ <th><{$lang_itemid}></th>
+ <th><{$lang_itemname}></th>
+ </tr>
+ <{foreach item=module from=$modules}>
+ <tr>
+ <td class="head"><input name="del_mod[<{$module.id}>]" id="del_mod[]" onclick="xoopsCheckGroup('notificationlist', 'del_mod[<{$module.id}>]', 'del_not[<{$module.id}>][]');" type="checkbox" value="<{$module.id}>" /></td>
+ <td class="head" colspan="4"><{$lang_module}>: <{$module.name}></td>
+ </tr>
+ <{foreach item=category from=$module.categories}>
+ <{foreach item=item from=$category.items}>
+ <{foreach item=notification from=$item.notifications}>
+ <tr>
+ <{cycle values=odd,even assign=class}>
+ <td class="<{$class}>"><input type="checkbox" name="del_not[<{$module.id}>][]" id="del_not[<{$module.id}>][]" value="<{$notification.id}>" /></td>
+ <td class="<{$class}>"><{$notification.event_title}></td>
+ <td class="<{$class}>"><{$notification.category_title}></td>
+ <td class="<{$class}>"><{if $item.id != 0}><{$item.id}><{/if}></td>
+ <td class="<{$class}>"><{if $item.id != 0}><{if $item.url != ''}><a href="<{$item.url}>"><{/if}><{$item.name}><{if $item.url != ''}></a><{/if}><{/if}></td>
+ </tr>
+ <{/foreach}>
+ <{/foreach}>
+ <{/foreach}>
+ <{/foreach}>
+ <tr>
+ <td class="foot" colspan="5">
+ <input class="formbutton" type="submit" name="delete_cancel" value="<{$lang_cancel}>" />
+ <input class="formbutton" type="reset" name="delete_reset" value="<{$lang_clear}>" />
+ <input class="formbutton" type="submit" name="delete" value="<{$lang_delete}>" />
+ <input type="hidden" name="XOOPS_TOKEN_REQUEST" value="<{$notification_token}>" />
+ </td>
+ </tr>
+</table>
+</form>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_notification_list.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_notification_select.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_notification_select.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_notification_select.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,41 @@
+<{if $xoops_notification.show}>
+<h4 class="centered">
+
+<img id="swap" src="<{$xoops_url}>/themes/default/images/plus.gif" onClick="toggle('notifs_form');swapimage('swap');" />
+
+<{$lang_notificationoptions}></h4>
+
+<form name="notification_select" id="notifs_form" action="<{$xoops_notification.target_page}>" method="post">
+<input type="hidden" name="not_redirect" value="<{$xoops_notification.redirect_script}>" />
+<{$xoops_notification.token}>
+<table class="outer">
+ <tr><th colspan="3"><{$lang_notificationoptions}></th></tr>
+ <tr>
+ <td class="head"><{$lang_category}></td>
+ <td class="head"><input name="allbox" id="allbox" onclick="xoopsCheckAll('notification_select','allbox');" type="checkbox" value="<{$lang_checkall}>" /></td>
+ <td class="head"><{$lang_events}></td>
+ </tr>
+ <{foreach name=outer item=category from=$xoops_notification.categories}>
+ <{foreach name=inner item=event from=$category.events}>
+ <tr>
+ <{if $smarty.foreach.inner.first}>
+ <td class="even" rowspan="<{$smarty.foreach.inner.total}>"><{$category.title}></td>
+ <{/if}>
+ <td class="odd">
+ <{counter assign=index}>
+ <input type="hidden" name="not_list[<{$index}>][params]" value="<{$category.name}>,<{$category.itemid}>,<{$event.name}>" />
+ <input type="checkbox" id="not_list_<{$index}>" name="not_list[<{$index}>][status]" value="1" <{if $event.subscribed}>checked="checked"<{/if}> />
+ </td>
+ <td class="odd"><{$event.caption}></td>
+ </tr>
+ <{/foreach}>
+ <{/foreach}>
+ <tr>
+ <td class="foot" colspan="3"><input class="formbutton" type="submit" name="not_submit" value="<{$lang_updatenow}>" /></td>
+ </tr>
+</table>
+<div class="centered">
+<{$lang_notificationmethodis}>: <{$user_method}> [<a href="<{$editprofile_url}>"><{$lang_change}></a>]
+</div>
+</form>
+<{/if}>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_notification_select.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_plain.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_plain.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_plain.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
+<meta http-equiv="content-language" content="<{$xoops_langcode}>" />
+<meta name="robots" content="<{$xoops_meta_robots}>" />
+<meta name="keywords" content="<{$xoops_meta_keywords}>" />
+<meta name="description" content="<{$xoops_meta_description}>" />
+<meta name="rating" content="<{$xoops_meta_rating}>" />
+<meta name="author" content="<{$xoops_meta_author}>" />
+<meta name="copyright" content="<{$xoops_meta_copyright}>" />
+<meta name="generator" content="XOOPS" />
+<title><{$xoops_sitename}> - <{$xoops_pagetitle}></title>
+<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_url}>/xoops.css" />
+<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_themecss}>" />
+<!-- RMV: added module header -->
+<{$xoops_module_header}>
+<script type="text/javascript">
+<!--
+<{$xoops_js}>
+//-->
+</script>
+</head>
+<body>
+ <div id="content">
+ <{$xoops_contents}>
+ </div>
+</body>
+</html>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_plain.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_redirect.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_redirect.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_redirect.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,4 @@
+<div style="text-align:center; background-color: transparent; border-top: 0px solid #FFFFFF; border-left: 0px solid #FFFFFF; border-right: 0px solid #AAAAAA; border-bottom: 0px solid #AAAAAA; font-weight : bold;">
+ <h4><{$message}></h4>
+ <p><{$lang_ifnotreload}></p>
+</div>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_redirect.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_rss.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_rss.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_rss.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<{if $xoops_rsscss}>
+ <?xml-stylesheet type="text/css" href="<{$xoops_themecss}>"?>
+<{/if}>
+<rss version="2.0">
+ <channel>
+ <title><{$channel_title}></title>
+ <link><{$channel_link}></link>
+ <description><{$channel_desc}></description>
+ <lastBuildDate><{$channel_lastbuild}></lastBuildDate>
+ <docs>http://backend.userland.com/rss/</docs>
+ <generator><{$channel_generator}></generator>
+ <category><{$channel_category}></category>
+ <managingEditor><{$channel_editor}></managingEditor>
+ <webMaster><{$channel_webmaster}></webMaster>
+ <language><{$channel_language}></language>
+ <{if $image_url != ""}>
+ <image>
+ <title><{$channel_title}></title>
+ <url><{$image_url}></url>
+ <link><{$channel_link}></link>
+ <width><{$image_width}></width>
+ <height><{$image_height}></height>
+ </image>
+ <{/if}>
+ <{foreach item=item from=$items}>
+ <item>
+ <title><{$item.title}></title>
+ <link><{$item.link}></link>
+ <description><{$item.description}></description>
+ <pubDate><{$item.pubdate}></pubDate>
+ <guid><{$item.guid}></guid>
+ </item>
+ <{/foreach}>
+ </channel>
+</rss>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_rss.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_siteclosed.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_siteclosed.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_siteclosed.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,21 @@
+<table cellspacing="1" align="center" width="80%" border="0" cellpadding="10px;">
+ <tr>
+ <td align="center"><div style="background-color: #DDFFDF; color: #136C99; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold; padding: 10px;"><{$lang_siteclosemsg}></div></td>
+ </tr>
+ </table>
+
+ <form action="<{$xoops_url}>/user.php" method="post">
+ <table cellspacing="0" align="center" style="border: 0px solid silver; width: 200px;">
+ <tr>
+ <td>
+ <fieldset style="padding: 10px;border: 1px solid #aca899;">
+ <legend style="font-weight: bold;"><{$lang_login}></legend>
+ <{$lang_username}> <input type="text" name="uname" size="21" maxlength="25" value="<{$usercookie}>" /><br />
+ <{$lang_password}> <input type="password" name="pass" size="21" maxlength="32" /><br />
+ <input type="hidden" name="xoops_login" value="1" />
+ <input class="formbutton" type="submit" value="<{$lang_login}>" />
+ </fieldset>
+ </td>
+ </tr>
+ </table>
+ </form>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_siteclosed.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_userform.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_userform.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_userform.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,24 @@
+<fieldset style="padding: 10px;">
+ <legend style="font-weight: bold;"><{$lang_login}></legend>
+ <form action="user.php" method="post">
+ <{$lang_username}> <input type="text" name="uname" size="26" maxlength="25" value="<{$usercookie}>" /><br />
+ <{$lang_password}> <input type="password" name="pass" size="21" maxlength="32" /><br />
+ <input type="hidden" name="op" value="login" />
+ <input type="hidden" name="xoops_redirect" value="<{$redirect_page}>" />
+ <input type="submit" value="<{$lang_login}>" />
+ </form>
+ <a name="lost"></a>
+ <div><{$lang_notregister}><br /></div>
+</fieldset>
+
+<br />
+
+<fieldset style="padding: 10px;">
+ <legend style="font-weight: bold;"><{$lang_lostpassword}></legend>
+ <div><br /><{$lang_noproblem}></div>
+ <form action="<{$xoops_url}>/lostpass.php" method="post">
+ <{$lang_youremail}> <input type="text" name="email" size="26" maxlength="60" /> <input type="hidden" name="op" value="mailpasswd" /><input type="hidden" name="t" value="<{$mailpasswd_token}>" /><input type="submit" value="<{$lang_sendpassword}>" />
+ </form>
+</fieldset>
+<br />
+<a href="<{$xoops_url}>/modules/profile/activate.php" title="<{$smarty.const._US_RESENDACTIVATIONMAIL}>"><{$smarty.const._US_RESENDACTIVATIONMAIL}></a>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_userform.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_userinfo.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_userinfo.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_userinfo.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,168 @@
+<{if $user_ownpage == true}>
+
+<form name="usernav" action="user.php" method="post">
+
+<br /><br />
+
+<table width="70%" align="center" border="0">
+ <tr align="center">
+ <td><input type="button" value="<{$lang_editprofile}>" onclick="location='edituser.php'" />
+ <input type="button" value="<{$lang_avatar}>" onclick="location='edituser.php?op=avatarform'" />
+ <input type="button" value="<{$lang_inbox}>" onclick="location='viewpmsg.php'" />
+
+ <{if $user_candelete == true}>
+ <input type="button" value="<{$lang_deleteaccount}>" onclick="location='user.php?op=delete'" />
+ <{/if}>
+
+ <input type="button" value="<{$lang_logout}>" onclick="location='user.php?op=logout'" /></td>
+ </tr>
+</table>
+</form>
+
+<br /><br />
+<{elseif $xoops_isadmin != false}>
+
+<br /><br />
+
+<table width="70%" align="center" border="0">
+ <tr align="center">
+ <td><input type="button" value="<{$lang_editprofile}>" onclick="location='<{$xoops_url}>/modules/system/admin.php?fct=users&uid=<{$user_uid}>&op=modifyUser'" />
+ <input type="button" value="<{$lang_deleteaccount}>" onclick="location='<{$xoops_url}>/modules/system/admin.php?fct=users&op=delUser&uid=<{$user_uid}>'" />
+ </tr>
+</table>
+
+<br /><br />
+<{/if}>
+
+<table width="100%" border="0" cellspacing="5">
+ <tr valign="top">
+ <td width="50%">
+ <table class="outer" cellpadding="4" cellspacing="1" width="100%">
+ <tr>
+ <th colspan="2" align="center"><{$lang_allaboutuser}></th>
+ </tr>
+ <tr valign="top">
+ <td class="head"><{$lang_avatar}></td>
+ <td align="center" class="even"><img src="<{$user_avatarurl}>" alt="Avatar" /></td>
+ </tr>
+ <tr>
+ <td class="head"><{$lang_realname}></td>
+ <td align="center" class="odd"><{$user_realname}></td>
+ </tr>
+ <tr>
+ <td class="head"><{$lang_website}></td>
+ <td class="even"><{$user_websiteurl}></td>
+ </tr>
+ <tr valign="top">
+ <td class="head"><{$lang_email}></td>
+ <td class="odd"><{$user_email}></td>
+ </tr>
+ <tr valign="top">
+ <td class="head"><{$lang_privmsg}></td>
+ <td class="even"><{$user_pmlink}></td>
+ </tr>
+ <tr valign="top">
+ <td class="head"><{$lang_icq}></td>
+ <td class="odd"><{$user_icq}></td>
+ </tr>
+ <tr valign="top">
+ <td class="head"><{$lang_aim}></td>
+ <td class="even"><{$user_aim}></td>
+ </tr>
+ <tr valign="top">
+ <td class="head"><{$lang_yim}></td>
+ <td class="odd"><{$user_yim}></td>
+ </tr>
+ <tr valign="top">
+ <td class="head"><{$lang_msnm}></td>
+ <td class="even"><{$user_msnm}></td>
+ </tr>
+ <tr valign="top">
+ <td class="head"><{$lang_location}></td>
+ <td class="odd"><{$user_location}></td>
+ </tr>
+ <tr valign="top">
+ <td class="head"><{$lang_occupation}></td>
+ <td class="even"><{$user_occupation}></td>
+ </tr>
+ <tr valign="top">
+ <td class="head"><{$lang_interest}></td>
+ <td class="odd"><{$user_interest}></td>
+ </tr>
+ <tr valign="top">
+ <td class="head"><{$lang_extrainfo}></td>
+ <td class="even"><{$user_extrainfo}></td>
+ </tr>
+ </table>
+ </td>
+ <td width="50%">
+ <table class="outer" cellpadding="4" cellspacing="1" width="100%">
+ <tr valign="top">
+ <th colspan="2" align="center"><{$lang_statistics}></th>
+ </tr>
+ <tr valign="top">
+ <td class="head"><{$lang_membersince}></td>
+ <td align="center" class="even"><{$user_joindate}></td>
+ </tr>
+ <tr valign="top">
+ <td class="head"><{$lang_rank}></td>
+ <td align="center" class="odd"><{$user_rankimage}><br /><{$user_ranktitle}></td>
+ </tr>
+ <tr valign="top">
+ <td class="head"><{$lang_posts}></td>
+ <td align="center" class="even"><{$user_posts}></td>
+ </tr>
+ <tr valign="top">
+ <td class="head"><{$lang_lastlogin}></td>
+ <td align="center" class="odd"><{$user_lastlogin}></td>
+ </tr>
+ </table>
+ <br />
+ <table class="outer" cellpadding="4" cellspacing="1" width="100%">
+ <tr valign="top">
+ <th colspan="2" align="center"><{$lang_signature}></th>
+ </tr>
+ <tr valign="top">
+ <td class="even"><{$user_signature}></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+
+<{if $fields}>
+ <table border="0" cellspacing="5">
+ <tr>
+ <td>
+ <table class="outer" cellpadding="4" cellspacing="1" width="100%">
+ <{foreach item=field from=$fields}>
+ <tr>
+ <td class="head"><{$field.title}></td>
+ <td class="even"><{$field.value}></td>
+ </tr>
+ <{/foreach}>
+ </table>
+ </td>
+ </tr>
+ </table>
+<{/if}>
+
+<!-- start module search results loop -->
+<{foreach item=module from=$modules}>
+
+<p>
+<h4><{$module.name}></h4>
+
+ <!-- start results item loop -->
+ <{foreach item=result from=$module.results}>
+
+ <img src="<{$result.image}>" alt="<{$module.name}>" /><b><a href="<{$result.link}>"><{$result.title}></a></b><br /><small>(<{$result.time}>)</small><br />
+
+ <{/foreach}>
+ <!-- end results item loop -->
+
+<{$module.showall_link}>
+</p>
+
+<{/foreach}>
+<!-- end module search results loop -->
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/templates/system_userinfo.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/xoops_version.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/modules/system/xoops_version.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/modules/system/xoops_version.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,907 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$modversion['name'] = _MI_SYSTEM_NAME;
+$modversion['version'] = 2.13;
+$modversion['description'] = _MI_SYSTEM_DESC;
+$modversion['author'] = "";
+$modversion['credits'] = "The XOOPS Project";
+$modversion['help'] = "system.html";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 1;
+$modversion['image'] = "images/system_slogo.png";
+$modversion['dirname'] = "system";
+
+// Admin things
+$modversion['hasAdmin'] = 1;
+$modversion['adminindex'] = "admin.php";
+$modversion['adminmenu'] = "menu.php";
+
+// Menu
+$modversion['hasMain'] = 0;
+
+//update things
+$modversion['onUpdate'] = 'include/update.php';
+
+// Templates
+$modversion['templates'][1]['file'] = 'system_imagemanager.html';
+$modversion['templates'][1]['description'] = '';
+$modversion['templates'][2]['file'] = 'system_imagemanager2.html';
+$modversion['templates'][2]['description'] = '';
+$modversion['templates'][3]['file'] = 'system_userinfo.html';
+$modversion['templates'][3]['description'] = '';
+$modversion['templates'][4]['file'] = 'system_userform.html';
+$modversion['templates'][4]['description'] = '';
+$modversion['templates'][5]['file'] = 'system_rss.html';
+$modversion['templates'][5]['description'] = '';
+$modversion['templates'][6]['file'] = 'system_redirect.html';
+$modversion['templates'][6]['description'] = '';
+$modversion['templates'][7]['file'] = 'system_comment.html';
+$modversion['templates'][7]['description'] = '';
+$modversion['templates'][8]['file'] = 'system_comments_flat.html';
+$modversion['templates'][8]['description'] = '';
+$modversion['templates'][9]['file'] = 'system_comments_thread.html';
+$modversion['templates'][9]['description'] = '';
+$modversion['templates'][10]['file'] = 'system_comments_nest.html';
+$modversion['templates'][10]['description'] = '';
+$modversion['templates'][11]['file'] = 'system_siteclosed.html';
+$modversion['templates'][11]['description'] = '';
+$modversion['templates'][12]['file'] = 'system_dummy.html';
+$modversion['templates'][12]['description'] = 'Dummy template file for holding non-template contents. This should not be edited.';
+$modversion['templates'][13]['file'] = 'system_notification_list.html';
+$modversion['templates'][13]['description'] = '';
+$modversion['templates'][14]['file'] = 'system_notification_select.html';
+$modversion['templates'][14]['description'] = '';
+//$modversion['templates'][15]['file'] = 'system_block_dummy.html';
+//$modversion['templates'][15]['description'] = 'Dummy template for custom blocks or blocks without templates';
+$modversion['templates'][16]['file'] = 'system_error.html';
+$modversion['templates'][16]['description'] = 'Template for error pages';
+$modversion['templates'][17]['file'] = 'system_plain.html';
+$modversion['templates'][17]['description'] = 'Plain template for displaying only page content (no logo, no banner, no blocks)';
+$modversion['templates'][18]['file'] = 'system_admin_block.html';
+$modversion['templates'][18]['description'] = 'Blocks Administration Template';
+
+// Blocks
+$modversion['blocks'][1]['file'] = "system_blocks.php";
+$modversion['blocks'][1]['name'] = _MI_SYSTEM_BNAME2;
+$modversion['blocks'][1]['description'] = "Shows user block";
+$modversion['blocks'][1]['show_func'] = "b_system_user_show";
+$modversion['blocks'][1]['template'] = 'system_block_user.html';
+
+$modversion['blocks'][2]['file'] = "system_blocks.php";
+$modversion['blocks'][2]['name'] = _MI_SYSTEM_BNAME3;
+$modversion['blocks'][2]['description'] = "Shows login form";
+$modversion['blocks'][2]['show_func'] = "b_system_login_show";
+$modversion['blocks'][2]['template'] = 'system_block_login.html';
+
+$modversion['blocks'][3]['file'] = "system_blocks.php";
+$modversion['blocks'][3]['name'] = _MI_SYSTEM_BNAME4;
+$modversion['blocks'][3]['description'] = "Shows search form block";
+$modversion['blocks'][3]['show_func'] = "b_system_search_show";
+$modversion['blocks'][3]['template'] = 'system_block_search.html';
+
+$modversion['blocks'][4]['file'] = "system_blocks.php";
+$modversion['blocks'][4]['name'] = _MI_SYSTEM_BNAME5;
+$modversion['blocks'][4]['description'] = "Shows contents waiting for approval";
+$modversion['blocks'][4]['show_func'] = "b_system_waiting_show";
+$modversion['blocks'][4]['template'] = 'system_block_waiting.html';
+
+$modversion['blocks'][5]['file'] = "system_blocks.php";
+$modversion['blocks'][5]['name'] = _MI_SYSTEM_BNAME6;
+$modversion['blocks'][5]['description'] = "Shows the main navigation menu of the site";
+$modversion['blocks'][5]['show_func'] = "b_system_main_show";
+$modversion['blocks'][5]['template'] = 'system_block_mainmenu.html';
+
+$modversion['blocks'][6]['file'] = "system_blocks.php";
+$modversion['blocks'][6]['name'] = _MI_SYSTEM_BNAME7;
+$modversion['blocks'][6]['description'] = "Shows basic info about the site and a link to Recommend Us pop up window";
+$modversion['blocks'][6]['show_func'] = "b_system_info_show";
+$modversion['blocks'][6]['edit_func'] = "b_system_info_edit";
+$modversion['blocks'][6]['options'] = "320|190|s_poweredby.gif|1";
+$modversion['blocks'][6]['template'] = 'system_block_siteinfo.html';
+
+$modversion['blocks'][7]['file'] = "system_blocks.php";
+$modversion['blocks'][7]['name'] = _MI_SYSTEM_BNAME8;
+$modversion['blocks'][7]['description'] = "Displays users/guests currently online";
+$modversion['blocks'][7]['show_func'] = "b_system_online_show";
+$modversion['blocks'][7]['template'] = 'system_block_online.html';
+
+$modversion['blocks'][8]['file'] = "system_blocks.php";
+$modversion['blocks'][8]['name'] = _MI_SYSTEM_BNAME9;
+$modversion['blocks'][8]['description'] = "Top posters";
+$modversion['blocks'][8]['show_func'] = "b_system_topposters_show";
+$modversion['blocks'][8]['options'] = "10|1";
+$modversion['blocks'][8]['edit_func'] = "b_system_topposters_edit";
+$modversion['blocks'][8]['template'] = 'system_block_topusers.html';
+
+$modversion['blocks'][9]['file'] = "system_blocks.php";
+$modversion['blocks'][9]['name'] = _MI_SYSTEM_BNAME10;
+$modversion['blocks'][9]['description'] = "Shows most recent users";
+$modversion['blocks'][9]['show_func'] = "b_system_newmembers_show";
+$modversion['blocks'][9]['options'] = "10|1";
+$modversion['blocks'][9]['edit_func'] = "b_system_newmembers_edit";
+$modversion['blocks'][9]['template'] = 'system_block_newusers.html';
+
+$modversion['blocks'][10]['file'] = "system_blocks.php";
+$modversion['blocks'][10]['name'] = _MI_SYSTEM_BNAME11;
+$modversion['blocks'][10]['description'] = "Shows most recent comments";
+$modversion['blocks'][10]['show_func'] = "b_system_comments_show";
+$modversion['blocks'][10]['options'] = "10";
+$modversion['blocks'][10]['edit_func'] = "b_system_comments_edit";
+$modversion['blocks'][10]['template'] = 'system_block_comments.html';
+
+// RMV-NOTIFY:
+// Adding a block...
+$modversion['blocks'][11]['file'] = "system_blocks.php";
+$modversion['blocks'][11]['name'] = _MI_SYSTEM_BNAME12;
+$modversion['blocks'][11]['description'] = "Shows notification options";
+$modversion['blocks'][11]['show_func'] = "b_system_notification_show";
+$modversion['blocks'][11]['template'] = 'system_block_notification.html';
+
+$modversion['blocks'][12]['file'] = "system_blocks.php";
+$modversion['blocks'][12]['name'] = _MI_SYSTEM_BNAME13;
+$modversion['blocks'][12]['description'] = "Shows theme selection box";
+$modversion['blocks'][12]['show_func'] = "b_system_themes_show";
+$modversion['blocks'][12]['options'] = "0|80";
+$modversion['blocks'][12]['edit_func'] = "b_system_themes_edit";
+$modversion['blocks'][12]['template'] = 'system_block_themes.html';
+
+$modversion['blocks'][13]['file'] = "system_blocks.php";
+$modversion['blocks'][13]['name'] = _MI_SYSTEM_BNAME14;
+$modversion['blocks'][13]['description'] = "Custom block for manual content input";
+$modversion['blocks'][13]['show_func'] = "b_system_custom_show";
+$modversion['blocks'][13]['options'] = "|1";
+$modversion['blocks'][13]['edit_func'] = "b_system_custom_edit";
+$modversion['blocks'][13]['template'] = 'system_block_dummy.html';
+
+// Profile fields
+$modversion['hasProfile'] = 1;
+include_once XOOPS_ROOT_PATH.'/include/comment_constants.php';
+$modversion['profile']['field'][1]['name'] = 'umode';
+$modversion['profile']['field'][1]['type'] = 'select';
+$modversion['profile']['field'][1]['valuetype'] = XOBJ_DTYPE_OTHER;
+//$modversion['profile']['field'][1]['maxlength'] = 255;
+$modversion['profile']['field'][1]['default'] = '';
+$modversion['profile']['field'][1]['show'] = 0;
+$modversion['profile']['field'][1]['title'] = _MI_SYSTEM_UMODE_TITLE;
+$modversion['profile']['field'][1]['edit'] = 1;
+$modversion['profile']['field'][1]['description'] = "";
+$modversion['profile']['field'][1]['required'] = 0;
+$modversion['profile']['field'][1]['config'] = 0;
+$modversion['profile']['field'][1]['options'] = array('nest'=>_NESTED, 'flat'=>_FLAT, 'thread'=>_THREADED);
+
+$modversion['profile']['field'][2]['name'] = 'uorder';
+$modversion['profile']['field'][2]['type'] = 'select';
+$modversion['profile']['field'][2]['valuetype'] = XOBJ_DTYPE_OTHER;
+//$modversion['profile']['field'][1]['maxlength'] = 255;
+$modversion['profile']['field'][2]['default'] = '';
+$modversion['profile']['field'][2]['show'] = 0;
+$modversion['profile']['field'][2]['title'] = _MI_SYSTEM_UORDER_TITLE;
+$modversion['profile']['field'][2]['edit'] = 1;
+$modversion['profile']['field'][2]['description'] = "";
+$modversion['profile']['field'][2]['required'] = 0;
+$modversion['profile']['field'][2]['config'] = 0;
+$modversion['profile']['field'][2]['options'] = array(XOOPS_COMMENT_OLD1ST => _OLDESTFIRST, XOOPS_COMMENT_NEW1ST => _NEWESTFIRST);
+
+
+include_once XOOPS_ROOT_PATH . "/language/" . $xoopsConfig['language'] . '/notification.php';
+include_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
+$modversion['profile']['field'][3]['name'] = 'notify_method';
+$modversion['profile']['field'][3]['type'] = 'select';
+$modversion['profile']['field'][3]['valuetype'] = XOBJ_DTYPE_OTHER;
+//$modversion['profile']['field'][1]['maxlength'] = 255;
+$modversion['profile']['field'][3]['default'] = '';
+$modversion['profile']['field'][3]['show'] = 0;
+$modversion['profile']['field'][3]['title'] = _NOT_NOTIFYMETHOD;
+$modversion['profile']['field'][3]['edit'] = 1;
+$modversion['profile']['field'][3]['description'] = _NOT_NOTIFYMETHOD_DESC;
+$modversion['profile']['field'][3]['required'] = 0;
+$modversion['profile']['field'][3]['config'] = 0;
+$modversion['profile']['field'][3]['options'] = array(XOOPS_NOTIFICATION_METHOD_DISABLE=>_NOT_METHOD_DISABLE, XOOPS_NOTIFICATION_METHOD_PM=>_NOT_METHOD_PM, XOOPS_NOTIFICATION_METHOD_EMAIL=>_NOT_METHOD_EMAIL);
+
+$modversion['profile']['field'][4]['name'] = 'notify_mode';
+$modversion['profile']['field'][4]['type'] = 'select';
+$modversion['profile']['field'][4]['valuetype'] = XOBJ_DTYPE_OTHER;
+//$modversion['profile']['field'][1]['maxlength'] = 255;
+$modversion['profile']['field'][4]['default'] = '';
+$modversion['profile']['field'][4]['show'] = 0;
+$modversion['profile']['field'][4]['title'] = _NOT_NOTIFYMODE;
+$modversion['profile']['field'][4]['edit'] = 1;
+$modversion['profile']['field'][4]['description'] = "";
+$modversion['profile']['field'][4]['required'] = 0;
+$modversion['profile']['field'][4]['config'] = 0;
+$modversion['profile']['field'][4]['options'] = array(XOOPS_NOTIFICATION_MODE_SENDALWAYS=>_NOT_MODE_SENDALWAYS, XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE=>_NOT_MODE_SENDONCE, XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT=>_NOT_MODE_SENDONCEPERLOGIN);
+
+/*$modversion['profile']['field'][5]['name'] = 'name';
+$modversion['profile']['field'][5]['type'] = 'textbox';
+$modversion['profile']['field'][5]['valuetype'] = XOBJ_DTYPE_TXTBOX;
+$modversion['profile']['field'][5]['maxlength'] = 255;
+$modversion['profile']['field'][5]['default'] = '';
+$modversion['profile']['field'][5]['show'] = 1;
+$modversion['profile']['field'][5]['title'] = _MI_SYSTEM_REALNAME;
+$modversion['profile']['field'][5]['edit'] = 1;
+$modversion['profile']['field'][5]['description'] = "";
+$modversion['profile']['field'][5]['required'] = 0;
+$modversion['profile']['field'][5]['config'] = 1;*/
+
+$modversion['profile']['field'][6]['name'] = 'user_regdate';
+$modversion['profile']['field'][6]['type'] = 'date';
+$modversion['profile']['field'][6]['valuetype'] = XOBJ_DTYPE_INT;
+$modversion['profile']['field'][6]['maxlength'] = 10;
+$modversion['profile']['field'][6]['default'] = 0;
+$modversion['profile']['field'][6]['show'] = 1;
+$modversion['profile']['field'][6]['title'] = _MI_SYSTEM_USERREGDATE;
+$modversion['profile']['field'][6]['edit'] = 0;
+$modversion['profile']['field'][6]['description'] = "";
+$modversion['profile']['field'][6]['required'] = 0;
+$modversion['profile']['field'][6]['config'] = 0;
+
+$modversion['profile']['field'][7]['name'] = 'posts';
+$modversion['profile']['field'][7]['type'] = 'textbox';
+$modversion['profile']['field'][7]['valuetype'] = XOBJ_DTYPE_INT;
+$modversion['profile']['field'][7]['maxlength'] = 10;
+$modversion['profile']['field'][7]['default'] = 0;
+$modversion['profile']['field'][7]['show'] = 1;
+$modversion['profile']['field'][7]['title'] = _MI_SYSTEM_USERPOSTS;
+$modversion['profile']['field'][7]['edit'] = 0;
+$modversion['profile']['field'][7]['description'] = "";
+$modversion['profile']['field'][7]['required'] = 0;
+$modversion['profile']['field'][7]['config'] = 0;
+
+$modversion['profile']['field'][8]['name'] = 'attachsig';
+$modversion['profile']['field'][8]['type'] = 'yesno';
+$modversion['profile']['field'][8]['valuetype'] = XOBJ_DTYPE_INT;
+$modversion['profile']['field'][8]['maxlength'] = 1;
+$modversion['profile']['field'][8]['default'] = '';
+$modversion['profile']['field'][8]['show'] = 0;
+$modversion['profile']['field'][8]['title'] = _MI_SYSTEM_ATTACHSIG;
+$modversion['profile']['field'][8]['edit'] = 1;
+$modversion['profile']['field'][8]['description'] = "";
+$modversion['profile']['field'][8]['required'] = 0;
+$modversion['profile']['field'][8]['config'] = 0;
+
+$modversion['profile']['field'][9]['name'] = 'timezone_offset';
+$modversion['profile']['field'][9]['type'] = 'timezone';
+$modversion['profile']['field'][9]['valuetype'] = XOBJ_DTYPE_OTHER;
+$modversion['profile']['field'][9]['maxlength'] = 255;
+$modversion['profile']['field'][9]['default'] = '';
+$modversion['profile']['field'][9]['show'] = 0;
+$modversion['profile']['field'][9]['title'] = _MI_SYSTEM_TIMEZONEOFFSET;
+$modversion['profile']['field'][9]['edit'] = 1;
+$modversion['profile']['field'][9]['description'] = "";
+$modversion['profile']['field'][9]['required'] = 0;
+$modversion['profile']['field'][9]['config'] = 0;
+
+$modversion['profile']['field'][10]['name'] = 'user_mailok';
+$modversion['profile']['field'][10]['type'] = 'yesno';
+$modversion['profile']['field'][10]['valuetype'] = XOBJ_DTYPE_INT;
+$modversion['profile']['field'][10]['maxlength'] = 1;
+$modversion['profile']['field'][10]['default'] = 1;
+$modversion['profile']['field'][10]['show'] = 0;
+$modversion['profile']['field'][10]['title'] = _MI_SYSTEM_MAILOK;
+$modversion['profile']['field'][10]['edit'] = 1;
+$modversion['profile']['field'][10]['description'] = _MI_SYSTEM_MAILOK_DESC;
+$modversion['profile']['field'][10]['required'] = 0;
+$modversion['profile']['field'][10]['config'] = 0;
+
+$modversion['profile']['field'][11]['name'] = 'theme';
+$modversion['profile']['field'][11]['type'] = 'theme';
+$modversion['profile']['field'][11]['valuetype'] = XOBJ_DTYPE_OTHER;
+//$modversion['profile']['field'][11]['maxlength'] = 255;
+$modversion['profile']['field'][11]['default'] = "0";
+$modversion['profile']['field'][11]['show'] = 0;
+$modversion['profile']['field'][11]['title'] = _MI_SYSTEM_USERTHEME;
+$modversion['profile']['field'][11]['edit'] = 1;
+$modversion['profile']['field'][11]['description'] = "";
+$modversion['profile']['field'][11]['required'] = 0;
+$modversion['profile']['field'][11]['config'] = 0;
+
+$modversion['profile']['field'][12]['name'] = 'actkey';
+$modversion['profile']['field'][12]['type'] = 'textbox';
+$modversion['profile']['field'][12]['valuetype'] = XOBJ_DTYPE_OTHER;
+//$modversion['profile']['field'][12]['maxlength'] = 255;
+$modversion['profile']['field'][12]['default'] = "";
+$modversion['profile']['field'][12]['show'] = 0;
+$modversion['profile']['field'][12]['title'] = _MI_SYSTEM_ACTKEY;
+$modversion['profile']['field'][12]['edit'] = 0;
+$modversion['profile']['field'][12]['description'] = "";
+$modversion['profile']['field'][12]['required'] = 0;
+$modversion['profile']['field'][12]['config'] = 0;
+
+$modversion['profile']['field'][13]['name'] = 'last_login';
+$modversion['profile']['field'][13]['type'] = 'date';
+$modversion['profile']['field'][13]['valuetype'] = XOBJ_DTYPE_INT;
+$modversion['profile']['field'][13]['maxlength'] = 10;
+$modversion['profile']['field'][13]['default'] = "";
+$modversion['profile']['field'][13]['show'] = 1;
+$modversion['profile']['field'][13]['title'] = _MI_SYSTEM_LASTLOGIN;
+$modversion['profile']['field'][13]['edit'] = 0;
+$modversion['profile']['field'][13]['description'] = "";
+$modversion['profile']['field'][13]['required'] = 0;
+$modversion['profile']['field'][13]['config'] = 0;
+
+// Config categories
+$modversion['configcat'][1]['nameid'] = 'general';
+$modversion['configcat'][1]['name'] = '_MD_AM_GENERAL';
+$modversion['configcat'][1]['description'] = '';
+
+//category 2 is the old user settings category
+
+$modversion['configcat'][3]['nameid'] = 'meta';
+$modversion['configcat'][3]['name'] = '_MD_AM_METAFOOTER';
+$modversion['configcat'][3]['description'] = '';
+
+$modversion['configcat'][4]['nameid'] = 'censor';
+$modversion['configcat'][4]['name'] = '_MD_AM_CENSOR';
+$modversion['configcat'][4]['description'] = '';
+
+$modversion['configcat'][5]['nameid'] = 'search';
+$modversion['configcat'][5]['name'] = '_MD_AM_SEARCH';
+$modversion['configcat'][5]['description'] = '';
+
+$modversion['configcat'][6]['nameid'] = 'mail';
+$modversion['configcat'][6]['name'] = '_MD_AM_MAILER';
+$modversion['configcat'][6]['description'] = '';
+
+$modversion['configcat'][7]['nameid'] = 'auth';
+$modversion['configcat'][7]['name'] = '_MD_AM_AUTHENTICATION';
+$modversion['configcat'][7]['description'] = '';
+
+// data for table 'config'
+$modversion['config'][1]['name'] = 'sitename';
+$modversion['config'][1]['title'] = '_MD_AM_SITENAME';
+$modversion['config'][1]['description'] = '_MD_AM_SITENAMEDSC';
+$modversion['config'][1]['formtype'] = 'textbox';
+$modversion['config'][1]['valuetype'] = 'text';
+$modversion['config'][1]['default'] = "XOOPS Site";
+$modversion['config'][1]['category'] = 'general';
+
+$modversion['config'][2]['name'] = 'slogan';
+$modversion['config'][2]['title'] = '_MD_AM_SLOGAN';
+$modversion['config'][2]['description'] = '_MD_AM_SLOGANDSC';
+$modversion['config'][2]['formtype'] = 'textbox';
+$modversion['config'][2]['valuetype'] = 'text';
+$modversion['config'][2]['default'] = "Powered by You!";
+$modversion['config'][2]['category'] = 'general';
+
+$modversion['config'][3]['name'] = 'adminmail';
+$modversion['config'][3]['title'] = '_MD_AM_ADMINML';
+$modversion['config'][3]['description'] = '_MD_AM_ADMINMLDSC';
+$modversion['config'][3]['formtype'] = 'textbox';
+$modversion['config'][3]['valuetype'] = 'text';
+$modversion['config'][3]['default'] = addslashes($GLOBALS['xoopsConfig']['adminmail']); //TODO: Where to get adminmail?
+$modversion['config'][3]['category'] = 'general';
+
+$modversion['config'][4]['name'] = 'language';
+$modversion['config'][4]['title'] = '_MD_AM_LANGUAGE';
+$modversion['config'][4]['description'] = '_MD_AM_LANGUAGEDSC';
+$modversion['config'][4]['formtype'] = 'language';
+$modversion['config'][4]['valuetype'] = 'other';
+$modversion['config'][4]['default'] = addslashes($GLOBALS['xoopsConfig']['language']);
+$modversion['config'][4]['category'] = 'general';
+
+$modversion['config'][5]['name'] = 'startpage';
+$modversion['config'][5]['title'] = '_MD_AM_STARTPAGE';
+$modversion['config'][5]['description'] = '_MD_AM_STARTPAGEDSC';
+$modversion['config'][5]['formtype'] = 'startpage';
+$modversion['config'][5]['valuetype'] = 'other';
+$modversion['config'][5]['default'] = '--';
+$modversion['config'][5]['category'] = 'general';
+
+$modversion['config'][6]['name'] = 'server_TZ';
+$modversion['config'][6]['title'] = '_MD_AM_SERVERTZ';
+$modversion['config'][6]['description'] = '_MD_AM_SERVERTZDSC';
+$modversion['config'][6]['formtype'] = 'timezone';
+$modversion['config'][6]['valuetype'] = 'float';
+$modversion['config'][6]['default'] = "0";
+$modversion['config'][6]['category'] = 'general';
+
+$modversion['config'][7]['name'] = 'default_TZ';
+$modversion['config'][7]['title'] = '_MD_AM_DEFAULTTZ';
+$modversion['config'][7]['description'] = '_MD_AM_DEFAULTTZDSC';
+$modversion['config'][7]['formtype'] = 'timezone';
+$modversion['config'][7]['valuetype'] = 'float';
+$modversion['config'][7]['default'] = "0";
+$modversion['config'][7]['category'] = 'general';
+
+$modversion['config'][8]['name'] = 'theme_set';
+$modversion['config'][8]['title'] = '_MD_AM_DTHEME';
+$modversion['config'][8]['description'] = '_MD_AM_DTHEMEDSC';
+$modversion['config'][8]['formtype'] = 'theme';
+$modversion['config'][8]['valuetype'] = 'other';
+$modversion['config'][8]['default'] = "default";
+$modversion['config'][8]['category'] = 'general';
+
+$modversion['config'][9]['name'] = 'theme_set_admin';
+$modversion['config'][9]['title'] = '_MD_AM_ADMINTHEME';
+$modversion['config'][9]['description'] = '_MD_AM_ADMINTHEMEDSC';
+$modversion['config'][9]['formtype'] = 'theme_admin';
+$modversion['config'][9]['valuetype'] = 'other';
+$modversion['config'][9]['default'] = "0";
+$modversion['config'][9]['category'] = 'general';
+
+$modversion['config'][10]['name'] = 'theme_fromfile';
+$modversion['config'][10]['title'] = '_MD_AM_THEMEFILE';
+$modversion['config'][10]['description'] = '_MD_AM_THEMEFILEDSC';
+$modversion['config'][10]['formtype'] = 'yesno';
+$modversion['config'][10]['valuetype'] = 'int';
+$modversion['config'][10]['default'] = "0";
+$modversion['config'][10]['category'] = 'general';
+
+$modversion['config'][11]['name'] = 'theme_set_allowed';
+$modversion['config'][11]['title'] = '_MD_AM_THEMEOK';
+$modversion['config'][11]['description'] = '_MD_AM_THEMEOKDSC';
+$modversion['config'][11]['formtype'] = 'theme_multi';
+$modversion['config'][11]['valuetype'] = 'array';
+$modversion['config'][11]['default'] = array('default');
+$modversion['config'][11]['category'] = 'general';
+
+$modversion['config'][12]['name'] = 'template_set';
+$modversion['config'][12]['title'] = '_MD_AM_DTPLSET';
+$modversion['config'][12]['description'] = '_MD_AM_DTPLSETDSC';
+$modversion['config'][12]['formtype'] = 'tplset';
+$modversion['config'][12]['valuetype'] = 'other';
+$modversion['config'][12]['default'] = "default";
+$modversion['config'][12]['category'] = 'general';
+
+$modversion['config'][13]['name'] = 'anonymous';
+$modversion['config'][13]['title'] = '_MD_AM_ANONNAME';
+$modversion['config'][13]['description'] = '_MD_AM_ANONNAMEDSC';
+$modversion['config'][13]['formtype'] = 'textbox';
+$modversion['config'][13]['valuetype'] = 'text';
+$modversion['config'][13]['default'] = addslashes(_MI_SYSTEM_ANONYMOUS);
+$modversion['config'][13]['category'] = 'general';
+
+$modversion['config'][14]['name'] = 'gzip_compression';
+$modversion['config'][14]['title'] = '_MD_AM_USEGZIP';
+$modversion['config'][14]['description'] = '_MD_AM_USEGZIPDSC';
+$modversion['config'][14]['formtype'] = 'yesno';
+$modversion['config'][14]['valuetype'] = 'int';
+$modversion['config'][14]['default'] = "0";
+$modversion['config'][14]['category'] = 'general';
+
+$modversion['config'][15]['name'] = 'usercookie';
+$modversion['config'][15]['title'] = '_MD_AM_USERCOOKIE';
+$modversion['config'][15]['description'] = '_MD_AM_USERCOOKIEDSC';
+$modversion['config'][15]['formtype'] = 'textbox';
+$modversion['config'][15]['valuetype'] = 'text';
+$modversion['config'][15]['default'] = "xoops_user";
+$modversion['config'][15]['category'] = 'general';
+
+$modversion['config'][16]['name'] = 'use_mysession';
+$modversion['config'][16]['title'] = '_MD_AM_USEMYSESS';
+$modversion['config'][16]['description'] = '_MD_AM_USEMYSESSDSC';
+$modversion['config'][16]['formtype'] = 'yesno';
+$modversion['config'][16]['valuetype'] = 'int';
+$modversion['config'][16]['default'] = "0";
+$modversion['config'][16]['category'] = 'general';
+
+$modversion['config'][17]['name'] = 'session_expire';
+$modversion['config'][17]['title'] = '_MD_AM_SESSEXPIRE';
+$modversion['config'][17]['description'] = '_MD_AM_SESSEXPIREDSC';
+$modversion['config'][17]['formtype'] = 'textbox';
+$modversion['config'][17]['valuetype'] = 'int';
+$modversion['config'][17]['default'] = "15";
+$modversion['config'][17]['category'] = 'general';
+
+$modversion['config'][18]['name'] = 'session_name';
+$modversion['config'][18]['title'] = '_MD_AM_SESSNAME';
+$modversion['config'][18]['description'] = '_MD_AM_SESSNAMEDSC';
+$modversion['config'][18]['formtype'] = 'textbox';
+$modversion['config'][18]['valuetype'] = 'text';
+$modversion['config'][18]['default'] = "xoops_session";
+$modversion['config'][18]['category'] = 'general';
+
+$modversion['config'][19]['name'] = 'debug_mode';
+$modversion['config'][19]['title'] = '_MD_AM_DEBUGMODE';
+$modversion['config'][19]['description'] = '_MD_AM_DEBUGMODEDSC';
+$modversion['config'][19]['formtype'] = 'select_multi';
+$modversion['config'][19]['valuetype'] = 'array';
+$modversion['config'][19]['default'] = array(1);
+$modversion['config'][19]['options'] = array("_MD_AM_DEBUGMODE0" => 0, "_MD_AM_DEBUGMODE1" => 1, "_MD_AM_DEBUGMODE2" => 2, "_MD_AM_DEBUGMODE3" => 3);
+$modversion['config'][19]['category'] = 'general';
+
+$modversion['config'][20]['name'] = 'banners';
+$modversion['config'][20]['title'] = '_MD_AM_BANNERS';
+$modversion['config'][20]['description'] = '_MD_AM_BANNERSDSC';
+$modversion['config'][20]['formtype'] = 'yesno';
+$modversion['config'][20]['valuetype'] = 'int';
+$modversion['config'][20]['default'] = "1";
+$modversion['config'][20]['category'] = 'general';
+
+$modversion['config'][21]['name'] = 'closesite';
+$modversion['config'][21]['title'] = '_MD_AM_CLOSESITE';
+$modversion['config'][21]['description'] = '_MD_AM_CLOSESITEDSC';
+$modversion['config'][21]['formtype'] = 'yesno';
+$modversion['config'][21]['valuetype'] = 'int';
+$modversion['config'][21]['default'] = "0";
+$modversion['config'][21]['category'] = 'general';
+
+$modversion['config'][22]['name'] = 'closesite_okgrp';
+$modversion['config'][22]['title'] = '_MD_AM_CLOSESITEOK';
+$modversion['config'][22]['description'] = '_MD_AM_CLOSESITEOKDSC';
+$modversion['config'][22]['formtype'] = 'group_multi';
+$modversion['config'][22]['valuetype'] = 'array';
+$modversion['config'][22]['default'] = array('1');
+$modversion['config'][22]['category'] = 'general';
+
+$modversion['config'][23]['name'] = 'closesite_text';
+$modversion['config'][23]['title'] = '_MD_AM_CLOSESITETXT';
+$modversion['config'][23]['description'] = '_MD_AM_CLOSESITETXTDSC';
+$modversion['config'][23]['formtype'] = 'textarea';
+$modversion['config'][23]['valuetype'] = 'text';
+$modversion['config'][23]['default'] = _MI_SYSTEM_SITECLOSEDMSG;
+$modversion['config'][23]['category'] = 'general';
+
+$modversion['config'][24]['name'] = 'my_ip';
+$modversion['config'][24]['title'] = '_MD_AM_MYIP';
+$modversion['config'][24]['description'] = '_MD_AM_MYIPDSC';
+$modversion['config'][24]['formtype'] = 'textbox';
+$modversion['config'][24]['valuetype'] = 'text';
+$modversion['config'][24]['default'] = "127.0.0.1";
+$modversion['config'][24]['category'] = 'general';
+
+$modversion['config'][25]['name'] = 'use_ssl';
+$modversion['config'][25]['title'] = '_MD_AM_USESSL';
+$modversion['config'][25]['description'] = '_MD_AM_USESSLDSC';
+$modversion['config'][25]['formtype'] = 'yesno';
+$modversion['config'][25]['valuetype'] = 'int';
+$modversion['config'][25]['default'] = "0";
+$modversion['config'][25]['category'] = 'general';
+
+$modversion['config'][26]['name'] = 'sslpost_name';
+$modversion['config'][26]['title'] = '_MD_AM_SSLPOST';
+$modversion['config'][26]['description'] = '_MD_AM_SSLPOSTDSC';
+$modversion['config'][26]['formtype'] = 'textbox';
+$modversion['config'][26]['valuetype'] = 'text';
+$modversion['config'][26]['default'] = "xoops_ssl";
+$modversion['config'][26]['category'] = 'general';
+
+$modversion['config'][27]['name'] = 'sslloginlink';
+$modversion['config'][27]['title'] = '_MD_AM_SSLLINK';
+$modversion['config'][27]['description'] = '_MD_AM_SSLLINKDSC';
+$modversion['config'][27]['formtype'] = 'textbox';
+$modversion['config'][27]['valuetype'] = 'text';
+$modversion['config'][27]['default'] = "https://";
+$modversion['config'][27]['category'] = 'general';
+
+$modversion['config'][28]['name'] = 'com_mode';
+$modversion['config'][28]['title'] = '_MD_AM_COMMODE';
+$modversion['config'][28]['description'] = '_MD_AM_COMMODEDSC';
+$modversion['config'][28]['formtype'] = 'select';
+$modversion['config'][28]['valuetype'] = 'text';
+$modversion['config'][28]['default'] = "nest";
+$modversion['config'][28]['category'] = 'general';
+$modversion['config'][28]['options'] = array("_NESTED" => "nest", "_FLAT" => "flat", "_THREADED" => "thread");
+
+$modversion['config'][29]['name'] = 'com_order';
+$modversion['config'][29]['title'] = '_MD_AM_COMORDER';
+$modversion['config'][29]['description'] = '_MD_AM_COMORDERDSC';
+$modversion['config'][29]['formtype'] = 'select';
+$modversion['config'][29]['valuetype'] = 'int';
+$modversion['config'][29]['default'] = "0";
+$modversion['config'][29]['category'] = 'general';
+$modversion['config'][29]['options'] = array("_OLDESTFIRST" => 0, "_NEWESTFIRST" => 1);
+
+$modversion['config'][30]['name'] = 'enable_badips';
+$modversion['config'][30]['title'] = '_MD_AM_DOBADIPS';
+$modversion['config'][30]['description'] = '_MD_AM_DOBADIPSDSC';
+$modversion['config'][30]['formtype'] = 'yesno';
+$modversion['config'][30]['valuetype'] = 'int';
+$modversion['config'][30]['default'] = "0";
+$modversion['config'][30]['category'] = 'general';
+
+$modversion['config'][31]['name'] = 'bad_ips';
+$modversion['config'][31]['title'] = '_MD_AM_BADIPS';
+$modversion['config'][31]['description'] = '_MD_AM_BADIPSDSC';
+$modversion['config'][31]['formtype'] = 'textarea';
+$modversion['config'][31]['valuetype'] = 'array';
+$modversion['config'][31]['default'] = array('127.0.0.1');
+$modversion['config'][31]['category'] = 'general';
+
+$modversion['config'][32]['name'] = 'module_cache';
+$modversion['config'][32]['title'] = '_MD_AM_MODCACHE';
+$modversion['config'][32]['description'] = '_MD_AM_MODCACHEDSC';
+$modversion['config'][32]['formtype'] = 'module_cache';
+$modversion['config'][32]['valuetype'] = 'array';
+$modversion['config'][32]['default'] = array();
+$modversion['config'][32]['category'] = 'general';
+
+//Meta section
+$modversion['config'][33]['name'] = 'meta_keywords';
+$modversion['config'][33]['title'] = '_MD_AM_METAKEY';
+$modversion['config'][33]['description'] = '_MD_AM_METAKEYDSC';
+$modversion['config'][33]['formtype'] = 'textarea';
+$modversion['config'][33]['valuetype'] = 'text';
+$modversion['config'][33]['default'] = 'news, technology, headlines, xoops, xoop, nuke, myphpnuke, myphp-nuke, phpnuke, SE, geek, geeks, hacker, hackers, linux, software, download, downloads, free, community, mp3, forum, forums, bulletin, board, boards, bbs, php, survey, poll, polls, kernel, comment, comments, portal, odp, open, source, opensource, FreeSoftware, gnu, gpl, license, Unix, *nix, mysql, sql, database, databases, web site, weblog, guru, module, modules, theme, themes, cms, content management';
+$modversion['config'][33]['category'] = 'meta';
+
+require_once(XOOPS_ROOT_PATH."/include/version.php");
+$modversion['config'][34]['name'] = 'footer';
+$modversion['config'][34]['title'] = '_MD_AM_FOOTER';
+$modversion['config'][34]['description'] = '_MD_AM_FOOTERDSC';
+$modversion['config'][34]['formtype'] = 'textarea';
+$modversion['config'][34]['valuetype'] = 'text';
+$modversion['config'][34]['default'] = 'Powered by '.XOOPS_VERSION.' © 2001-'.date("Y").' <a href="http://www.xoops.org/" target="_blank">The XOOPS Project</a>';
+$modversion['config'][34]['category'] = 'meta';
+
+$modversion['config'][35]['name'] = 'censor_enable';
+$modversion['config'][35]['title'] = '_MD_AM_DOCENSOR';
+$modversion['config'][35]['description'] = '_MD_AM_DOCENSORDSC';
+$modversion['config'][35]['formtype'] = 'yesno';
+$modversion['config'][35]['valuetype'] = 'int';
+$modversion['config'][35]['default'] = 0;
+$modversion['config'][35]['category'] = 'censor';
+
+$modversion['config'][36]['name'] = 'censor_words';
+$modversion['config'][36]['title'] = '_MD_AM_CENSORWRD';
+$modversion['config'][36]['description'] = '_MD_AM_CENSORWRDDSC';
+$modversion['config'][36]['formtype'] = 'textarea';
+$modversion['config'][36]['valuetype'] = 'array';
+$modversion['config'][36]['default'] = array('fuck', 'shit');
+$modversion['config'][36]['category'] = 'censor';
+
+$modversion['config'][37]['name'] = 'censor_replace';
+$modversion['config'][37]['title'] = '_MD_AM_CENSORRPLC';
+$modversion['config'][37]['description'] = '_MD_AM_CENSORRPLCDSC';
+$modversion['config'][37]['formtype'] = 'textbox';
+$modversion['config'][37]['valuetype'] = 'text';
+$modversion['config'][37]['default'] = "#OOPS#";
+$modversion['config'][37]['category'] = 'censor';
+
+$modversion['config'][38]['name'] = 'meta_rating';
+$modversion['config'][38]['title'] = '_MD_AM_METARATING';
+$modversion['config'][38]['description'] = '_MD_AM_METARATINGDSC';
+$modversion['config'][38]['formtype'] = 'select';
+$modversion['config'][38]['valuetype'] = 'text';
+$modversion['config'][38]['default'] = 'general';
+$modversion['config'][38]['category'] = 'meta';
+$modversion['config'][38]['options'] = array("_MD_AM_METAOGEN" => "general", "_MD_AM_METAO14YRS" => "14 years", "_MD_AM_METAOREST" => "restricted", "_MD_AM_METAOMAT", "mature");
+
+$modversion['config'][39]['name'] = 'meta_author';
+$modversion['config'][39]['title'] = '_MD_AM_METAAUTHOR';
+$modversion['config'][39]['description'] = '_MD_AM_METAAUTHORDSC';
+$modversion['config'][39]['formtype'] = 'textbox';
+$modversion['config'][39]['valuetype'] = 'text';
+$modversion['config'][39]['default'] = 'XOOPS';
+$modversion['config'][39]['category'] = 'meta';
+
+$modversion['config'][40]['name'] = 'meta_copyright';
+$modversion['config'][40]['title'] = '_MD_AM_METACOPYR';
+$modversion['config'][40]['description'] = '_MD_AM_METACOPYRDSC';
+$modversion['config'][40]['formtype'] = 'textbox';
+$modversion['config'][40]['valuetype'] = 'text';
+$modversion['config'][40]['default'] = 'Copyright © 2001-'.date("Y");
+$modversion['config'][40]['category'] = 'meta';
+
+$modversion['config'][41]['name'] = 'meta_description';
+$modversion['config'][41]['title'] = '_MD_AM_METADESC';
+$modversion['config'][41]['description'] = '_MD_AM_METADESCDSC';
+$modversion['config'][41]['formtype'] = 'textarea';
+$modversion['config'][41]['valuetype'] = 'text';
+$modversion['config'][41]['default'] = 'XOOPS is a dynamic Object Oriented based open source portal script written in PHP.';
+$modversion['config'][41]['category'] = 'meta';
+
+$modversion['config'][42]['name'] = 'meta_robots';
+$modversion['config'][42]['title'] = '_MD_AM_METAROBOTS';
+$modversion['config'][42]['description'] = '_MD_AM_METAROBOTSDSC';
+$modversion['config'][42]['formtype'] = 'select';
+$modversion['config'][42]['valuetype'] = 'text';
+$modversion['config'][42]['default'] = 'index,follow';
+$modversion['config'][42]['category'] = 'meta';
+$modversion['config'][42]['options'] = array("_MD_AM_INDEXFOLLOW" => "index,follow", "_MD_AM_NOINDEXFOLLOW" => "noindex,follow", "_MD_AM_INDEXNOFOLLOW" => "index,nofollow", "_MD_AM_NOINDEXNOFOLLOW" => "noindex,nofollow");
+
+$modversion['config'][43]['name'] = 'enable_search';
+$modversion['config'][43]['title'] = '_MD_AM_DOSEARCH';
+$modversion['config'][43]['description'] = '_MD_AM_DOSEARCHDSC';
+$modversion['config'][43]['formtype'] = 'yesno';
+$modversion['config'][43]['valuetype'] = 'int';
+$modversion['config'][43]['default'] = '1';
+$modversion['config'][43]['category'] = 'search';
+
+$modversion['config'][44]['name'] = 'keyword_min';
+$modversion['config'][44]['title'] = '_MD_AM_MINSEARCH';
+$modversion['config'][44]['description'] = '_MD_AM_MINSEARCHDSC';
+$modversion['config'][44]['formtype'] = 'textbox';
+$modversion['config'][44]['valuetype'] = 'int';
+$modversion['config'][44]['default'] = '5';
+$modversion['config'][44]['category'] = 'search';
+
+$modversion['config'][45]['name'] = 'mailmethod';
+$modversion['config'][45]['title'] = '_MD_AM_MAILERMETHOD';
+$modversion['config'][45]['description'] = '_MD_AM_MAILERMETHODDESC';
+$modversion['config'][45]['formtype'] = 'select';
+$modversion['config'][45]['valuetype'] = 'text';
+$modversion['config'][45]['default'] = 'mail';
+$modversion['config'][45]['category'] = 'mail';
+$modversion['config'][45]['options'] = array("PHP mail()" => "mail", "sendmail" => "sendmail", "SMTP" => "smtp", "SMTPAuth" => "smtpauth");
+
+$modversion['config'][46]['name'] = 'sendmailpath';
+$modversion['config'][46]['title'] = '_MD_AM_SENDMAILPATH';
+$modversion['config'][46]['description'] = '_MD_AM_SENDMAILPATHDESC';
+$modversion['config'][46]['formtype'] = 'textbox';
+$modversion['config'][46]['valuetype'] = 'text';
+$modversion['config'][46]['default'] = '/usr/sbin/sendmail';
+$modversion['config'][46]['category'] = 'mail';
+
+$modversion['config'][47]['name'] = 'smtphost';
+$modversion['config'][47]['title'] = '_MD_AM_SMTPHOST';
+$modversion['config'][47]['description'] = '_MD_AM_SMTPHOSTDESC';
+$modversion['config'][47]['formtype'] = 'textarea';
+$modversion['config'][47]['valuetype'] = 'text';
+$modversion['config'][47]['default'] = "";
+$modversion['config'][47]['category'] = 'mail';
+
+$modversion['config'][48]['name'] = 'smtpuser';
+$modversion['config'][48]['title'] = '_MD_AM_SMTPUSER';
+$modversion['config'][48]['description'] = '_MD_AM_SMTPUSERDESC';
+$modversion['config'][48]['formtype'] = 'textbox';
+$modversion['config'][48]['valuetype'] = 'text';
+$modversion['config'][48]['default'] = '';
+$modversion['config'][48]['category'] = 'mail';
+
+$modversion['config'][49]['name'] = 'smtppass';
+$modversion['config'][49]['title'] = '_MD_AM_SMTPPASS';
+$modversion['config'][49]['description'] = '_MD_AM_SMTPPASSDESC';
+$modversion['config'][49]['formtype'] = 'password';
+$modversion['config'][49]['valuetype'] = 'text';
+$modversion['config'][49]['default'] = '';
+$modversion['config'][49]['category'] = 'mail';
+
+$modversion['config'][50]['name'] = 'from';
+$modversion['config'][50]['title'] = '_MD_AM_MAILFROM';
+$modversion['config'][50]['description'] = '_MD_AM_MAILFROMDESC';
+$modversion['config'][50]['formtype'] = 'textbox';
+$modversion['config'][50]['valuetype'] = 'text';
+$modversion['config'][50]['default'] = '';
+$modversion['config'][50]['category'] = 'mail';
+
+$modversion['config'][51]['name'] = 'fromname';
+$modversion['config'][51]['title'] = '_MD_AM_MAILFROMNAME';
+$modversion['config'][51]['description'] = '_MD_AM_MAILFROMNAMEDESC';
+$modversion['config'][51]['formtype'] = 'textbox';
+$modversion['config'][51]['valuetype'] = 'text';
+$modversion['config'][51]['default'] = '';
+$modversion['config'][51]['category'] = 'mail';
+
+$modversion['config'][52]['name'] = 'fromuid';
+$modversion['config'][52]['title'] = '_MD_AM_MAILFROMUID';
+$modversion['config'][52]['description'] = '_MD_AM_MAILFROMUIDDESC';
+$modversion['config'][52]['formtype'] = 'user';
+$modversion['config'][52]['valuetype'] = 'int';
+$modversion['config'][52]['default'] = '1';
+$modversion['config'][52]['category'] = 'mail';
+
+$modversion['config'][53]['name'] = 'auth_method';
+$modversion['config'][53]['title'] = '_MD_AM_AUTHMETHOD';
+$modversion['config'][53]['description'] = '_MD_AM_AUTHMETHODDESC';
+$modversion['config'][53]['formtype'] = 'select';
+$modversion['config'][53]['valuetype'] = 'text';
+$modversion['config'][53]['options'] = array("XOOPS" => "xoops", "LDAP" => "ldap");
+$modversion['config'][53]['default'] = "xoops";
+$modversion['config'][53]['category'] = 'auth';
+
+$modversion['config'][54]['name'] = 'ldap_mail_attr';
+$modversion['config'][54]['title'] = '_MD_AM_LDAP_MAIL_ATTR';
+$modversion['config'][54]['description'] = '_MD_AM_LDAP_MAIL_ATTR_DESC';
+$modversion['config'][54]['formtype'] = 'textbox';
+$modversion['config'][54]['valuetype'] = 'text';
+$modversion['config'][54]['default'] = 'mail';
+$modversion['config'][54]['category'] = 'auth';
+
+$modversion['config'][55]['name'] = 'ldap_name_attr';
+$modversion['config'][55]['title'] = '_MD_AM_LDAP_NAME_ATTR';
+$modversion['config'][55]['description'] = '_MD_AM_LDAP_NAME_ATTR_DESC';
+$modversion['config'][55]['formtype'] = 'textbox';
+$modversion['config'][55]['valuetype'] = 'text';
+$modversion['config'][55]['default'] = "cn";
+$modversion['config'][55]['category'] = 'auth';
+
+$modversion['config'][56]['name'] = 'ldap_surname_attr';
+$modversion['config'][56]['title'] = '_MD_AM_LDAP_SURNAME_ATTR';
+$modversion['config'][56]['description'] = '_MD_AM_LDAP_SURNAME_ATTR_DESC';
+$modversion['config'][56]['formtype'] = 'textbox';
+$modversion['config'][56]['valuetype'] = 'text';
+$modversion['config'][56]['default'] = "sn";
+$modversion['config'][56]['category'] = 'auth';
+
+$modversion['config'][57]['name'] = 'ldap_givenname_attr';
+$modversion['config'][57]['title'] = '_MD_AM_LDAP_GIVENNAME_ATTR';
+$modversion['config'][57]['description'] = '_MD_AM_LDAP_GIVENNAME_ATTR_DSC';
+$modversion['config'][57]['formtype'] = 'textbox';
+$modversion['config'][57]['valuetype'] = 'text';
+$modversion['config'][57]['default'] = "givenname";
+$modversion['config'][57]['category'] = 'auth';
+
+$modversion['config'][58]['name'] = 'ldap_port';
+$modversion['config'][58]['title'] = '_MD_AM_LDAP_PORT';
+$modversion['config'][58]['description'] = '_MD_AM_LDAP_PORT';
+$modversion['config'][58]['formtype'] = 'textbox';
+$modversion['config'][58]['valuetype'] = 'int';
+$modversion['config'][58]['default'] = "389";
+$modversion['config'][58]['category'] = 'auth';
+
+$modversion['config'][59]['name'] = 'ldap_server';
+$modversion['config'][59]['title'] = '_MD_AM_LDAP_SERVER';
+$modversion['config'][59]['description'] = '_MD_AM_LDAP_SERVER_DESC';
+$modversion['config'][59]['formtype'] = 'textbox';
+$modversion['config'][59]['valuetype'] = 'text';
+$modversion['config'][59]['default'] = "your directory server";
+$modversion['config'][59]['category'] = 'auth';
+
+$modversion['config'][60]['name'] = 'ldap_base_dn';
+$modversion['config'][60]['title'] = '_MD_AM_LDAP_BASE_DN';
+$modversion['config'][60]['description'] = '_MD_AM_LDAP_BASE_DN_DESC';
+$modversion['config'][60]['formtype'] = 'textbox';
+$modversion['config'][60]['valuetype'] = 'text';
+$modversion['config'][60]['default'] = "ou=Employees,o=Company";
+$modversion['config'][60]['category'] = 'auth';
+
+$modversion['config'][61]['name'] = 'ldap_uid_attr';
+$modversion['config'][61]['title'] = '_MD_AM_LDAP_UID_ATTR';
+$modversion['config'][61]['description'] = '_MD_AM_LDAP_UID_ATTR_DESC';
+$modversion['config'][61]['formtype'] = 'textbox';
+$modversion['config'][61]['valuetype'] = 'text';
+$modversion['config'][61]['default'] = "uid";
+$modversion['config'][61]['category'] = 'auth';
+
+$modversion['config'][62]['name'] = 'ldap_uid_asdn';
+$modversion['config'][62]['title'] = '_MD_AM_LDAP_UID_ASDN';
+$modversion['config'][62]['description'] = '_MD_AM_LDAP_UID_ASDN_DESC';
+$modversion['config'][62]['formtype'] = 'yesno';
+$modversion['config'][62]['valuetype'] = 'int';
+$modversion['config'][62]['default'] = "uid_asdn";
+$modversion['config'][62]['category'] = 'auth';
+
+$modversion['config'][63]['name'] = 'ldap_manager_dn';
+$modversion['config'][63]['title'] = '_MD_AM_LDAP_MANAGER_DN';
+$modversion['config'][63]['description'] = '_MD_AM_LDAP_MANAGER_DN_DESC';
+$modversion['config'][63]['formtype'] = 'textbox';
+$modversion['config'][63]['valuetype'] = 'text';
+$modversion['config'][63]['default'] = "manager_dn";
+$modversion['config'][63]['category'] = 'auth';
+
+$modversion['config'][64]['name'] = 'ldap_manager_pass';
+$modversion['config'][64]['title'] = '_MD_AM_LDAP_MANAGER_PASS';
+$modversion['config'][64]['description'] = '_MD_AM_LDAP_MANAGER_PASS_DESC';
+$modversion['config'][64]['formtype'] = 'textbox';
+$modversion['config'][64]['valuetype'] = 'text';
+$modversion['config'][64]['default'] = "manager_pass";
+$modversion['config'][64]['category'] = 'auth';
+
+$modversion['config'][65]['name'] = 'ldap_version';
+$modversion['config'][65]['title'] = '_MD_AM_LDAP_VERSION';
+$modversion['config'][65]['description'] = '_MD_AM_LDAP_VERSION_DESC';
+$modversion['config'][65]['formtype'] = 'textbox';
+$modversion['config'][65]['valuetype'] = 'text';
+$modversion['config'][65]['default'] = "3";
+$modversion['config'][65]['category'] = 'auth';
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/modules/system/xoops_version.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/notifications.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/notifications.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/notifications.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,217 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+$xoopsOption['pagetype'] = 'notification';
+include 'mainfile.php';
+
+if (empty($xoopsUser)) {
+ redirect_header('index.php', 3, _NOT_NOACCESS);
+ exit();
+}
+
+$uid = $xoopsUser->getVar('uid');
+
+$op = 'list';
+
+if (isset($_POST['op'])) {
+ $op = trim($_POST['op']);
+} elseif (isset($_GET['op'])) {
+ $op = trim($_GET['op']);
+}
+if (isset($_POST['delete'])) {
+ $op = 'delete';
+} elseif (isset($_GET['delete'])) {
+ $op = 'delete';
+}
+if (isset($_POST['delete_ok'])) {
+ $op = 'delete_ok';
+}
+if (isset($_POST['delete_cancel'])) {
+ $op = 'cancel';
+}
+
+switch ($op) {
+
+case 'cancel':
+
+ // FIXME: does this always go back to correct location??
+ redirect_header ('index.php');
+ break;
+
+case 'list':
+
+// Do we allow other users to see our notifications? Nope, but maybe
+// see who else is monitoring a particular item (or at least how many)?
+// Well, maybe admin can see all...
+
+// TODO: need to span over multiple pages...???
+
+ // Get an array of all notifications for the selected user
+
+ $criteria = new Criteria ('not_uid', $uid);
+ $criteria->setSort ('not_modid,not_category,not_itemid');
+ $notification_handler =& xoops_gethandler('notification');
+ $notifications =& $notification_handler->getObjects($criteria);
+
+ // Generate the info for the template
+
+ $module_handler =& xoops_gethandler('module');
+ include_once XOOPS_ROOT_PATH . '/include/notification_functions.php';
+
+ $modules = array();
+ $prev_modid = -1;
+ $prev_category = -1;
+ $prev_item = -1;
+ foreach ($notifications as $n) {
+ $modid = $n->getVar('not_modid');
+ if ($modid != $prev_modid) {
+ $prev_modid = $modid;
+ $prev_category = -1;
+ $prev_item = -1;
+ $module =& $module_handler->get($modid);
+ $modules[$modid] = array ('id'=>$modid, 'name'=>$module->getVar('name'), 'categories'=>array());
+ // TODO: note, we could auto-generate the url from the id
+ // and category info... (except when category has multiple
+ // subscription scripts defined...)
+ // OR, add one more option to xoops_version 'view_from'
+ // which tells us where to redirect... BUT, e.g. forums, it
+ // still wouldn't give us all the required info... e.g. the
+ // topic ID doesn't give us the ID of the forum which is
+ // a required argument...
+
+ // Get the lookup function, if exists
+ $not_config = $module->getInfo('notification');
+ $lookup_func = '';
+ if (!empty($not_config['lookup_file'])) {
+ $lookup_file = XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname') . '/' . $not_config['lookup_file'];
+ if (file_exists($lookup_file)) {
+ include_once $lookup_file;
+ if (!empty($not_config['lookup_func']) && function_exists($not_config['lookup_func'])) {
+ $lookup_func = $not_config['lookup_func'];
+ }
+ }
+ }
+ }
+ $category = $n->getVar('not_category');
+ if ($category != $prev_category) {
+ $prev_category = $category;
+ $prev_item = -1;
+ $category_info =& notificationCategoryInfo($category, $modid);
+ $modules[$modid]['categories'][$category] = array ('name'=>$category, 'title'=>$category_info['title'], 'items'=>array());
+ }
+ $item = $n->getVar('not_itemid');
+ if ($item != $prev_item) {
+ $prev_item = $item;
+ if (!empty($lookup_func)) {
+ $item_info = $lookup_func($category, $item);
+ } else {
+ $item_info = array ('name'=>'['._NOT_NAMENOTAVAILABLE.']', 'url'=>'');
+ }
+ $modules[$modid]['categories'][$category]['items'][$item] = array ('id'=>$item, 'name'=>$item_info['name'], 'url'=>$item_info['url'], 'notifications'=>array());
+ }
+ $event_info =& notificationEventInfo($category, $n->getVar('not_event'), $n->getVar('not_modid'));
+ $modules[$modid]['categories'][$category]['items'][$item]['notifications'][] = array ('id'=>$n->getVar('not_id'), 'module_id'=>$n->getVar('not_modid'), 'category'=>$n->getVar('not_category'), 'category_title'=>$category_info['title'], 'item_id'=>$n->getVar('not_itemid'), 'event'=>$n->getVar('not_event'), 'event_title'=>$event_info['title'], 'user_id'=>$n->getVar('not_uid'));
+ }
+ $xoopsOption['template_main'] = 'system_notification_list.html';
+ include XOOPS_ROOT_PATH.'/header.php';
+ $xoopsTpl->assign ('modules', $modules);
+ $user_info = array ('uid' => $xoopsUser->getVar('uid'));
+ $xoopsTpl->assign ('user', $user_info);
+ $xoopsTpl->assign ('lang_cancel', _CANCEL);
+ $xoopsTpl->assign ('lang_clear', _NOT_CLEAR);
+ $xoopsTpl->assign ('lang_delete', _DELETE);
+ $xoopsTpl->assign ('lang_checkall', _NOT_CHECKALL);
+ $xoopsTpl->assign ('lang_module', _NOT_MODULE);
+ $xoopsTpl->assign ('lang_event', _NOT_EVENT);
+ $xoopsTpl->assign ('lang_events', _NOT_EVENTS);
+ $xoopsTpl->assign ('lang_category', _NOT_CATEGORY);
+ $xoopsTpl->assign ('lang_itemid', _NOT_ITEMID);
+ $xoopsTpl->assign ('lang_itemname', _NOT_ITEMNAME);
+ $xoopsTpl->assign ('lang_activenotifications', _NOT_ACTIVENOTIFICATIONS);
+ $xoopsTpl->assign ('notification_token', $GLOBALS['xoopsSecurity']->createToken());
+ include XOOPS_ROOT_PATH.'/footer.php';
+
+// TODO: another display mode... instead of one notification per line,
+// show one line per item_id, with checkboxes for the available options...
+// and an update button to change them... And still have the delete box
+// to delete all notification for that item
+
+// How about one line per ID, showing category, name, id, and list of
+// events...
+
+// TODO: it would also be useful to provide links to other available
+// options so we can say switch from new_message to 'bookmark' if we
+// are receiving too many emails. OR, if we click on 'change options'
+// we get a form for that page...
+
+// TODO: option to specify one-time??? or other modes??
+
+ break;
+
+//case 'delete':
+case 'delete_ok':
+
+ if (empty($_POST['del_not'])) {
+ redirect_header('notifications.php', 2, _NOT_NOTHINGTODELETE);
+ }
+ include XOOPS_ROOT_PATH.'/header.php';
+ $hidden_vars = array('uid'=>$uid, 'delete_ok'=>1, 'del_not'=>$_POST['del_not']);
+ print '<h4>'._NOT_DELETINGNOTIFICATIONS.'</h4>';
+ $url = parse_url($_SERVER['REQUEST_URI']);
+ xoops_confirm($hidden_vars, $url['path'], _NOT_RUSUREDEL);
+ include XOOPS_ROOT_PATH.'/footer.php';
+
+// FIXME: There is a problem here... in xoops_confirm it treats arrays as
+// optional radio arguments on the confirmation page... change this or
+// write new function...
+
+ break;
+
+//case 'delete_ok':
+case 'delete':
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('notifications.php', 2, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if (empty($_POST['del_not'])) {
+ redirect_header('notifications.php', 2, _NOT_NOTHINGTODELETE);
+ }
+ $notification_handler =& xoops_gethandler('notification');
+ foreach ($_POST['del_not'] as $n_array) {
+ foreach ($n_array as $n) {
+ $notification =& $notification_handler->get($n);
+ if ($notification->getVar('not_uid') == $uid) {
+ $notification_handler->delete($notification);
+ }
+ }
+ }
+ redirect_header('notifications.php', 2, _NOT_DELETESUCCESS);
+ break;
+default:
+ break;
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/notifications.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/pda.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/pda.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/pda.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,56 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include "mainfile.php";
+header("Content-Type: text/html");
+
+echo "<html><head><title>". htmlspecialchars($xoopsConfig['sitename'])."</title>
+ <meta name='HandheldFriendly' content='True' />
+ <meta name='PalmComputingPlatform' content='True' />
+ </head>
+ <body>";
+
+$sql = "SELECT storyid, title FROM ".$xoopsDB->prefix("stories")." WHERE published>0 AND published<".time()." ORDER BY published DESC";
+
+$result = $xoopsDB->query($sql,10,0);
+
+if (!$result) {
+ echo "An error occured";
+} else {
+ echo "<img src='images/logo.gif' alt='".htmlspecialchars($xoopsConfig['sitename'])."' border='0' /><br />";
+ echo "<h2>".htmlspecialchars($xoopsConfig['slogan'])."</h2>";
+ echo "<div>";
+ while (list($storyid, $title) = $xoopsDB->fetchRow($result)) {
+ echo "<a href='".XOOPS_URL."/modules/news/print.php?storyid=$storyid'>".htmlspecialchars($title)."</a><br />";
+
+ }
+ echo "</div>";
+}
+
+echo "</body></html>";
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/pda.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/pmlite.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/pmlite.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/pmlite.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,37 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+include 'mainfile.php';
+$parsed_url = parse_url($_SERVER['REQUEST_URI']);
+$url = "modules/pm/pmlite.php";
+if ($querystring = strpos($parsed_url['path'], "?")) {
+ $url .= "?".substr($parsed_url['path'], $querystring, strlen($parsed_url['path'])-$querystring);
+}
+
+$url .= isset($_SERVER['QUERY_STRING']) ? "?".$_SERVER['QUERY_STRING'] : "";
+header('location: '.$url);
+//this file is deprecated
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/pmlite.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/readpmsg.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/readpmsg.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/readpmsg.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,30 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+header('location: modules/pm/readpmsg.php');
+//this file is deprecated
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/readpmsg.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/recovery.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/recovery.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/recovery.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,178 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+include 'mainfile.php';
+include_once XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/preferences.php";
+
+$confignames = array_map(array($GLOBALS['xoopsDB'], 'quoteString'), array('debug_mode', 'theme_set', 'theme_set_admin', 'enable_badips', 'template_set', 'session_expire'));
+$criteria = new CriteriaCompo(new Criteria('conf_name', "(".implode(',', $confignames).")", "IN"));
+$config_handler =& xoops_gethandler('config');
+/* @var $config_handler XoopsConfigHandler */
+
+$config =& $config_handler->getConfigs($criteria);
+/* @var $config XoopsConfigItem */
+
+if (!is_object($xoopsUser) || !$xoopsUser->isAdmin(1)) {
+ if (isset($_POST['login'])) {
+ //do login
+ include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/user.php';
+ $uname = !isset($_POST['uname']) ? '' : trim($_POST['uname']);
+ $pass = !isset($_POST['pass']) ? '' : trim($_POST['pass']);
+ if ($uname == '' || $pass == '') {
+ redirect_header(XOOPS_URL.'/user.php', 1, _US_INCORRECTLOGIN);
+ exit();
+ }
+ $member_handler =& xoops_gethandler('member');
+ $myts =& MyTextsanitizer::getInstance();
+ $user =& $member_handler->loginUser(addslashes($myts->stripSlashesGPC($uname)), addslashes($myts->stripSlashesGPC($pass)));
+ if (false != $user) {
+ if (0 == $user->getVar('level') || (!in_array(XOOPS_GROUP_ADMIN, $user->getGroups()))) {
+ redirect_header(XOOPS_URL.'/index.php', 5, _US_NOACTTPADM);
+ exit();
+ }
+ $_SESSION = array();
+ $_SESSION['xoopsUserId'] = $user->getVar('uid');
+ $_SESSION['xoopsUserGroups'] = $user->getGroups();
+ if ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
+ setcookie($xoopsConfig['session_name'], session_id(), time()+(60 * $xoopsConfig['session_expire']), '/', '', 0);
+ }
+ }
+ }
+ else {
+ include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
+ $form = new XoopsThemeForm('Login', 'login_form', 'recovery.php');
+ $form->addElement(new XoopsFormText(_USERNAME, 'uname', 12, 255));
+ $form->addElement(new XoopsFormPassword(_PASSWORD, 'pass', 12, 255));
+ $form->addElement(new XoopsFormButton('', 'login', _SUBMIT, 'submit'));
+ $form->display();
+ exit();
+ }
+
+}
+elseif (isset($_POST['submit'])) {
+ foreach (array_keys($config) as $i) {
+ $new_value = $_POST[$config[$i]->getVar('conf_name')];
+ $config[$i]->setConfValueForInput($new_value);
+ $config_handler->insertConfig($config[$i]);
+ unset($new_value);
+ }
+ // echo $xoopsLogger->dumpAll();
+ echo "<div>Settings Saved</div>";
+}
+
+include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
+$form = new XoopsThemeForm('Recovery Page', 'pref_form', 'recovery.php');
+foreach (array_keys($config) as $i) {
+ $title = (!defined($config[$i]->getVar('conf_desc')) || constant($config[$i]->getVar('conf_desc')) == '') ? constant($config[$i]->getVar('conf_title')) : constant($config[$i]->getVar('conf_title')).'<br /><br /><span style="font-weight:normal;">'.constant($config[$i]->getVar('conf_desc')).'</span>';
+ switch ($config[$i]->getVar('conf_formtype')) {
+ case 'theme':
+ case 'theme_multi':
+ $ele = ($config[$i]->getVar('conf_formtype') != 'theme_multi') ? new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()) : new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), 5, true);
+ $handle = opendir(XOOPS_THEME_PATH.'/');
+ $dirlist = array();
+ while (false !== ($file = readdir($handle))) {
+ if (is_dir(XOOPS_THEME_PATH.'/'.$file) && !preg_match("/^[.]{1,2}$/",$file) && strtolower($file) != 'cvs') {
+ if (file_exists(XOOPS_THEME_PATH."/".$file."/theme.html") || file_exists(XOOPS_THEME_PATH."/".$file."/theme.php")) {
+ $dirlist[$file]=$file;
+ }
+ }
+ }
+ closedir($handle);
+ if (!empty($dirlist)) {
+ asort($dirlist);
+ $ele->addOptionArray($dirlist);
+ }
+ $form->addElement(new XoopsFormHidden('_old_theme', $config[$i]->getConfValueForOutput()));
+ break;
+
+ case 'theme_admin':
+ $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput());
+ $ele->addOption(0, _MD_AM_FRONTSIDE_THEME);
+
+ $handle = opendir(XOOPS_THEME_PATH.'/');
+ $dirlist = array();
+ while (false !== ($file = readdir($handle))) {
+ if (is_dir(XOOPS_THEME_PATH.'/'.$file) && !preg_match("/^[.]{1,2}$/",$file) && strtolower($file) != 'cvs') {
+ if (file_exists(XOOPS_THEME_PATH."/".$file."/themeadmin.html")) {
+ $dirlist[$file]=$file;
+ }
+ }
+ }
+ closedir($handle);
+ if (!empty($dirlist)) {
+ asort($dirlist);
+ $ele->addOptionArray($dirlist);
+ }
+ $form->addElement(new XoopsFormHidden('_old_admintheme', $config[$i]->getConfValueForOutput()));
+ break;
+
+ case 'tplset':
+ $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput());
+ $tplset_handler =& xoops_gethandler('tplset');
+ $tplsetlist =& $tplset_handler->getList();
+ asort($tplsetlist);
+ foreach ($tplsetlist as $key => $name) {
+ $ele->addOption($key, $name);
+ }
+ break;
+
+ case 'select':
+ $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput());
+ $options =& $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id')));
+ $opcount = count($options);
+ for ($j = 0; $j < $opcount; $j++) {
+ $optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value');
+ $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name');
+ $ele->addOption($optval, $optkey);
+ }
+ break;
+
+ case 'yesno':
+ $ele = new XoopsFormRadioYN($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), _YES, _NO);
+ break;
+
+ case 'select_multi':
+ $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), 5, true);
+ $options =& $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id')));
+ $opcount = count($options);
+ for ($j = 0; $j < $opcount; $j++) {
+ $optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value');
+ $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name');
+ $ele->addOption($optval, $optkey);
+ }
+ break;
+ }
+ $hidden = new XoopsFormHidden('conf_ids[]', $config[$i]->getVar('conf_id'));
+ $form->addElement($ele);
+ $form->addElement($hidden);
+ unset($ele);
+ unset($hidden);
+}
+$form->addElement(new XoopsFormHidden('op', 'save'));
+$form->addElement(new XoopsFormButton('', 'submit', _GO, 'submit'));
+$form->display();
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/recovery.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/register.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/register.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/register.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,33 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include 'mainfile.php';
+$parsed_url = parse_url($_SERVER['REQUEST_URI']);
+$url = "modules/profile/register.php";
+header('location: '.$url);
+//this file is deprecated
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/register.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/robots.txt
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/robots.txt 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/robots.txt 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,13 @@
+User-agent: *
+Disallow: /cgi-bin/
+Disallow: /tmp/
+Disallow: /cache/
+Disallow: /class/
+Disallow: /images/
+Disallow: /include/
+Disallow: /install/
+Disallow: /kernel/
+Disallow: /language/
+Disallow: /templates_c/
+Disallow: /themes/
+Disallow: /uploads/
Added: XoopsCore/branches/2.2.x/2.2-main/html/search.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/search.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/search.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,293 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+$xoopsOption['pagetype'] = "search";
+
+include 'mainfile.php';
+$config_handler =& xoops_gethandler('config');
+$xoopsConfigSearch =& $config_handler->getConfigsByCat(XOOPS_CONF_SEARCH);
+
+if ($xoopsConfigSearch['enable_search'] != 1) {
+ header('Location: '.XOOPS_URL.'/index.php');
+ exit();
+}
+$action = "search";
+if (!empty($_GET['action'])) {
+ $action = $_GET['action'];
+} elseif (!empty($_POST['action'])) {
+ $action = $_POST['action'];
+}
+$query = "";
+if (!empty($_GET['query'])) {
+ $query = $_GET['query'];
+} elseif (!empty($_POST['query'])) {
+ $query = $_POST['query'];
+}
+$andor = "AND";
+if (!empty($_GET['andor'])) {
+ $andor = $_GET['andor'];
+} elseif (!empty($_POST['andor'])) {
+ $andor = $_POST['andor'];
+}
+$mid = $uid = $start = 0;
+if ( !empty($_GET['mid']) ) {
+ $mid = intval($_GET['mid']);
+} elseif ( !empty($_POST['mid']) ) {
+ $mid = intval($_POST['mid']);
+}
+if (!empty($_GET['uid'])) {
+ $uid = intval($_GET['uid']);
+} elseif (!empty($_POST['uid'])) {
+ $uid = intval($_POST['uid']);
+}
+if (!empty($_GET['start'])) {
+ $start = intval($_GET['start']);
+} elseif (!empty($_POST['start'])) {
+ $start = intval($_POST['start']);
+}
+
+$queries = array();
+
+if ($action == "results") {
+ if ($query == "") {
+ redirect_header("search.php",1,_SR_PLZENTER);
+ exit();
+ }
+} elseif ($action == "showall") {
+ if ($query == "" || empty($mid)) {
+ redirect_header("search.php",1,_SR_PLZENTER);
+ exit();
+ }
+} elseif ($action == "showallbyuser") {
+ if (empty($mid) || empty($uid)) {
+ redirect_header("search.php",1,_SR_PLZENTER);
+ exit();
+ }
+}
+
+$groups = ( $xoopsUser ) ? $xoopsUser -> getGroups() : XOOPS_GROUP_ANONYMOUS;
+$gperm_handler = & xoops_gethandler( 'groupperm' );
+$available_modules = $gperm_handler->getItemIds('module_read', $groups);
+
+if ($action == 'search') {
+ include XOOPS_ROOT_PATH.'/header.php';
+ include 'include/searchform.php';
+ $search_form->display();
+ include XOOPS_ROOT_PATH.'/footer.php';
+ exit();
+}
+
+if ( $andor != "OR" && $andor != "exact" && $andor != "AND" ) {
+ $andor = "AND";
+}
+
+$myts =& MyTextSanitizer::getInstance();
+if ($action != 'showallbyuser') {
+ if ( $andor != "exact" ) {
+ $ignored_queries = array(); // holds kewords that are shorter than allowed minmum length
+ $temp_queries = preg_split('/[\s,]+/', $query);
+ foreach ($temp_queries as $q) {
+ $q = trim($q);
+ if (strlen($q) >= $xoopsConfigSearch['keyword_min']) {
+ $queries[] = $myts->addSlashes($q);
+ } else {
+ $ignored_queries[] = $myts->addSlashes($q);
+ }
+ }
+ if (count($queries) == 0) {
+ redirect_header('search.php', 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch['keyword_min']));
+ exit();
+ }
+ } else {
+ $query = trim($query);
+ if (strlen($query) < $xoopsConfigSearch['keyword_min']) {
+ redirect_header('search.php', 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch['keyword_min']));
+ exit();
+ }
+ $queries = array($myts->addSlashes($query));
+ }
+}
+switch ($action) {
+ case "results":
+ $module_handler =& xoops_gethandler('module');
+ $criteria = new CriteriaCompo(new Criteria('hassearch', 1));
+ $criteria->add(new Criteria('isactive', 1));
+ $criteria->add(new Criteria('mid', "(".implode(',', $available_modules).")", 'IN'));
+ $modules =& $module_handler->getObjects($criteria, true);
+ $mids = isset($_REQUEST['mids']) ? $_REQUEST['mids'] : array();
+ if (empty($mids) || !is_array($mids)) {
+ unset($mids);
+ $mids = array_keys($modules);
+ }
+ include XOOPS_ROOT_PATH."/header.php";
+ echo "<h3>"._SR_SEARCHRESULTS."</h3>\n";
+ echo _SR_KEYWORDS.':';
+ if ($andor != 'exact') {
+ foreach ($queries as $q) {
+ echo ' <b>'.htmlspecialchars(stripslashes($q)).'</b>';
+ }
+ if (!empty($ignored_queries)) {
+ echo '<br />';
+ printf(_SR_IGNOREDWORDS, $xoopsConfigSearch['keyword_min']);
+ foreach ($ignored_queries as $q) {
+ echo ' <b>'.htmlspecialchars(stripslashes($q)).'</b>';
+ }
+ }
+ } else {
+ echo ' "<b>'.htmlspecialchars(stripslashes($queries[0])).'</b>"';
+ }
+ echo '<br />';
+ foreach ($mids as $mid) {
+ $mid = intval($mid);
+ if ( in_array($mid, $available_modules) ) {
+ $module =& $modules[$mid];
+ $results =& $module->search($queries, $andor, 5, 0);
+ $count = count($results);
+ if (is_array($results) && $count > 0) {
+ echo "<h4>".$myts->makeTboxData4Show($module->getVar('name'))."</h4>";
+ for ($i = 0; $i < $count; $i++) {
+ if (isset($results[$i]['image']) && $results[$i]['image'] != "") {
+ echo "<img src='modules/".$module->getVar('dirname')."/".$results[$i]['image']."' alt='".$myts->makeTboxData4Show($module->getVar('name'))."' /> ";
+ } else {
+ echo "<img src='images/icons/posticon2.gif' alt='".$myts->makeTboxData4Show($module->getVar('name'))."' width='26' height='26' /> ";
+ }
+ if (!preg_match("/^http[s]*:\/\//i", $results[$i]['link'])) {
+ $results[$i]['link'] = "modules/".$module->getVar('dirname')."/".$results[$i]['link'];
+ }
+ echo "<b><a href='".$results[$i]['link']."'>".$myts->makeTboxData4Show($results[$i]['title'])."</a></b><br />\n";
+ echo "<small>";
+ $results[$i]['uid'] = intval($results[$i]['uid']);
+ if ( !empty($results[$i]['uid']) ) {
+ $uname = XoopsUser::getUnameFromId($results[$i]['uid']);
+ echo " <a href='".XOOPS_URL."/userinfo.php?uid=".$results[$i]['uid']."'>".$uname."</a>\n";
+ }
+ echo $results[$i]['time'] ? " (". formatTimestamp(intval($results[$i]['time'])).")" : "";
+ echo "</small><br />\n";
+ }
+ if ( $count == 5 ) {
+ $search_url = XOOPS_URL.'/search.php?query='.urlencode(stripslashes(implode(' ', $queries)));
+ $search_url .= "&mid=$mid&action=showall&andor=$andor";
+ echo '<br /><a href="'.$search_url.'">'._SR_SHOWALLR.'</a></p>';
+ }
+ }
+ }
+ unset($results);
+ unset($module);
+ }
+ include "include/searchform.php";
+ $search_form->display();
+ break;
+ case "showall":
+ case 'showallbyuser':
+ include XOOPS_ROOT_PATH."/header.php";
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->get($mid);
+ $results =& $module->search($queries, $andor, 20, $start, $uid);
+ $count = count($results);
+ if (is_array($results) && $count > 0) {
+ $next_results =& $module->search($queries, $andor, 1, $start + 20, $uid);
+ $next_count = count($next_results);
+ $has_next = false;
+ if (is_array($next_results) && $next_count == 1) {
+ $has_next = true;
+ }
+ echo "<h4>"._SR_SEARCHRESULTS."</h4>\n";
+ if ($action == 'showall') {
+ echo _SR_KEYWORDS.':';
+ if ($andor != 'exact') {
+ foreach ($queries as $q) {
+ echo ' <b>'.htmlspecialchars(stripslashes($q)).'</b>';
+ }
+ } else {
+ echo ' "<b>'.htmlspecialchars(stripslashes($queries[0])).'</b>"';
+ }
+ echo '<br />';
+ }
+ // printf(_SR_FOUND,$count);
+ // echo "<br />";
+ printf(_SR_SHOWING, $start+1, $start + $count);
+ echo "<h5>".$myts->makeTboxData4Show($module->getVar('name'))."</h5>";
+ for ($i = 0; $i < $count; $i++) {
+ if (isset($results[$i]['image']) && $results[$i]['image'] != '') {
+ echo "<img src='modules/".$module->getVar('dirname')."/".$results[$i]['image']."' alt='".$myts->makeTboxData4Show($module->getVar('name'))."' /> ";
+ } else {
+ echo "<img src='images/icons/posticon2.gif' alt='".$myts->makeTboxData4Show($module->name())."' width='26' height='26' /> ";
+ }
+ if (!preg_match("/^http[s]*:\/\//i", $results[$i]['link'])) {
+ $results[$i]['link'] = "modules/".$module->getVar('dirname')."/".$results[$i]['link'];
+ }
+ echo "<b><a href='".$results[$i]['link']."'>".$myts->makeTboxData4Show($results[$i]['title'])."</a></b><br />\n";
+ echo "<small>";
+ $results[$i]['uid'] = intval($results[$i]['uid']);
+ if ( !empty($results[$i]['uid']) ) {
+ $uname = XoopsUser::getUnameFromId($results[$i]['uid']);
+ echo " <a href='".XOOPS_URL."/userinfo.php?uid=".$results[$i]['uid']."'>".$uname."</a>\n";
+ }
+ echo $results[$i]['time'] ? " (". formatTimestamp(intval($results[$i]['time'])).")" : "";
+ echo "</small><br />\n";
+ }
+ echo '
+ <table>
+ <tr>
+ ';
+ $search_url = XOOPS_URL.'/search.php?query='.urlencode(stripslashes(implode(' ', $queries)));
+ $search_url .= "&mid=$mid&action=$action&andor=$andor";
+ if ($action=='showallbyuser') {
+ $search_url .= "&uid=$uid";
+ }
+ if ( $start > 0 ) {
+ $prev = $start - 20;
+ echo '<td align="left">
+ ';
+ $search_url_prev = $search_url."&start=$prev";
+ echo '<a href="'.htmlspecialchars($search_url_prev).'">'._SR_PREVIOUS.'</a></td>
+ ';
+ }
+ echo '<td> </td>
+ ';
+ if (false != $has_next) {
+ $next = $start + 20;
+ $search_url_next = $search_url."&start=$next";
+ echo '<td align="right"><a href="'.htmlspecialchars($search_url_next).'">'._SR_NEXT.'</a></td>
+ ';
+ }
+ echo '
+ </tr>
+ </table>
+ <p>
+ ';
+ } else {
+ echo '<p>'._SR_NOMATCH.'</p>';
+ }
+ include "include/searchform.php";
+ $search_form->display();
+ echo '</p>
+ ';
+ break;
+}
+include XOOPS_ROOT_PATH."/footer.php";
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/search.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/templates_c/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/templates_c/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/templates_c/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+<script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/templates_c/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/README.txt
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/README.txt 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/README.txt 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,23 @@
+XDT - A theme for xoops 2.1
+by ralf57
+V 0.6 01/05/2005
+
+#######################
+INSTALLATION
+#######################
+1)Copy the "xdt" directory to
+your_site/themes/
+
+2)Upload the theme's xdt directory to the webserver's XOOPS_ROOT/themes/ directory
+
+3)Enable the "xdt" theme trough your site General settings
+for both "Default Theme" and "Admin Theme"
+
+4)Enjoy!
+
+If you have troubles/requests contact me at
+royalfamily at email.it
+or,better,post in xoops.org's support forums
+http://www.xoops.org/modules/newbb/
+
+Nice Xoopsing!
\ No newline at end of file
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockcenter_c.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockcenter_c.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockcenter_c.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,6 @@
+<div style="padding: 5px;">
+ <fieldset>
+ <{if $block.title != ""}><legend class="blockTitle"><{$block.title}></legend><{/if}>
+ <div class="blockContent"><{$block.content}></div>
+ </fieldset>
+</div>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockcenter_c.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockcenter_l.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockcenter_l.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockcenter_l.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,6 @@
+<div style="padding: 0px 0px 0px 8px;">
+ <fieldset>
+ <{if $block.title != ""}><legend class="blockTitle"><{$block.title}></legend><{/if}>
+ <div class="blockContent"><{$block.content}></div>
+ </fieldset>
+</div>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockcenter_l.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockcenter_r.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockcenter_r.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockcenter_r.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,6 @@
+<div style="padding: 0px 5px 0px 0px;">
+ <fieldset>
+ <{if $block.title != ""}><legend class="blockTitle"><{$block.title}></legend><{/if}>
+ <div class="blockContent"><{$block.content}></div>
+ </fieldset>
+</div>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockcenter_r.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockleft.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockleft.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockleft.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,3 @@
+<{if $block.title != ""}><div class="blockTitle"><{$block.title}></div><{/if}>
+<div class="blockContent"><{$block.content}></div>
+
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockleft.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockright.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockright.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockright.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,2 @@
+<{if $block.title != ""}><div class="blockTitle"><{$block.title}></div><{/if}>
+<div class="blockContent"><{$block.content}></div>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/blocks/theme_blockright.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/calendar.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/calendar.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/calendar.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,252 @@
+/* The main calendar widget. DIV containing a table. */
+
+.calendar {
+ position: relative;
+ display: none;
+ border: 1px solid;
+ border-color: #fff #000 #000 #fff;
+ font-size: 11px;
+ cursor: default;
+ background: Window;
+ color: WindowText;
+ font-family: tahoma,verdana,sans-serif;
+ width: 1%;
+}
+
+.calendar table {
+ border: 1px solid;
+ border-color: #fff #000 #000 #fff;
+ font-size: 11px;
+ cursor: default;
+ background: Window;
+ color: WindowText;
+ font-family: tahoma,verdana,sans-serif;
+}
+
+/* Header part -- contains navigation buttons and day names. */
+
+.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
+ text-align: center;
+ padding: 1px;
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+ background: ButtonFace;
+}
+
+.calendar .nav {
+ background: ButtonFace url(menuarrow.gif) no-repeat 100% 100%;
+}
+
+.calendar thead .title { /* This holds the current "month, year" */
+ font-weight: bold;
+ padding: 1px;
+ border: 1px solid #000;
+ background: ActiveCaption;
+ color: CaptionText;
+ text-align: center;
+}
+
+.calendar thead .headrow { /* Row <TR> containing navigation buttons */
+}
+
+.calendar thead .daynames { /* Row <TR> containing the day names */
+}
+
+.calendar thead .name { /* Cells <TD> containing the day names */
+ border-bottom: 1px solid ButtonShadow;
+ padding: 2px;
+ text-align: center;
+ background: ButtonFace;
+ color: ButtonText;
+}
+
+.calendar thead .weekend { /* How a weekend day name shows in header */
+ color: #f00;
+}
+
+.calendar thead .hilite { /* How do the buttons in header appear when hover */
+ border: 2px solid;
+ padding: 0px;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+}
+
+.calendar thead .active { /* Active (pressed) buttons in header */
+ border-width: 1px;
+ padding: 2px 0px 0px 2px;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+
+/* The body part -- contains all the days in month. */
+
+.calendar tbody .day { /* Cells <TD> containing month days dates */
+ width: 2em;
+ text-align: right;
+ padding: 2px 4px 2px 2px;
+}
+.calendar tbody .day.othermonth {
+ font-size: 80%;
+ color: #aaa;
+}
+.calendar tbody .day.othermonth.oweekend {
+ color: #faa;
+}
+
+.calendar table .wn {
+ padding: 2px 3px 2px 2px;
+ border-right: 1px solid ButtonShadow;
+ background: ButtonFace;
+ color: ButtonText;
+}
+
+.calendar tbody .rowhilite td {
+ background: Highlight;
+ color: HighlightText;
+}
+
+.calendar tbody td.hilite { /* Hovered cells <TD> */
+ padding: 1px 3px 1px 1px;
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+}
+
+.calendar tbody td.active { /* Active (pressed) cells <TD> */
+ padding: 2px 2px 0px 2px;
+ border: 1px solid;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+
+.calendar tbody td.selected { /* Cell showing selected date */
+ font-weight: bold;
+ border: 1px solid;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+ padding: 2px 2px 0px 2px;
+ background: ButtonFace;
+ color: ButtonText;
+}
+
+.calendar tbody td.weekend { /* Cells showing weekend days */
+ color: #f00;
+}
+
+.calendar tbody td.today { /* Cell showing today date */
+ font-weight: bold;
+ color: #00f;
+}
+
+.calendar tbody td.disabled { color: GrayText; }
+
+.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
+ visibility: hidden;
+}
+
+.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
+ display: none;
+}
+
+/* The footer part -- status bar and "Close" button */
+
+.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
+}
+
+.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
+ background: ButtonFace;
+ padding: 1px;
+ border: 1px solid;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+ color: ButtonText;
+ text-align: center;
+}
+
+.calendar tfoot .hilite { /* Hover style for buttons in footer */
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+ padding: 1px;
+ background: #e4e0d8;
+}
+
+.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
+ padding: 2px 0px 0px 2px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+}
+
+/* Combo boxes (menus that display months/years for direct selection) */
+
+.calendar .combo {
+ position: absolute;
+ display: none;
+ width: 4em;
+ top: 0px;
+ left: 0px;
+ cursor: default;
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+ background: Menu;
+ color: MenuText;
+ font-size: 90%;
+ padding: 1px;
+ z-index: 100;
+}
+
+.calendar .combo .label,
+.calendar .combo .label-IEfix {
+ text-align: center;
+ padding: 1px;
+}
+
+.calendar .combo .label-IEfix {
+ width: 4em;
+}
+
+.calendar .combo .active {
+ padding: 0px;
+ border: 1px solid #000;
+}
+
+.calendar .combo .hilite {
+ background: Highlight;
+ color: HighlightText;
+}
+
+.calendar td.time {
+ border-top: 1px solid ButtonShadow;
+ padding: 1px 0px;
+ text-align: center;
+ background-color: ButtonFace;
+}
+
+.calendar td.time .hour,
+.calendar td.time .minute,
+.calendar td.time .ampm {
+ padding: 0px 3px 0px 4px;
+ border: 1px solid #889;
+ font-weight: bold;
+ background-color: Menu;
+}
+
+.calendar td.time .ampm {
+ text-align: center;
+}
+
+.calendar td.time .colon {
+ padding: 0px 2px 0px 3px;
+ font-weight: bold;
+}
+
+.calendar td.time span.hilite {
+ border-color: #000;
+ background-color: Highlight;
+ color: HighlightText;
+}
+
+.calendar td.time span.active {
+ border-color: #f00;
+ background-color: #000;
+ color: #0f0;
+}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/calendar.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/style.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/style.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/style.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,185 @@
+body { color: #272727;background-color : #ffffff;background-image: url(../images/bg.gif); font-size: 12px; font-family: /*"lucida sans unicode",*/Verdana, Arial, Helvetica, sans-serif; margin: 0px; padding: 0px;}
+
+table {width: 100%;text-align: left;}
+table.toptable , table.maintable , table.footertable{width: 90%;margin-left: auto;margin-right: auto;}
+table td {padding: 0; border-width: 0; vertical-align: top;font-size: 12px;font-family: /*"lucida sans unicode",*/Verdana, Arial, Helvetica, sans-serif;}
+
+table.maintable {height:500px;background-color : #ffffff;border-left: 1px solid #aca899;border-right: 1px solid #aca899;border-bottom: 1px solid #aca899;}
+table.toptable {border-left: 1px solid #aca899;border-right: 1px solid #aca899;background-color: #2F5376;}
+div {font-size: 12px;}
+
+
+a {color: #676767;font-size: 90%; text-decoration: none;font-weight: bold; background-color: transparent;}
+a:hover {color: #272727;text-decoration: underline;}
+
+img {border: 0px;}
+img#swap {width: 9px;height: 9px;}
+
+h1 {}
+h2 {}
+h3 {}
+h4 {}
+h5 {}
+ul { margin: 2px; padding: 2px; list-style: decimal inside; text-align: left;}
+li { margin-left: 2px; list-style: square inside; color: #436792}
+
+fieldset {padding: 10px;border: 1px solid #aca899;}
+
+legend {font-weight: bold;}
+
+div.wrapper { text-align: center; }
+
+.centered {text-align: center;}
+
+.item {margin-bottom: 10px; border: 1px solid #D0D0E0;}
+.itemHead {background-color: #f7f7f7;position: relative;margin-bottom: 10px;z-index: 0; padding: 5px;}
+.itemBody {background-color: #ffffff;position: relative;margin-bottom: 10px;z-index: 0; padding: 5px;}
+.itemTitle {/*color: #003150;*/font-size: 110%;font-weight: normal;text-decoration: none;margin: 0px 0px .2em 0px;padding: 0px 0px 2px 0px;}
+.itemInfo {/*color: #8CA6B6;*/font-size: 0.85em; text-align: right; padding-right: 5px;}
+.itemBody {margin-top: 5px; margin-bottom: 5px; line-height: 1.5em;}
+.itemText:first-letter {font-size: 133%; font-weight: bold;}
+.itemAdminLink {font-size: 95%;}
+.itemPermaLink {font-size: 95%;}
+.itemPoster {font-size: 95%; /*font-style:italic;*/}
+.itemPostDate {font-size: 95%/*; font-style:italic;*/}
+.itemTitle a { text-decoration: none; }
+.itemFoot {text-align: right; background-color: #f7f7f7; padding: 5px;}
+
+.comTitle a { text-decoration: none; }
+.comTitle {/font-size: 110%;font-weight: normal;text-decoration: none;margin: 0px 0px .2em 0px;padding: 0px 0px 2px 0px;border-bottom: 1px solid #d0d0e0;}
+.comText {/*position: relative;margin: 5px 5px 5px 15px;left: 120px;float: left;*/line-height: 1.5em;padding: 0px;}
+.comUserStat {font-size: 10px; color: #436792; font-weight:bold; border: 1px solid silver; background-color: #ffffff; margin: 2px; padding: 2px;}
+.comUserStatCaption {font-weight: bold;}
+.comUserStatus {color: #436792; font-weight:bold;}
+.comUserRank {margin: 2px;}
+.comUserRankText {font-size: 10px;font-weight:bold;}
+.comUserRankImg {border: 0;}
+.comUserName {}
+.comUserImg {margin: 2px;}
+.comDate {font-weight: normal; font-style: italic; font-size: smaller}
+.comDateCaption {font-weight: bold; font-style: normal;}
+
+.comUserdetails {float: left;/*position: relative;top: 50px;left: 10px;*/font-size: 0.85em;border: 1px solid #d0d0e0;background-color: #fff9ef;padding: 3px;/*margin: 5px 5px 5px 5px;*/text-align: center;margin: 5px 10px 5px 0px;z-index: 0; }
+.comUserName {font-weight: bold;font-size: 110%;}
+
+.comIcons {float: right;position: relative;font-size: 0.85em;top: -25px;right: 5px;}
+.com_tl {background-image: url(../images/news_tl.gif);background-position: 0% 0%;background-repeat: no-repeat;position: relative;top: -1px;left: -1px;}
+.com_tr {background-image: url(../images/news_tr.gif);background-position: 100% 0%;background-repeat: no-repeat;position: relative;left: 2px;}
+.com_br {background-image: url(../images/news_br.gif);background-position: 100% 100%;background-repeat: no-repeat;position: relative;top: 2px;}
+.com_bl {background-image: url(../images/news_bl.gif);background-position: 0% 100%;background-repeat: no-repeat;position: relative;left: -2px;padding: .8em;overflow: hidden;}
+.comContainer {background-color: #ffffff;border: 1px solid #D0D0E0;position: relative;margin-bottom: 10px;z-index: 0;}
+
+th {background-color: #436792;color: #FFFFFF; padding : 2px; vertical-align : middle; font-family: Verdana, Arial, Helvetica, sans-serif;}
+
+td#headerbanner {width: 60%;vertical-align: middle; text-align:center;}
+
+td#headerbar {height: 20px;}
+
+td#date {color: #272727;width: 20%;text-align: left;vertical-align: middle;padding-left: 5px;font-weight: bold;font-size: 90%;}
+td#search {width: 95%;text-align: right;vertical-align: middle;padding-right: 10px;}
+
+td#leftcolumn {width: 165px;height:560px;font-size:11px;background-color: #f7f7f7;padding: 10px 3px 4px 3px;}
+td#leftcolumn th {background-color: #436792; color: #FFFFFF; vertical-align: middle;}
+td#leftcolumn div.blockTitle {text-align: left;padding: 3px 3px 3px 22px; background-color: #436792;background-image:url(../images/item_new.gif);background-position: left;background-repeat: no-repeat; color: #f7f7f7; font-weight: bold;}
+td#leftcolumn div.blockContent {padding: 3px; line-height: 120%;}
+
+td#leftcolumn_nobg {width: 160px;height:560px; font-size:11px;background-color: #ffffff;padding: 20px 5px 5px 5px;}
+
+td#centercolumn {font-size: 11px;}
+
+td#centercolumn th {background-color: #436792; color: #FFFFFF; vertical-align: middle;}
+td#centerCcolumn {padding: 0px 3px 1px 3px;}
+td#centerCcolumn legend.blockTitle {padding: 3px; color: #639ACE; font-weight: bold; margin-top: 0px; margin-right: 0px; margin-left: 0px;}
+td#centerCcolumn div.blockContent {margin-right: 0px; margin-left: 0px; margin-bottom: 2px; line-height: 120%;}
+
+td#centerLcolumn {width: 50%; padding: 0px 3px 0px 0px;}
+td#centerLcolumn legend.blockTitle {padding: 3px; color: #639ACE; font-weight: bold; margin-top: 0px;}
+td#centerLcolumn div.blockContent {padding: 3px; margin-left: 3px; margin-right: 2px; margin-bottom: 2px; line-height: 120%;}
+
+td#centerRcolumn {width: 50%; padding: 0px 3px 0px 0px;}
+td#centerRcolumn legend.blockTitle {padding: 3px; color: #639ACE; font-weight: bold; margin-top: 0px;}
+td#centerRcolumn div.blockContent {padding: 3px; margin-left: 2px; margin-right: 3px; margin-bottom: 2px; line-height: 120%;}
+
+div#content {text-align: left; padding: 8px;}
+
+td#rightcolumn {width: 165px; height:550px;background-color: #f7f7f7; font-size:11px;padding: 10px 2px 4px 4px;}
+td#rightcolumn th {background-color: #436792; color: #FFFFFF; vertical-align: middle;}
+td#rightcolumn div.blockTitle {text-align: left;padding: 3px 3px 3px 22px; background-color: #436792;background-image:url(../images/item_new.gif);background-position: left;background-repeat: no-repeat; color: #f7f7f7; font-weight: bold;}
+td#rightcolumn div.blockContent {padding: 3px; line-height: 120%;}
+
+td#footerbar {text-align:center;background-color: #436792;color: #edeff1;}
+td#footerbar a{color: #edeff1;}
+
+td#mainmenu a {color: #676767;background-color: transparent; display: block; margin: 0; padding: 2px;border: 1px solid transparent;text-decoration: none;}
+td#mainmenu a:hover {color: #272727; background-color: transparent;border: 1px solid transparent;text-decoration: none;}
+td#mainmenu a.menuTop {padding-left: 3px; }
+td#mainmenu a.menuMain {padding-left: 3px; }
+td#mainmenu a.menuSub {color: #436792;border: 0px;background-color: transparent;padding-left: 9px;}
+
+td#usermenu a {background-color: #e6e6e6; display: block; margin: 0; padding: 4px; border-right: 1px solid #666666; border-bottom: 1px solid #666666; border-left: 1px solid silver;}
+td#usermenu a:hover {background-color: #ffffff;}
+td#usermenu a.menuTop {border-top: 1px solid silver;}
+td#usermenu a.highlight {background-color: #fcc;}
+
+.outer {border: 1px solid #CCCCCC;}
+.head {background-color: #e7e7e7; padding: 3px; font-weight: normal;}
+.even {background-color: #e7e7e7; padding: 3px;}
+.odd {background-color: #f7f7f7; padding: 3px;}
+.foot {background-color: #436792; padding: 3px; font-weight: bold;text-align: center;}
+tr.head td {background-color: #B6CDE4; padding: 3px; font-weight: bold;}
+tr.even td {background-color: #efefef; padding: 3px;}
+tr.odd td {background-color: #f7f7f7; padding: 3px;}
+tr.foot td {background-color: #f7f7f7; padding: 3px; font-weight: bold;}
+
+/* forms elements */
+input { border: 1px solid #CCCCCC;font-size: 11px; font-family: verdana, arial, helvetica, sans-serif; color: #333333; background-color: #ffffff;padding-left:3px;background-color: #f7f7f7;}
+textarea {background-color: #f7f7f7;color: #333333; border: #CCCCCC 1px solid; width: 430px; font-size: 11px; font-family: verdana, arial, helvetica, sans-serif;}
+select {border: 1px solid #CCCCCC; font-size: 11px; font-family: verdana, arial, helvetica, sans-serif;}
+.formButton {background-color: #ece9e3;color: #676767;font-weight: bold;text-align:center;}
+input:focus, textarea:focus{background-color: #ffffff;border: 1px solid #9f9f9f;}
+
+.search_block {margin-top: 0px;}
+#notifs_form {display: none;}
+
+div.errorMsg { background-color: #FFCCCC; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold; padding: 10px;}
+div.confirmMsg { background-color: #DDFFDF; color: #136C99; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold; padding: 10px;}
+div.resultMsg { background-color : #CCCCCC; color: #333333; text-align: center; border-top: 1px solid silver; border-left: 1px solid silver; font-weight: bold; border-right: 1px solid #666666; border-bottom: 1px solid #666666; padding: 10px;}
+
+div.xoopsCode { background: #FFFFFF; border: 1px inset #000080; font-family: "Courier New",Courier,monospace; padding: 0px 6px 6px 6px; height: 200px; overflow: auto;}
+div.xoopsQuote { background: #FFFFFF; border: 1px inset #000080; font-family: "Courier New",Courier,monospace; padding: 0px 6px 6px 6px;}
+
+
+/* Nav bar start...*/
+#navbar {background: #ece9d8;border-bottom: 1px solid #aca899;padding-top: 2px;padding-bottom: 2px;padding-left: 5px;cursor: default;}
+
+.NavMenu {font-family: Verdana,Tahoma,Georgia,sans-serif;font-size: 11px;/*-moz-user-select: none;*/}
+
+.NavMenu .button,
+.NavMenu .button:hover,
+.NavMenu .button-active,
+.NavMenu .button-active:hover {line-height: normal;padding: 3px 6px 3px 6px;border: 1px solid #ECE9D8;color: #676767;text-decoration: none;font-family: Tahoma,Georgia,sans-serif;font-size: 11px;font-weight: bold;cursor: default;white-space: nowrap;display: block;position: relative;}
+
+.NavMenu .button:hover {border-color: #ffffff #ACA899 #ACA899 #ffffff;color: #272727;}
+
+.NavMenu .button-active,
+.NavMenu .button-active:hover {border-color: #ACA899 #ffffff #ffffff #ACA899;color: #272727;}
+
+.NavMenu .item,
+.NavMenu .item:hover,
+.NavMenu .item-active,
+.NavMenu .item-active:hover {background-color: #ffffff;font-family: Tahoma,Georgia,sans-serif;font-size: 11px;line-height: normal;padding: 3px 16px 4px 10px;color: #676767;border: 0px solid transparent;text-decoration: none;font-weight: bold;cursor: default;white-space: nowrap;display: block;position: relative;}
+
+.NavMenu .item:hover,
+.NavMenu .item-active,
+.NavMenu .item-active:hover {background-color: #efefef;color: #272727;border: 0px solid #316AC5;}
+
+.NavMenu .section {background-color: #ffffff;border: 1px solid #b8b4ae;position: absolute;visibility: hidden;z-index: -1;}
+
+.NavMenu .arrow {position: absolute;top: 7px;right: 8px;border: 0;}
+
+.NavMenu hr{height: 1px;width: 90%;border: 0px none;color: #24237f;background-color: #24237f;}
+
+* html .NavMenu td { position: relative;} /* ie 5.0 fix */
+/* ...Nav bar end */
+
+.section .item {margin-bottom: 0px;}
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/style.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleAdmin.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleAdmin.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleAdmin.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,15 @@
+ at import url(style.css);
+#buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0; }
+#buttonbar { float:left; width:100%; background: #e7e7e7 url('../images/modadminbg.gif') repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; }
+#buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; }
+#buttonbar li { display:inline; margin:0; padding:0; }
+#buttonbar a { float:left; background:url('../images/left_both.gif') no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; }
+#buttonbar a span { float:left; display:block; background:url('../images/right_both.gif') no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; }
+/* Commented Backslash Hack hides rule from IE5-Mac \*/
+#buttonbar a span {float:none;}
+/* End IE5-Mac hack */
+#buttonbar a:hover span { color:#333; }
+#buttonbar .current a { background-position:0 -150px; border-width:0; }
+#buttonbar .current a span { background-position:100% -150px; padding-bottom:5px; color:#333; }
+#buttonbar a:hover { background-position:0% -150px; }
+#buttonbar a:hover span { background-position:100% -150px; }
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleAdmin.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleAdminMAC.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleAdminMAC.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleAdminMAC.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ at import url(styleAdmin.css);
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleAdminMAC.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleAdminNN.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleAdminNN.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleAdminNN.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ at import url(styleAdmin.css);
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleAdminNN.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleMAC.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleMAC.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleMAC.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,3 @@
+ at import url(style.css);
+/* Very short Mac-specific additions/changes here (if
+any) */
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleMAC.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleNN.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleNN.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleNN.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,3 @@
+ at import url(style.css);
+/* Very short Gecko-specific additions/changes here (if
+any) */
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/css/styleNN.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/bg.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/bg.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/delete_small.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/delete_small.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/edit_small.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/edit_small.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/head_bg.jpg
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/head_bg.jpg
___________________________________________________________________
Name: svn:mime-type
+ image/jpeg
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/item_new.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/item_new.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/left_both.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/left_both.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/logo.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/logo.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/logo.jpg
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/logo.jpg
___________________________________________________________________
Name: svn:mime-type
+ image/jpeg
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/mail.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/mail.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/menuarrow1.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/menuarrow1.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/menuarrow2.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/menuarrow2.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/minus.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/minus.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/modadminbg.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/modadminbg.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/news_bl.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/news_bl.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/news_br.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/news_br.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/news_tl.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/news_tl.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/news_tr.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/news_tr.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/pdf.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/pdf.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/plus.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/plus.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/print.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/print.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/reply_small.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/reply_small.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/right_both.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/images/right_both.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/js/adminmenu.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/js/adminmenu.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/js/adminmenu.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,88 @@
+/*
+ * DO NOT REMOVE THIS NOTICE
+ *
+ * PROJECT: mygosuMenu
+ * VERSION: 1.4.2
+ * COPYRIGHT: (c) 2003,2004 Cezary Tomczak
+ * LINK: http://gosu.pl/dhtml/mygosumenu.html
+ * LICENSE: BSD (revised)
+ */
+function AdMenu(id) { this.type = "horizontal"; this.position = { "level1": { "top": 0, "left": 0}, "levelX": { "top": 0, "left": 0}
+}
+this.zIndex = { "visible": 1, "hidden": -1
+}
+this.arrow1 = null; this.arrow2 = null; this.browser = { "ie": Boolean(document.body.currentStyle), "ie5": (navigator.appVersion.indexOf("MSIE 5.5") != -1 || navigator.appVersion.indexOf("MSIE 5.0") != -1)
+}; if (!this.browser.ie) { this.browser.ie5 = false;}
+this.init = function() { if (!document.getElementById(this.id)) alert("Element '"+ this.id +"' does not exist in this document. AdMenu cannot be initialized."); if (this.type != "horizontal" && this.type != "vertical") { return alert("AdMenu.init() failed. Unknown menu type: '"+this.type+"'");}
+document.onmousedown = click; if (this.browser.ie && this.browser.ie5) { this.fixWrap();}
+this.fixSections(); this.parse(document.getElementById(this.id).childNodes, this.tree, this.id);}
+this.fixSections = function() { var arr = document.getElementById(this.id).getElementsByTagName("div"); var sections = new Array(); var widths = new Array(); for (var i = 0; i < arr.length; i++) { if (arr[i].className == "section") { sections.push(arr[i]);}
+}
+for (var i = 0; i < sections.length; i++) { widths.push(this.getMaxWidth(sections[i].childNodes));}
+for (var i = 0; i < sections.length; i++) { sections[i].style.width = (widths[i]) + "px";}
+if (self.browser.ie) { for (var i = 0; i < sections.length; i++) { this.setMaxWidth(sections[i].childNodes, widths[i]);}
+}
+}
+this.fixWrap = function() { var elements = document.getElementById(this.id).getElementsByTagName("a"); for (var i = 0; i < elements.length; i++) { if (/item/.test(elements[i].className)) { elements[i].innerHTML = '<div nowrap="nowrap">'+elements[i].innerHTML+'</div>';}
+}
+}
+this.getMaxWidth = function(nodes) { var maxWidth = 0; for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType != 1 || nodes[i].className == "section") { continue;}
+if (nodes[i].offsetWidth > maxWidth) maxWidth = nodes[i].offsetWidth;}
+return maxWidth;}
+this.setMaxWidth = function(nodes, maxWidth) { for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType == 1 && /item/.test(nodes[i].className) && nodes[i].currentStyle) { if (this.browser.ie5) { nodes[i].style.width = (maxWidth) + "px";} else { nodes[i].style.width = (maxWidth - parseInt(nodes[i].currentStyle.paddingLeft) - parseInt(nodes[i].currentStyle.paddingRight)) + "px";}
+}
+}
+}
+this.parse = function(nodes, tree, id) { for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType != 1) { continue }; switch (nodes[i].className) { case "button":
+nodes[i].id = id + "-" + tree.length; tree.push(new Array()); nodes[i].onmouseover = buttonOver; nodes[i].onclick = buttonClick; break; case "item":
+nodes[i].id = id + "-" + tree.length; tree.push(new Array()); nodes[i].onmouseover = itemOver; nodes[i].onmouseout = itemOut; nodes[i].onclick = itemClick; break; case "section":
+nodes[i].id = id + "-" + (tree.length - 1) + "-section"; var box1 = document.getElementById(id + "-" + (tree.length - 1)); var box2 = document.getElementById(nodes[i].id); var el = new Element(box1.id); if (el.level == 1) { if (this.type == "horizontal") { box2.style.top = (box1.offsetTop + box1.offsetHeight + this.position.level1.top) + "px"; if (this.browser.ie5) { box2.style.left = (this.position.level1.left) + "px";} else { box2.style.left = (box1.offsetLeft + this.position.level1.left) + "px";}
+} else if (this.type == "vertical") { box2.style.top = (box1.offsetTop + this.position.level1.top) + "px"; if (this.browser.ie5) { box2.style.left = (box1.offsetWidth + this.position.level1.left) + "px";} else { box2.style.left = (box1.offsetLeft + box1.offsetWidth + this.position.level1.left) + "px";}
+}
+} else { box2.style.top = (box1.offsetTop + this.position.levelX.top) + "px"; box2.style.left = (box1.offsetLeft + box1.offsetWidth + this.position.levelX.left) + "px";}
+break; case "arrow":
+nodes[i].id = id + "-" + (tree.length - 1) + "-arrow"; break;}
+if (nodes[i].childNodes) { if (nodes[i].className == "section") { this.parse(nodes[i].childNodes, tree[tree.length - 1], id + "-" + (tree.length - 1));} else { this.parse(nodes[i].childNodes, tree, id);}
+}
+}
+}
+this.hideAll = function() { for (var i = this.visible.length - 1; i >= 0; i--) { this.hide(this.visible[i]);}
+}
+this.hideHigherOrEqualLevels = function(n) { for (var i = this.visible.length - 1; i >= 0; i--) { var el = new Element(this.visible[i]); if (el.level >= n) { this.hide(el.id);} else { return;}
+}
+}
+this.hide = function(id) { var el = new Element(id); document.getElementById(id).className = (el.level == 1 ? "button" : "item"); if (el.level > 1 && this.arrow2) { document.getElementById(id + "-arrow").src = this.arrow1;}
+document.getElementById(id + "-section").style.visibility = "hidden"; document.getElementById(id + "-section").style.zIndex = this.zIndex.hidden; if (this.visible.contains(id)) { if (this.visible.getLast() == id) { this.visible.pop();} else { throw "AdMenu.hide("+id+") failed, trying to hide element that is not deepest visible element";}
+} else { throw "AdMenu.hide("+id+") failed, cannot hide element that is not visible";}
+}
+this.show = function(id) { var el = new Element(id); document.getElementById(id).className = (el.level == 1 ? "button-active" : "item-active"); if (el.level > 1 && this.arrow2) { document.getElementById(id + "-arrow").src = this.arrow2;}
+document.getElementById(id + "-section").style.visibility = "visible"; document.getElementById(id + "-section").style.zIndex = this.zIndex.visible; this.visible.push(id);}
+function click(e) { var el; if (e) { el = e.target.tagName ? e.target : e.target.parentNode;} else { el = window.event.srcElement; if (el.parentNode && /item/.test(el.parentNode.className)) { el = el.parentNode;}
+}
+if (!self.visible.length) { return }; if (!el.onclick) { self.hideAll();}
+}
+function buttonOver() { if (!self.visible.length) { return;}
+if (self.visible.contains(this.id)) { return }; self.hideAll(); var el = new Element(this.id); if (el.hasChilds()) { self.show(this.id);}
+}
+function buttonClick() { this.blur(); if (self.visible.length) { self.hideAll();} else { var el = new Element(this.id); if (el.hasChilds()) { self.show(this.id);}
+}
+}
+function itemOver() { var el = new Element(this.id); self.hideHigherOrEqualLevels(el.level); if (el.hasChilds()) { self.show(this.id);}
+}
+function itemOut() { var el = new Element(this.id); if (!el.hasChilds()) { document.getElementById(this.id).className = "item";}
+}
+function itemClick() { this.blur(); var el = new Element(this.id); self.hideHigherOrEqualLevels(el.level); if (el.hasChilds()) { self.show(this.id);}
+}
+function Element(id) { this.getLevel = function() { var s = this.id.substr(this.menu.id.length); return s.substrCount("-");}
+this.hasChilds = function() { return Boolean(document.getElementById(this.id + "-section"));}
+if (!id) { throw "AdMenu.Element(id) failed, id cannot be empty";}
+this.menu = self; this.id = id; this.level = this.getLevel();}
+this.id = id; var self = this; this.tree = new Array(); this.visible = new Array();}
+if (typeof Array.prototype.contains == "undefined") { Array.prototype.contains = function(s) { for (var i = 0; i < this.length; i++) { if (this[i] === s) { return true;}
+}
+return false;}
+}
+if (typeof Array.prototype.getLast == "undefined") { Array.prototype.getLast = function() { return this[this.length-1];}
+}
+if (typeof String.prototype.substrCount == "undefined") { String.prototype.substrCount = function(s) { return this.split(s).length - 1;}
+}
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/js/adminmenu_src.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/js/adminmenu_src.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/js/adminmenu_src.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,322 @@
+/*
+ * DO NOT REMOVE THIS NOTICE
+ *
+ * PROJECT: mygosuMenu
+ * VERSION: 1.4.2
+ * COPYRIGHT: (c) 2003,2004 Cezary Tomczak
+ * LINK: http://gosu.pl/dhtml/mygosumenu.html
+ * LICENSE: BSD (revised)
+ */
+
+function AdMenu(id) {
+
+ this.type = "horizontal";
+ this.position = {
+ "level1": { "top": 0, "left": 0},
+ "levelX": { "top": 0, "left": 0}
+ }
+ this.zIndex = {
+ "visible": 1,
+ "hidden": -1
+ }
+ this.arrow1 = null;
+ this.arrow2 = null;
+
+ // Browser detection
+ this.browser = {
+ "ie": Boolean(document.body.currentStyle),
+ "ie5": (navigator.appVersion.indexOf("MSIE 5.5") != -1 || navigator.appVersion.indexOf("MSIE 5.0") != -1)
+ };
+ if (!this.browser.ie) { this.browser.ie5 = false; }
+
+ /* Initialize the menu */
+ this.init = function() {
+ if (!document.getElementById(this.id)) alert("Element '"+ this.id +"' does not exist in this document. AdMenu cannot be initialized.");
+ if (this.type != "horizontal" && this.type != "vertical") { return alert("AdMenu.init() failed. Unknown menu type: '"+this.type+"'"); }
+ document.onmousedown = click;
+ if (this.browser.ie && this.browser.ie5) { this.fixWrap(); }
+ this.fixSections();
+ this.parse(document.getElementById(this.id).childNodes, this.tree, this.id);
+ }
+
+ /* Search for .section elements and set width for them */
+ this.fixSections = function() {
+ var arr = document.getElementById(this.id).getElementsByTagName("div");
+ var sections = new Array();
+ var widths = new Array();
+
+ for (var i = 0; i < arr.length; i++) {
+ if (arr[i].className == "section") {
+ sections.push(arr[i]);
+ }
+ }
+ for (var i = 0; i < sections.length; i++) {
+ widths.push(this.getMaxWidth(sections[i].childNodes));
+ }
+ for (var i = 0; i < sections.length; i++) {
+ sections[i].style.width = (widths[i]) + "px";
+ }
+ if (self.browser.ie) {
+ for (var i = 0; i < sections.length; i++) {
+ this.setMaxWidth(sections[i].childNodes, widths[i]);
+ }
+ }
+ }
+
+ this.fixWrap = function() {
+ var elements = document.getElementById(this.id).getElementsByTagName("a");
+ for (var i = 0; i < elements.length; i++) {
+ if (/item/.test(elements[i].className)) {
+ elements[i].innerHTML = '<div nowrap="nowrap">'+elements[i].innerHTML+'</div>';
+ }
+ }
+ }
+
+ /* Search for an element with highest width, return that width */
+ this.getMaxWidth = function(nodes) {
+ var maxWidth = 0;
+ for (var i = 0; i < nodes.length; i++) {
+ if (nodes[i].nodeType != 1 || nodes[i].className == "section") { continue; }
+ if (nodes[i].offsetWidth > maxWidth) maxWidth = nodes[i].offsetWidth;
+ }
+ return maxWidth;
+ }
+
+ /* Set width for item elements */
+ this.setMaxWidth = function(nodes, maxWidth) {
+ for (var i = 0; i < nodes.length; i++) {
+ if (nodes[i].nodeType == 1 && /item/.test(nodes[i].className) && nodes[i].currentStyle) {
+ if (this.browser.ie5) {
+ nodes[i].style.width = (maxWidth) + "px";
+ } else {
+ nodes[i].style.width = (maxWidth - parseInt(nodes[i].currentStyle.paddingLeft) - parseInt(nodes[i].currentStyle.paddingRight)) + "px";
+ }
+ }
+ }
+ }
+
+ /* Parse menu structure, create events, position elements */
+ this.parse = function(nodes, tree, id) {
+ for (var i = 0; i < nodes.length; i++) {
+ if (nodes[i].nodeType != 1) { continue };
+ switch (nodes[i].className) {
+ case "button":
+ nodes[i].id = id + "-" + tree.length;
+ tree.push(new Array());
+ nodes[i].onmouseover = buttonOver;
+ nodes[i].onclick = buttonClick;
+ break;
+ case "item":
+ nodes[i].id = id + "-" + tree.length;
+ tree.push(new Array());
+ nodes[i].onmouseover = itemOver;
+ nodes[i].onmouseout = itemOut;
+ nodes[i].onclick = itemClick;
+ break;
+ case "section":
+ nodes[i].id = id + "-" + (tree.length - 1) + "-section";
+ var box1 = document.getElementById(id + "-" + (tree.length - 1));
+ var box2 = document.getElementById(nodes[i].id);
+ var el = new Element(box1.id);
+ if (el.level == 1) {
+ if (this.type == "horizontal") {
+ box2.style.top = (box1.offsetTop + box1.offsetHeight + this.position.level1.top) + "px";
+ if (this.browser.ie5) {
+ box2.style.left = (this.position.level1.left) + "px";
+ } else {
+ box2.style.left = (box1.offsetLeft + this.position.level1.left) + "px";
+ }
+ } else if (this.type == "vertical") {
+ box2.style.top = (box1.offsetTop + this.position.level1.top) + "px";
+ if (this.browser.ie5) {
+ box2.style.left = (box1.offsetWidth + this.position.level1.left) + "px";
+ } else {
+ box2.style.left = (box1.offsetLeft + box1.offsetWidth + this.position.level1.left) + "px";
+ }
+ }
+ } else {
+ box2.style.top = (box1.offsetTop + this.position.levelX.top) + "px";
+ box2.style.left = (box1.offsetLeft + box1.offsetWidth + this.position.levelX.left) + "px";
+ }
+ break;
+ case "arrow":
+ nodes[i].id = id + "-" + (tree.length - 1) + "-arrow";
+ break;
+ }
+ if (nodes[i].childNodes) {
+ if (nodes[i].className == "section") {
+ this.parse(nodes[i].childNodes, tree[tree.length - 1], id + "-" + (tree.length - 1));
+ } else {
+ this.parse(nodes[i].childNodes, tree, id);
+ }
+ }
+ }
+ }
+
+ /* Hide all sections */
+ this.hideAll = function() {
+ for (var i = this.visible.length - 1; i >= 0; i--) {
+ this.hide(this.visible[i]);
+ }
+ }
+
+ /* Hide higher or equal levels */
+ this.hideHigherOrEqualLevels = function(n) {
+ for (var i = this.visible.length - 1; i >= 0; i--) {
+ var el = new Element(this.visible[i]);
+ if (el.level >= n) {
+ this.hide(el.id);
+ } else {
+ return;
+ }
+ }
+ }
+
+ /* Hide a section */
+ this.hide = function(id) {
+ var el = new Element(id);
+ document.getElementById(id).className = (el.level == 1 ? "button" : "item");
+ if (el.level > 1 && this.arrow2) {
+ document.getElementById(id + "-arrow").src = this.arrow1;
+ }
+ document.getElementById(id + "-section").style.visibility = "hidden";
+ document.getElementById(id + "-section").style.zIndex = this.zIndex.hidden;
+ if (this.visible.contains(id)) {
+ if (this.visible.getLast() == id) {
+ this.visible.pop();
+ } else {
+ throw "AdMenu.hide("+id+") failed, trying to hide element that is not deepest visible element";
+ }
+ } else {
+ throw "AdMenu.hide("+id+") failed, cannot hide element that is not visible";
+ }
+ }
+
+ /* Show a section */
+ this.show = function(id) {
+ var el = new Element(id);
+ document.getElementById(id).className = (el.level == 1 ? "button-active" : "item-active");
+ if (el.level > 1 && this.arrow2) {
+ document.getElementById(id + "-arrow").src = this.arrow2;
+ }
+ document.getElementById(id + "-section").style.visibility = "visible";
+ document.getElementById(id + "-section").style.zIndex = this.zIndex.visible;
+ this.visible.push(id);
+ }
+
+ /* event, document.onmousedown */
+ function click(e) {
+ var el;
+ if (e) {
+ el = e.target.tagName ? e.target : e.target.parentNode;
+ } else {
+ el = window.event.srcElement;
+ if (el.parentNode && /item/.test(el.parentNode.className)) {
+ el = el.parentNode;
+ }
+ }
+ if (!self.visible.length) { return };
+ if (!el.onclick) { self.hideAll(); }
+ }
+
+ /* event, button.onmouseover */
+ function buttonOver() {
+ if (!self.visible.length) { return; }
+ if (self.visible.contains(this.id)) { return };
+ self.hideAll();
+ var el = new Element(this.id);
+ if (el.hasChilds()) {
+ self.show(this.id);
+ }
+ }
+
+ /* event, button.onclick */
+ function buttonClick() {
+ this.blur();
+ if (self.visible.length) {
+ self.hideAll();
+ } else {
+ var el = new Element(this.id);
+ if (el.hasChilds()) {
+ self.show(this.id);
+ }
+ }
+ }
+
+ /* event, item.onmouseover */
+ function itemOver() {
+ var el = new Element(this.id);
+ self.hideHigherOrEqualLevels(el.level);
+ if (el.hasChilds()) {
+ self.show(this.id);
+ }
+ }
+
+ /* event, item.onmouseout */
+ function itemOut() {
+ var el = new Element(this.id);
+ if (!el.hasChilds()) {
+ document.getElementById(this.id).className = "item";
+ }
+ }
+
+ /* event, item.onclick */
+ function itemClick() {
+ this.blur();
+ var el = new Element(this.id);
+ self.hideHigherOrEqualLevels(el.level);
+ if (el.hasChilds()) {
+ self.show(this.id);
+ }
+ }
+
+ function Element(id) {
+
+ /* Get Level of given id
+ * Examples: menu-1 (1 level), menu-1-4 (2 level) */
+ this.getLevel = function() {
+ var s = this.id.substr(this.menu.id.length);
+ return s.substrCount("-");
+ }
+
+ /* Check whether an element has a sub-section */
+ this.hasChilds = function() {
+ return Boolean(document.getElementById(this.id + "-section"));
+ }
+
+ if (!id) { throw "AdMenu.Element(id) failed, id cannot be empty"; }
+ this.menu = self;
+ this.id = id;
+ this.level = this.getLevel();
+ }
+
+ this.id = id;
+ var self = this;
+
+ this.tree = new Array(); /* Multidimensional array, structure of the menu */
+ this.visible = new Array(); /* Example: Array("menu-0", "menu-0-4", ...), succession is important ! */
+}
+
+/* Check whether array contains given string */
+if (typeof Array.prototype.contains == "undefined") {
+ Array.prototype.contains = function(s) {
+ for (var i = 0; i < this.length; i++) {
+ if (this[i] === s) { return true; }
+ }
+ return false;
+ }
+}
+
+/* Get the last element from the array */
+if (typeof Array.prototype.getLast == "undefined") {
+ Array.prototype.getLast = function() {
+ return this[this.length-1];
+ }
+}
+
+/* Counts the number of substring occurrences */
+if (typeof String.prototype.substrCount == "undefined") {
+ String.prototype.substrCount = function(s) {
+ return this.split(s).length - 1;
+ }
+}
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/js/ie5.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/js/ie5.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/js/ie5.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,82 @@
+// +----------------------------------------------------------------+
+// | Array functions that are missing in IE 5.0 |
+// | Author: Cezary Tomczak [www.gosu.pl] |
+// | Free for any use as long as all copyright messages are intact. |
+// +----------------------------------------------------------------+
+
+// Removes the last element from an array and returns that element.
+if (!Array.prototype.pop) {
+ Array.prototype.pop = function() {
+ var last;
+ if (this.length) {
+ last = this[this.length - 1];
+ this.length -= 1;
+ }
+ return last;
+ };
+}
+
+// Adds one or more elements to the end of an array and returns the new length of the array.
+if (!Array.prototype.push) {
+ Array.prototype.push = function() {
+ for (var i = 0; i < arguments.length; ++i) {
+ this[this.length] = arguments[i];
+ }
+ return this.length;
+ };
+}
+
+// Removes the first element from an array and returns that element.
+if (!Array.prototype.shift) {
+ Array.prototype.shift = function() {
+ var first;
+ if (this.length) {
+ first = this[0];
+ for (var i = 0; i < this.length - 1; ++i) {
+ this[i] = this[i + 1];
+ }
+ this.length -= 1;
+ }
+ return first;
+ };
+}
+
+// Adds one or more elements to the front of an array and returns the new length of the array.
+if (!Array.prototype.unshift) {
+ Array.prototype.unshift = function() {
+ if (arguments.length) {
+ var i, len = arguments.length;
+ for (i = this.length + len - 1; i >= len; --i) {
+ this[i] = this[i - len];
+ }
+ for (i = 0; i < len; ++i) {
+ this[i] = arguments[i];
+ }
+ }
+ return this.length;
+ };
+}
+
+// Adds and/or removes elements from an array.
+if (!Array.prototype.splice) {
+ Array.prototype.splice = function(index, howMany) {
+ var elements = [], removed = [], i;
+ for (i = 2; i < arguments.length; ++i) {
+ elements.push(arguments[i]);
+ }
+ for (i = index; (i < index + howMany) && (i < this.length); ++i) {
+ removed.push(this[i]);
+ }
+ for (i = index + howMany; i < this.length; ++i) {
+ this[i - howMany] = this[i];
+ }
+ this.length -= removed.length;
+ for (i = this.length + elements.length - 1; i >= index + elements.length; --i) {
+ this[i] = this[i - elements.length];
+ }
+ for (i = 0; i < elements.length; ++i) {
+ this[index + i] = elements[i];
+ }
+ return removed;
+ };
+}
\ No newline at end of file
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/js/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/js/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/js/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/js/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/english/admin.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/english/admin.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/english/admin.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,25 @@
+<?php
+define('_AD_NAV_ACTIONS', "Actions");
+define('_AD_NAV_CPHOME', "Admin index");
+define('_AD_NAV_SITEHOME', "Go to homepage");
+define('_AD_NAV_XOOPSORG', "Xoops.org news");
+define('_AD_NAV_LOGOUT', "Logout");
+define('_AD_NAV_PREFS', "Preferences");
+define('_AD_NAV_GENERAL', "General Settings");
+define('_AD_NAV_USERSETTINGS', "User Info Settings");
+define('_AD_NAV_METAFOOTER', "Meta Tags and Footer");
+define('_AD_NAV_CENSOR', "Word Censoring Options");
+define('_AD_NAV_SEARCH', "Search Options");
+define('_AD_NAV_MAILER', "Mail Setup");
+define('_AD_NAV_MODULES', "Modules");
+define('_AD_NAV_MODADMIN', "Administration");
+define('_AD_NAV_BLOCKS', "Blocks");
+define('_AD_NAV_BLVIS', "List visible blocks");
+define('_AD_NAV_BLHID', "List hidden blocks");
+define('_AD_NAV_BLALL', "List all blocks");
+define('_AD_NAV_BLNEW', "Add new block");
+define('_AD_NAV_USERS', "Users");
+define('_AD_NAV_MISC', "Misc.Tools");
+
+define('_AD_NAV_MODHOME', "Go to Module");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/english/admin.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/english/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/english/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/english/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/english/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/english/main.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/english/main.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/english/main.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,8 @@
+<?php
+define("_MA_NAV_ACTIONS", "User Actions");
+define("_MA_NAV_VIEWACCOUNT", "View Account");
+define("_MA_NAV_EDITACCOUNT", "Edit Account");
+define("_MA_NAV_NOTIFICATIONS", "Notifications");
+define("_MA_NAV_LOGOUT", "Logout");
+define("_MA_NAV_ADMINISTRATION", "Administration");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/english/main.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/language/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/theme_adminnav.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/theme_adminnav.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/theme_adminnav.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,103 @@
+ <!-- ADMIN NAVIGATION BAR START -->
+ <div id="navbar">
+ <table cellspacing="0" cellpadding="0" id="menu1" class="NavMenu">
+ <tr>
+ <td>
+ <a class="button" href="javascript:void(0)"><{$smarty.const._AD_NAV_ACTIONS}></a>
+ <div class="section">
+ <a class="item" href="<{$xoops_url}>/admin.php"><{$smarty.const._AD_NAV_CPHOME}></a>
+ <a class="item" href="<{$xoops_url}>/admin.php?xoopsorgnews=1"><{$smarty.const._AD_NAV_XOOPSORG}></a>
+ <a class="item" href="<{$xoops_url}>/"><{$smarty.const._AD_NAV_SITEHOME}></a>
+ <a class="item" href="<{$xoops_url}>/user.php?op=logout"><{$smarty.const._AD_NAV_LOGOUT}></a>
+ </div>
+ </td>
+ <{if isset($systemmenu.links.3)}>
+ <td>
+ <a class="button" href="javascript:void(0)"><{$smarty.const._AD_NAV_PREFS}></a>
+ <div class="section">
+ <{foreach item=module from=$systemmenu.links.3.sublinks}>
+ <a class="item" href="javascript:void(0)"><{$module.name}><img class="arrow" src="<{$xoops_imageurl}>images/menuarrow1.gif" width="4" height="7" alt="" /></a>
+ <div class="section">
+ <{foreach item=cat from=$module.cats}>
+ <a class="item" href='<{$cat.link}>'><{$cat.title}></a>
+ <{/foreach}>
+ </div>
+ <{/foreach}>
+ </div>
+ </td>
+ <{/if}>
+ <{if isset($adminmenu)}>
+ <td>
+ <a class="button" href="javascript:void(0)"><{$smarty.const._AD_NAV_MODULES}></a>
+ <div class="section">
+ <{if isset($systemmenu.links.4)}>
+ <a class="item" href="<{$systemmenu.links.4.link}>"><{$smarty.const._AD_NAV_MODADMIN}></a>
+ <hr />
+ <{/if}>
+ <{foreach item=module from=$adminmenu key=counter}>
+ <a class="item" href="javascript:void(0)"><{$module.name}><img class="arrow" src="<{$xoops_imageurl}>images/menuarrow1.gif" width="4" height="7" alt="" /></a>
+ <div class="section">
+ <{foreach item=menuitem from=$module.links}>
+ <a class="item" href="<{$menuitem.link}>"><{$menuitem.title}></a>
+ <{/foreach}>
+ </div>
+ <{/foreach}>
+ </div>
+ </td>
+ <{/if}>
+ <{if isset($systemmenu.links.5)}>
+ <td>
+ <a class="button" href="javascript:void(0)"><{$smarty.const._AD_NAV_BLOCKS}></a>
+ <div class="section">
+ <a class="item" href='<{$xoops_url}>/modules/system/admin.php?fct=blocksadmin&selmod=-1&selgrp=2&selvis=2'><{$smarty.const._AD_NAV_BLALL}></a>
+ </div>
+ </td>
+ <{/if}>
+ <{if isset($systemmenu.links.8) || isset($systemmenu.links.11) || isset($systemmenu.links.1)}>
+ <td>
+ <a class="button" href="javascript:void(0)"><{$smarty.const._AD_NAV_USERS}></a>
+ <div class="section">
+ <{if isset($systemmenu.links.7)}>
+ <a class="item" href='<{$systemmenu.links.7.link}>'><{$systemmenu.links.7.title}></a>
+ <{/if}>
+ <{if isset($systemmenu.links.8)}>
+ <a class="item" href='<{$systemmenu.links.8.link}>'><{$systemmenu.links.8.title}></a>
+ <{/if}>
+ <{if isset($systemmenu.links.11)}>
+ <a class="item" href='<{$systemmenu.links.11.link}>'><{$systemmenu.links.11.title}></a>
+ <{/if}>
+ <{if isset($systemmenu.links.1)}>
+ <a class="item" href='<{$systemmenu.links.1.link}>'><{$systemmenu.links.1.title}></a>
+ <{/if}>
+ </div>
+ </td>
+ <{/if}>
+ <td>
+ <a class="button" href="javascript:void(0)"><{$smarty.const._AD_NAV_MISC}></a>
+ <div class="section">
+ <{if isset($systemmenu.links.13)}>
+ <a class="item" href='<{$systemmenu.links.13.link}>'><{$systemmenu.links.13.title}></a>
+ <{/if}>
+ <{if isset($systemmenu.links.1)}>
+ <a class="item" href='<{$systemmenu.links.9.link}>'><{$systemmenu.links.9.title}></a>
+ <{/if}>
+ <{if isset($systemmenu.links.12)}>
+ <a class="item" href='<{$systemmenu.links.12.link}>'><{$systemmenu.links.12.title}></a>
+ <{/if}>
+ <{if isset($systemmenu.links.10)}>
+ <a class="item" href='<{$systemmenu.links.10.link}>'><{$systemmenu.links.10.title}></a>
+ <{/if}>
+ <{if isset($systemmenu.links.15)}>
+ <a class="item" href='<{$systemmenu.links.15.link}>'><{$systemmenu.links.15.title}></a>
+ <{/if}>
+ <{if isset($systemmenu.links.14)}>
+ <a class="item" href='<{$systemmenu.links.14.link}>'><{$systemmenu.links.14.title}></a>
+ <{/if}>
+ </div>
+ </td>
+ <td id="search">
+ <!-- <{$xoops_uname}>@<{$xoops_sitename}> -->
+ </td>
+ </tr>
+ </table>
+ </div>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/theme_adminnav.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/theme_moduleadmin.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/theme_moduleadmin.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/theme_moduleadmin.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,26 @@
+<div id='buttontop'>
+ <table style="width: 100%; padding: 0; " cellspacing="0">
+ <tr>
+ <td style="width: 70%; font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;">
+ <a href="../index.php"><{$smarty.const._AD_NAV_MODHOME}></a>
+ </td>
+ <td style="width: 30%; font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;">
+ <b><{$modulemenu.name}> <{$smarty.const._AD_NAV_MODADMIN}></b> <{$modulemenu.breadcrumb}>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div id='buttonbar'>
+ <ul>
+ <{foreach item=link from=$modulemenu.links key=id}>
+ <{if $id == $modulemenu.current}>
+ <li class='current'>
+ <{else}>
+ <li>
+ <{/if}>
+ <a href='<{$link.link}>'><span><{$link.title}></span></a>
+ </li>
+ <{/foreach}>
+ </ul>
+ </div>
+ <br style="clear:both;" />
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/theme_moduleadmin.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/theme_usernav.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/theme_usernav.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/theme_usernav.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,35 @@
+ <!-- USER NAVIGATION BAR START -->
+ <div id="navbar">
+ <table cellspacing="0" cellpadding="0" id="menu1" class="NavMenu">
+ <tr>
+ <{if $xoops_isuser == 1}>
+ <td>
+ <a class="button" href="javascript:void(0)"><{$smarty.const._MA_NAV_ACTIONS}></a>
+ <div class="section">
+ <a class="item" href="<{$xoops_url}>/user.php"><{$smarty.const._MA_NAV_VIEWACCOUNT}></a>
+ <a class="item" href="<{$xoops_url}>/edituser.php"><{$smarty.const._MA_NAV_EDITACCOUNT}></a>
+ <a class="item" href="<{$xoops_url}>/notifications.php"><{$smarty.const._MA_NAV_NOTIFICATIONS}></a>
+ <a class="item" href="<{$xoops_url}>/user.php?op=logout"><{$smarty.const._MA_NAV_LOGOUT}></a>
+ <{if $xoops_isadmin}>
+ <a class="item" href="<{$xoops_url}>/admin.php"><{$smarty.const._MA_NAV_ADMINISTRATION}></a>
+ <{/if}>
+ </div>
+ </td>
+ <{else}>
+ <td id="date">
+ <{$smarty.now|date_format:"%A, %e %B %Y"}>
+ </td>
+ <{/if}>
+ <td id="search">
+ <form style="margin: 0px;" action="<{$xoops_url}>/search.php" method="get">
+ <input type="text" name="query" size="14" />
+ <input type="hidden" name="action" value="results" />
+ <input class="formButton" type="submit" value="<{$smarty.const._SEARCH}>" />
+ <{if $smarty.const.modid > 1}>
+ <input type="hidden" name="mids[]" value="<{$smarty.const.modid}>" />
+ <{/if}>
+ </form>
+ </td>
+ </tr>
+ </table>
+ </div>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/navigation/theme_usernav.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/theme.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/theme.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/theme.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,144 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
+<meta http-equiv="content-language" content="<{$xoops_langcode}>" />
+<meta name="robots" content="<{$xoops_meta_robots}>" />
+<meta name="keywords" content="<{$xoops_meta_keywords}>" />
+<meta name="description" content="<{$xoops_meta_description}>" />
+<meta name="rating" content="<{$xoops_meta_rating}>" />
+<meta name="author" content="<{$xoops_meta_author}>" />
+<meta name="copyright" content="<{$xoops_meta_copyright}>" />
+<meta name="generator" content="XOOPS" />
+<title><{$xoops_sitename}> - <{$xoops_pagetitle}></title>
+<link href="<{$xoops_url}>/favicon.ico" rel="SHORTCUT ICON" />
+
+<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_url}>/xoops.css" />
+<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_themecss}>" />
+
+<!-- RMV: added module header -->
+<{$xoops_module_header}>
+<script type="text/javascript">
+<!--
+<{$xoops_js}>
+//-->
+</script>
+<script type="text/javascript">
+</script>
+<script type="text/javascript" src="<{$xoops_imageurl}>js/adminmenu.js"></script>
+<script type="text/javascript" src="<{$xoops_imageurl}>js/ie5.js"></script>
+<script type="text/javascript">
+
+function toggle(notifs_form)
+{
+obj=document.getElementById(notifs_form);
+obj.style.display=!(obj.style.display=="block")? "block" : "none";
+}
+
+function swapimage(swap)
+{
+img_plus="<{$xoops_imageurl}>images/plus.gif";
+img_minus="<{$xoops_imageurl}>images/minus.gif";
+obj=document.getElementById(swap);
+obj.src=!(obj.src==img_minus)? img_minus : img_plus;
+}
+
+</script>
+</head>
+<body>
+
+ <div class="wrapper">
+ <table class="toptable" cellspacing="0">
+ <tr>
+ <td id="headerlogo"><a href="<{$xoops_url}>/"><img src="<{$xoops_imageurl}>images/logo.gif" width="148" height="80" title="<{$smarty.const._YOURHOME}>" alt="<{$smarty.const._YOURHOME}>" /></a></td>
+ <td id="headerbanner"><{$xoops_banner}></td>
+ </tr>
+ <tr>
+ <td id="headerbar" colspan="2">
+ <{include file="default/navigation/theme_usernav.html"}>
+ </td>
+ </tr>
+ </table>
+
+ <table class="maintable" cellspacing="0">
+ <tr>
+ <!-- Display left blocks start-->
+ <{if $xoops_showlblock == 1}>
+ <td id="leftcolumn">
+ <!-- Start left blocks loop -->
+ <{foreach item=block from=$xoops_lblocks}>
+ <{include file="default/blocks/theme_blockleft.html"}>
+ <{/foreach}>
+ <!-- End left blocks loop -->
+ </td>
+ <{/if}>
+ <!-- Display left blocks end -->
+ <td id="centercolumn">
+ <!-- Display center blocks if any -->
+ <{if $xoops_showcblock == 1}>
+ <table cellspacing="0">
+ <tr>
+ <td id="centerCcolumn" colspan="2">
+ <!-- Start center-center blocks loop -->
+ <{foreach item=block from=$xoops_ccblocks}>
+ <{include file="default/blocks/theme_blockcenter_c.html"}>
+ <{/foreach}>
+ <!-- End center-center blocks loop -->
+ </td>
+ </tr>
+ <tr>
+ <td id="centerLcolumn">
+ <!-- Start center-left blocks loop -->
+ <{foreach item=block from=$xoops_clblocks}>
+ <{include file="default/blocks/theme_blockcenter_l.html"}>
+ <{/foreach}>
+ <!-- End center-left blocks loop -->
+ </td>
+ <td id="centerRcolumn">
+ <!-- Start center-right blocks loop -->
+ <{foreach item=block from=$xoops_crblocks}>
+ <{include file="default/blocks/theme_blockcenter_r.html"}>
+ <{/foreach}>
+ <!-- End center-right blocks loop -->
+ </td>
+ </tr>
+ </table>
+ <{/if}>
+ <!-- End display center blocks -->
+ <div id="content">
+ <{$xoops_contents}>
+ </div>
+ </td>
+ <!-- Display right blocks start-->
+ <{if $xoops_showrblock == 1}>
+ <td id="rightcolumn">
+ <!-- Start right blocks loop -->
+ <{foreach item=block from=$xoops_rblocks}>
+ <{include file="default/blocks/theme_blockright.html"}>
+ <{/foreach}>
+ <!-- End right blocks loop -->
+ </td>
+ <{/if}>
+ <!-- Display right blocks end-->
+ </tr>
+ </table>
+
+ <table class="footertable" cellspacing="0">
+ <tr>
+ <td id="footerbar">
+ <{$xoops_footer}>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <script type="text/javascript">
+ var menu1 = new AdMenu("menu1");
+ menu1.position.level1.top = 1;
+ menu1.position.level1.left = 0;
+ menu1.position.levelX.top = 0;
+ menu1.position.levelX.left = 0;
+ menu1.init();
+ </script>
+ <!-- USER NAVIGATION BAR END -->
+</body>
+</html>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/theme.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/themeadmin.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/default/themeadmin.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/default/themeadmin.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,139 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
+<meta http-equiv="content-language" content="<{$xoops_langcode}>" />
+<meta name="robots" content="<{$xoops_meta_robots}>" />
+<meta name="keywords" content="<{$xoops_meta_keywords}>" />
+<meta name="description" content="<{$xoops_meta_description}>" />
+<meta name="rating" content="<{$xoops_meta_rating}>" />
+<meta name="author" content="<{$xoops_meta_author}>" />
+<meta name="copyright" content="<{$xoops_meta_copyright}>" />
+<meta name="generator" content="XOOPS" />
+<title><{$xoops_sitename}> - <{$xoops_pagetitle}></title>
+<link href="<{$xoops_url}>/favicon.ico" rel="SHORTCUT ICON" />
+
+<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_url}>/xoops.css" />
+<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_themecss}>" />
+
+
+<!-- RMV: added module header -->
+<{$xoops_module_header}>
+<script type="text/javascript">
+<!--
+<{$xoops_js}>
+//-->
+</script>
+<script type="text/javascript" src="<{$xoops_imageurl}>js/adminmenu.js"></script>
+<script type="text/javascript" src="<{$xoops_imageurl}>js/ie5.js"></script>
+</head>
+<body>
+
+ <script type="text/javascript">
+ /* preload images */
+ var arrow1 = new Image(4, 7);
+ arrow1.src = "<{$xoops_imageurl}>images/menuarrow1.gif";
+ var arrow2 = new Image(4, 7);
+ arrow2.src = "<{$xoops_imageurl}>images/menuarrow1.gif";
+ </script>
+
+ <div class="wrapper">
+ <table class="toptable" cellspacing="0">
+ <tr>
+ <td id="headerlogo"><a href="<{$xoops_url}>/"><img src="<{$xoops_imageurl}>images/logo.gif" width="148" height="80" title="Homepage" alt="Homepage" /></a></td>
+ <td id="headerbanner"><{$xoops_banner}></td>
+ </tr>
+ <tr>
+ <td id="headerbar" colspan="2">
+ <{include file="default/navigation/theme_adminnav.html"}>
+ </td>
+ </tr>
+ </table>
+
+ <table class="maintable" cellspacing="0">
+ <tr>
+ <!-- Display left blocks start-->
+ <{if $xoops_showlblock == 1}>
+ <td id="leftcolumn">
+ <!-- Start left blocks loop -->
+ <{foreach item=block from=$xoops_lblocks}>
+ <{include file="default/blocks/theme_blockleft.html"}>
+ <{/foreach}>
+ <!-- End left blocks loop -->
+ </td>
+ <{/if}>
+ <!-- Display left blocks end-->
+ <td id="centercolumn">
+ <!-- Display center blocks if any -->
+ <{if $xoops_showcblock == 1}>
+ <table cellspacing="0">
+ <tr>
+ <td id="centerCcolumn" colspan="2">
+ <!-- Start center-center blocks loop -->
+ <{foreach item=block from=$xoops_ccblocks}>
+ <{include file="default/blocks/theme_blockcenter_c.html"}>
+ <{/foreach}>
+ <!-- End center-center blocks loop -->
+ </td>
+ </tr>
+ <tr>
+ <td id="centerLcolumn">
+ <!-- Start center-left blocks loop -->
+ <{foreach item=block from=$xoops_clblocks}>
+ <{include file="default/blocks/theme_blockcenter_l.html"}>
+ <{/foreach}>
+ <!-- End center-left blocks loop -->
+ </td>
+ <td id="centerRcolumn">
+ <!-- Start center-right blocks loop -->
+ <{foreach item=block from=$xoops_crblocks}>
+ <{include file="default/blocks/theme_blockcenter_r.html"}>
+ <{/foreach}>
+ <!-- End center-right blocks loop -->
+ </td>
+ </tr>
+ </table>
+ <{/if}>
+ <!-- End display center blocks -->
+ <div id="content">
+ <{if isset($modulemenu)}>
+ <{include file="default/navigation/theme_moduleadmin.html"}>
+ <{/if}>
+ <{$xoops_contents}>
+ </div>
+ </td>
+ <!-- Display right blocks start-->
+ <{if $xoops_showrblock == 1}>
+ <td id="rightcolumn">
+ <!-- Start right blocks loop -->
+ <{foreach item=block from=$xoops_rblocks}>
+ <{include file="default/blocks/theme_blockright.html"}>
+ <{/foreach}>
+ <!-- End right blocks loop -->
+ </td>
+ <{/if}>
+ <!-- Display right blocks end-->
+ </tr>
+ </table>
+
+ <table class="footertable" cellspacing="0">
+ <tr>
+ <td id="footerbar">
+ <{$xoops_footer}>
+ </td>
+ </tr>
+ </table>
+ </div>
+</body>
+</html>
+<script type="text/javascript">
+ var menu1 = new AdMenu("menu1");
+ menu1.position.level1.top = 1;
+ menu1.position.level1.left = 0;
+ menu1.position.levelX.top = 0;
+ menu1.position.levelX.left = 0;
+ menu1.arrow1 = "<{$xoops_imageurl}>images/menuarrow1.gif";
+ menu1.arrow2 = "<{$xoops_imageurl}>images/menuarrow1.gif";
+ menu1.init();
+</script>
+<!-- ADMIN NAVIGATION BAR END -->
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/default/themeadmin.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/index.html
===================================================================
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/left_both.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/left_both.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/leftbar.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/leftbar.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/logo.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/logo.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/mainbar.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/mainbar.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/modadminbg.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/modadminbg.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/right_both.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/right_both.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/rightbar.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/images/rightbar.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/js/admin.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/js/admin.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/js/admin.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,90 @@
+function xoops_toggleMenu(id)
+{
+ var element=document.getElementById("adminmenu_"+id);
+ if(element.style.display=="none")
+ {
+ //Practical patch for I.E.
+ try
+ {
+ element.style.display="table-row";
+ }
+ catch(error)
+ {
+ element.style.display="block";
+ }
+ }
+ else
+ {
+ element.style.display="none";
+ }
+
+ xoops_buildCookie();
+ return(false);
+}
+
+function xoops_buildCookie()
+{
+ var i;
+ var cookie="";
+ for(i=0; i < adminmenusize; i++)
+ {
+ var element=document.getElementById("adminmenu_"+i);
+ if(element.style.display=="none")
+ cookie+="0";
+ else
+ cookie+="1";
+
+ if(i<(adminmenusize-1))
+ cookie+=",";
+
+ }
+ xoops_setCookie("adminmenustate",cookie,1);
+
+}
+
+function xoops_applyCookie()
+{
+ var cookie=xoops_getCookie("adminmenustate");
+ if(typeof(cookie)=="string")
+ {
+ var temp=cookie.split(",");
+
+ for(i=0; i < adminmenusize; i++)
+ {
+ if(temp[i]==1)
+ {
+ xoops_toggleMenu(i);
+ }
+ }
+ }
+}
+
+function xoops_getCookie(cookiename){
+ var begin=-1;
+ var stringend=-1;
+
+ if (document.cookie.length > 0) {
+ var cookies=document.cookie.split("; ");
+
+ for(i=0;i<cookies.length;i++)
+ {
+ if(cookies[i].indexOf(cookiename)==0)
+ {
+ var temp=cookies[i].split("=");
+ return(unescape(temp[1]));
+ }
+ }
+ return false;
+ }
+
+ return false;
+}
+
+function xoops_setCookie(cookiename, value, expiredays)
+{
+ var ExpireDate = new Date ();
+ ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 6000 * 100 * 100));
+ document.cookie = cookiename + "=" + escape(value) +
+ ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString())+"; path=/";
+
+}
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/js/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/js/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/js/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/js/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/style.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/style.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/style.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,52 @@
+table { width: 100%; margin: 5; padding: 5; font-size: small}
+table td { padding: 0; border-width: 0; vertical-align: top; font-family: Verdana, Arial, Helvetica, sans-serif;}
+div#content { padding: 5px; text-align: left;}
+div#content td { padding: 3px;}
+
+body { font-family: Tahoma, taipei; color:#000000; font-size: 12px}
+a { font-family: Tahoma, taipei; font-size: 12px; text-decoration: none; color: #666666; font-style: normal}
+a:hover { text-decoration: underline overline; font-family: Tahoma, taipei; font-size: 12px; color: #FF9966; font-style: normal}
+td { font-family: Tahoma, taipei; color: #000000; font-size: 12px;border-top-width : 1px; border-right-width : 1px; border-bottom-width : 1px; border-left-width : 1px;}
+input { background-color : transparent; color : #000000; font-family : Tahoma, taipei, Verdana, Arial, Helvetica, sans-serif; font-size : 12px; font-weight : normal;border-color : #000000; border-top-width : 1px; border-right-width : 1px; border-bottom-width : 1px; border-left-width : 1px;text-indent : 2px; }
+textarea {font-family: Tahoma, taipei, Verdana, Arial, Helvetica, sans-serif; font-size: 12px;background-color : transparent; font-weight : bold; border-color : #000000; border-top-width : 1px; border-right-width : 1px; border-bottom-width : 1px; border-left-width : 1px; text-indent : 2px;}
+select {font-family: Tahoma, taipei, Verdana, Arial, Helvetica, sans-serif; font-size: 12px;font-weight : bold;background-color:#F5F5F5; }
+img { border: 0;}
+ul { margin: 2px; padding: 2px; list-style: decimal inside; text-align: left;}
+li { margin-left: 2px; list-style: disc inside;}
+
+.odd { background-color: #eeeeee;}
+.outer { background-color: #CCCCCC;}
+.even { background-color: #DDE1DE;}
+th { background-color: #e0e0e0; text-align: left; padding: 3px;}
+.head { background-color: #E2DBD3; padding: 3px;}
+.foot { background-color: #E2DBD3; padding: 3px;}
+
+.comTitle {font-weight: bold; margin-bottom: 2px;}
+.comText {padding: 2px;}
+.comUserStat {font-size: 10px; color: #333333; font-weight:bold; border: 1px solid #cccccc; background-color: #ffffff; margin: 2px; padding: 2px;}
+.comUserStatCaption {font-weight: normal;}
+.comUserStatus {margin-left: 2px; margin-top: 10px; color: #333333; font-weight:bold; font-size: 10px;}
+.comUserRank {margin: 2px;}
+.comUserRankText {font-size: 10px;font-weight:bold;}
+.comUserRankImg {border: 0;}
+.comUserName {}
+.comUserImg {margin: 2px;}
+.comDate {font-weight: normal; font-style: italic; font-size: smaller}
+.comDateCaption {font-weight: bold; font-style: normal;}
+
+.item {border: 1px solid #cccccc;}
+.itemHead {background-color: #E2DBD3; color: #666600; padding: 2px; font-weight: bold; text-align: left;}
+.itemInfo {text-align: right; padding: 3px; background-color: #efefef}
+.itemTitle a {font-size: 130%; font-weight: bold; font-variant: small-caps; color: #666600; background-color: transparent;}
+.itemPoster {font-size: 90%; font-style:italic;}
+.itemPostDate {font-size: 90%; font-style:italic;}
+.itemStats {font-size: 90%; font-style:italic;}
+.itemBody {padding-left: 5px; text-align: left}
+.itemText {margin-top: 5px; margin-bottom: 5px; line-height: 1.5em;}
+.itemText:first-letter {font-size: 133%; font-weight: bold;}
+.itemFoot {text-align: right; padding: 3px; background-color: #efefef}
+.itemAdminLink {font-size: 90%;}
+.itemPermaLink {font-size: 90%;}
+
+.blockTitle {background-color: #E2DBD3; color: #666600; padding: 2px; font-weight: bold}
+.blockContent {background-color: #efefef; padding: 2px;}
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/style.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/styleAdmin.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/styleAdmin.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/styleAdmin.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,15 @@
+ at import url(style.css);
+#buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0; }
+#buttonbar { float:left; width:100%; background: #e7e7e7 url('images/modadminbg.gif') repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; }
+#buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; }
+#buttonbar li { display:inline; margin:0; padding:0; }
+#buttonbar a { float:left; background:url('images/left_both.gif') no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; }
+#buttonbar a span { float:left; display:block; background:url('images/right_both.gif') no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; }
+/* Commented Backslash Hack hides rule from IE5-Mac \*/
+#buttonbar a span {float:none;}
+/* End IE5-Mac hack */
+#buttonbar a:hover span { color:#333; }
+#buttonbar .current a { background-position:0 -150px; border-width:0; }
+#buttonbar .current a span { background-position:100% -150px; padding-bottom:5px; color:#333; }
+#buttonbar a:hover { background-position:0% -150px; }
+#buttonbar a:hover span { background-position:100% -150px; }
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/styleAdmin.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/styleMAC.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/styleMAC.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/styleMAC.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ at import url(style.css);
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/styleMAC.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/styleNN.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/styleNN.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/styleNN.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ at import url(style.css);
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/styleNN.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/theme.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/theme.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/theme.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,147 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
+<meta http-equiv="content-language" content="<{$xoops_langcode}>" />
+<meta name="robots" content="<{$xoops_meta_robots}>" />
+<meta name="keywords" content="<{$xoops_meta_keywords}>" />
+<meta name="description" content="<{$xoops_meta_description}>" />
+<meta name="rating" content="<{$xoops_meta_rating}>" />
+<meta name="author" content="<{$xoops_meta_author}>" />
+<meta name="copyright" content="<{$xoops_meta_copyright}>" />
+<meta name="generator" content="XOOPS" />
+<title><{$xoops_sitename}> - <{$xoops_pagetitle}></title>
+<link href="<{$xoops_url}>/favicon.ico" rel="SHORTCUT ICON" />
+<link rel="stylesheet" type="text/css" media="all" href="<{$xoops_url}>/xoops.css" />
+<link rel="stylesheet" type="text/css" media="all" href="<{$xoops_themecss}>" />
+<!-- RMV: added module header -->
+<{$xoops_module_header}>
+<script type="text/javascript">
+<!--
+<{$xoops_js}>
+//-->
+</script>
+</head>
+<body>
+<table cellspacing="1" cellpadding="0" bgcolor="#666666">
+ <tr>
+ <td bgcolor="#DDE1DE">
+ <table cellspacing="0" cellpadding="0">
+ <tr>
+ <td width="285"><a href="<{$xoops_url}>"><img src="<{$xoops_imageurl}>images/logo.gif" alt="logo" align="middle" /></a></td>
+ <td width="100%" align="center"><div style="text-align: center; padding-top: 5px;"><{$xoops_banner}></div></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#FFFFFF">
+ <table cellspacing="0" cellpadding="0">
+ <tr>
+ <td width="20%" bgcolor="#EFEFEF">
+ <!-- Start left blocks loop -->
+ <{foreach item=block from=$xoops_lblocks}>
+ <table cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="blockTitle"> <{$block.title}></td>
+ </tr>
+ <tr>
+ <td class="blockContent"><{$block.content}></td>
+ </tr>
+ </table>
+ <{/foreach}>
+ <!-- End left blocks loop -->
+ </td>
+ <td style="padding: 0px 5px 0px;" align="center">
+ <!-- Display center blocks if any -->
+ <{if $xoops_showcblock == 1}>
+
+ <table cellspacing="0">
+ <tr>
+ <td width="100%" colspan="2">
+
+ <!-- Start center-center blocks loop -->
+ <{foreach item=block from=$xoops_ccblocks}>
+ <table cellspacing="1" cellpadding="5">
+ <tr>
+ <td class="blockTitle"> <{$block.title}></td>
+ </tr>
+ <tr>
+ <td class="blockContent"><{$block.content}></td>
+ </tr>
+ </table>
+ <{/foreach}>
+ <!-- End center-center blocks loop -->
+
+ </td>
+ </tr>
+ <tr>
+ <td width="50%">
+
+ <!-- Start center-left blocks loop -->
+ <{foreach item=block from=$xoops_clblocks}>
+ <table cellspacing="1" cellpadding="5">
+ <tr>
+ <td class="blockTitle"> <{$block.title}></td>
+ </tr>
+ <tr>
+ <td class="blockContent"><{$block.content}></td>
+ </tr>
+ </table>
+ <{/foreach}>
+ <!-- End center-left blocks loop -->
+
+ </td><td width="50%">
+
+ <!-- Start center-right blocks loop -->
+ <{foreach item=block from=$xoops_crblocks}>
+ <table cellspacing="1" cellpadding="5">
+ <tr>
+ <td class="blockTitle"> <{$block.title}></td>
+ </tr>
+ <tr>
+ <td class="blockContent"><{$block.content}></td>
+ </tr>
+ </table>
+ <{/foreach}>
+ <!-- End center-right blocks loop -->
+
+ </td>
+ </tr>
+ </table>
+
+ <{/if}>
+ <!-- End display center blocks -->
+
+ <div id="content">
+ <{$xoops_contents}>
+ </div>
+ </td>
+
+ <{if $xoops_showrblock == 1}>
+ <td width=20% bgcolor=#efefef align=center>
+ <!-- Start right blocks loop -->
+ <{foreach item=block from=$xoops_rblocks}>
+ <table cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="blockTitle"> <{$block.title}></td>
+ </tr>
+ <tr>
+ <td class="blockContent"><{$block.content}></td>
+ </tr>
+ </table>
+ <br />
+ <{/foreach}>
+ <!-- End right blocks loop -->
+ <{/if}>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td height="30" valign="middle" bgcolor="#DDE1DE" align="center"><div style="text-align: center; padding-top: 2px; font-size: 10px"><{$xoops_footer}></div></td>
+ </tr>
+</table>
+</body>
+</html>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/theme.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/theme_adminnav.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/theme_adminnav.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/theme_adminnav.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,38 @@
+<div>
+ <{counter start=0 print=false assign=linkcount}>
+ <{foreach item=module from=$adminmenu key=counter}>
+ <table width="95%" >
+ <tr>
+ <th class="adminNavHeader" onclick="xoops_toggleMenu(<{$linkcount}>);" style="cursor: pointer;">
+ <{$module.name}>
+ </th>
+ </tr>
+ <tr id="adminmenu_<{$linkcount}>" style="display: none;">
+ <td style="padding: 2px;">
+ <{foreach item=menuitem from=$module.links}>
+ <a class="adminNavItem" href="<{$menuitem.link}>"><{$menuitem.title}></a><br />
+ <{/foreach}>
+ </td>
+ </tr>
+ </table>
+ <{counter}>
+ <{/foreach}>
+ <{if $systemmenu.name}>
+ <{assign var=system_no value=$adminmenucount-1}>
+ <table width="95%" >
+ <tr>
+ <th class="adminNavHeader" onclick="xoops_toggleMenu(<{$system_no}>);" style="cursor: pointer;">
+ <{$systemmenu.name}>
+ </th>
+ </tr>
+ <tr id="adminmenu_<{$system_no}>" style="display: none;">
+ <td style="padding: 2px;">
+ <{foreach item=menuitem from=$systemmenu.links}>
+ <a class="adminNavItem" href="<{$menuitem.link}>"><{$menuitem.title}></a><br />
+ <{/foreach}>
+ </td>
+ </tr>
+ </table>
+ <{/if}>
+ <script type="text/javascript">xoops_applyCookie();</script>
+</div>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/theme_adminnav.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/theme_moduleadmin.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/theme_moduleadmin.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/theme_moduleadmin.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,26 @@
+<div id='buttontop'>
+ <table style="width: 100%; padding: 0; " cellspacing="0">
+ <tr>
+ <td style="width: 70%; font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;">
+ <a href="../index.php"><{$smarty.const._AD_NAV_MODHOME}></a>
+ </td>
+ <td style="width: 30%; font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;">
+ <b><{$modulemenu.name}> <{$smarty.const._AD_NAV_MODADMIN}></b> <{$modulemenu.breadcrumb}>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div id='buttonbar'>
+ <ul>
+ <{foreach item=link from=$modulemenu.links key=id}>
+ <{if $id == $modulemenu.current}>
+ <li class='current'>
+ <{else}>
+ <li>
+ <{/if}>
+ <a href='<{$link.link}>'><span><{$link.title}></span></a>
+ </li>
+ <{/foreach}>
+ </ul>
+ </div>
+ <br style="clear:both;" />
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/theme_moduleadmin.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/themeadmin.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/themeadmin.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/themeadmin.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,153 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
+<meta http-equiv="content-language" content="<{$xoops_langcode}>" />
+<meta name="robots" content="<{$xoops_meta_robots}>" />
+<meta name="keywords" content="<{$xoops_meta_keywords}>" />
+<meta name="description" content="<{$xoops_meta_description}>" />
+<meta name="rating" content="<{$xoops_meta_rating}>" />
+<meta name="author" content="<{$xoops_meta_author}>" />
+<meta name="copyright" content="<{$xoops_meta_copyright}>" />
+<meta name="generator" content="XOOPS" />
+<title><{$xoops_sitename}> - <{$xoops_pagetitle}></title>
+<link href="<{$xoops_url}>/favicon.ico" rel="SHORTCUT ICON" />
+<link rel="stylesheet" type="text/css" media="all" href="<{$xoops_url}>/xoops.css" />
+<link rel="stylesheet" type="text/css" media="all" href="<{$xoops_themecss}>" />
+<!-- RMV: added module header -->
+<{$xoops_module_header}>
+<script type="text/javascript">
+<!--
+<{$xoops_js}>
+var adminmenusize=<{$adminmenucount}>;
+//-->
+</script>
+<script type="text/javascript" src="<{$xoops_imageurl}>js/admin.js"></script>
+</head>
+<body>
+<table cellspacing="1" cellpadding="0" bgcolor="#666666">
+ <tr>
+ <td bgcolor="#DDE1DE">
+ <table cellspacing="0" cellpadding="0">
+ <tr>
+ <td width="285"><a href="<{$xoops_url}>"><img src="<{$xoops_imageurl}>images/logo.gif" alt="logo" align="middle" /></a></td>
+ <td width="100%" align="center"><div style="text-align: center; padding-top: 5px;"><{$xoops_banner}></div></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#FFFFFF">
+ <table cellspacing="0" cellpadding="0">
+ <tr>
+ <td width="20%" bgcolor="#EFEFEF">
+ <{include file="phpkaox/theme_adminnav.html"}>
+ <!-- Start left blocks loop -->
+ <{foreach item=block from=$xoops_lblocks}>
+ <table cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="blockTitle"> <{$block.title}></td>
+ </tr>
+ <tr>
+ <td class="blockContent"><{$block.content}></td>
+ </tr>
+ </table>
+ <{/foreach}>
+ <!-- End left blocks loop -->
+ </td>
+ <td style="padding: 0px 5px 0px;" align="center">
+ <!-- Display center blocks if any -->
+ <{if $xoops_showcblock == 1}>
+
+ <table cellspacing="0">
+ <tr>
+ <td width="100%" colspan="2">
+
+ <!-- Start center-center blocks loop -->
+ <{foreach item=block from=$xoops_ccblocks}>
+ <table cellspacing="1" cellpadding="5">
+ <tr>
+ <td class="blockTitle"> <{$block.title}></td>
+ </tr>
+ <tr>
+ <td class="blockContent"><{$block.content}></td>
+ </tr>
+ </table>
+ <{/foreach}>
+ <!-- End center-center blocks loop -->
+
+ </td>
+ </tr>
+ <tr>
+ <td width="50%">
+
+ <!-- Start center-left blocks loop -->
+ <{foreach item=block from=$xoops_clblocks}>
+ <table cellspacing="1" cellpadding="5">
+ <tr>
+ <td class="blockTitle"> <{$block.title}></td>
+ </tr>
+ <tr>
+ <td class="blockContent"><{$block.content}></td>
+ </tr>
+ </table>
+ <{/foreach}>
+ <!-- End center-left blocks loop -->
+
+ </td><td width="50%">
+
+ <!-- Start center-right blocks loop -->
+ <{foreach item=block from=$xoops_crblocks}>
+ <table cellspacing="1" cellpadding="5">
+ <tr>
+ <td class="blockTitle"> <{$block.title}></td>
+ </tr>
+ <tr>
+ <td class="blockContent"><{$block.content}></td>
+ </tr>
+ </table>
+ <{/foreach}>
+ <!-- End center-right blocks loop -->
+
+ </td>
+ </tr>
+ </table>
+
+ <{/if}>
+ <!-- End display center blocks -->
+
+ <div id="content">
+ <{if isset($modulemenu)}>
+ <{include file="phpkaox/theme_moduleadmin.html"}>
+ <{/if}>
+ <{$xoops_contents}>
+ </div>
+ </td>
+
+ <{if $xoops_showrblock == 1}>
+ <td width=20% bgcolor=#efefef align=center>
+ <!-- Start right blocks loop -->
+ <{foreach item=block from=$xoops_rblocks}>
+ <table cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="blockTitle"> <{$block.title}></td>
+ </tr>
+ <tr>
+ <td class="blockContent"><{$block.content}></td>
+ </tr>
+ </table>
+ <br />
+ <{/foreach}>
+ <!-- End right blocks loop -->
+ <{/if}>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td height="30" valign="middle" bgcolor="#DDE1DE" align="center"><div style="text-align: center; padding-top: 2px; font-size: 10px"><{$xoops_footer}></div></td>
+ </tr>
+</table>
+</body>
+</html>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/phpkaox/themeadmin.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_cellpic_cat.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_cellpic_cat.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_foot_bg.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_foot_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_foot_left.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_foot_left.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_foot_right.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_foot_right.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_toprow_bg.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_toprow_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_toprow_left.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_toprow_left.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_toprow_right.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/_toprow_right.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/avatar.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/avatar.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/bg_left.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/bg_left.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/bg_left_blocktitle.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/bg_left_blocktitle.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/bg_right.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/bg_right.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/bg_right2.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/bg_right2.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/bg_right_blocktitle.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/bg_right_blocktitle.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/bookopen.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/bookopen.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/center_bg.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/center_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/center_left.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/center_left.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/center_right.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/center_right.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/deleteuser.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/deleteuser.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/dots.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/dots.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/down.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/down.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/dummy.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/dummy.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/edityp.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/edityp.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/folder.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/folder.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/hbar_bg.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/hbar_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/hbar_left.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/hbar_left.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/hbar_middle.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/hbar_middle.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/hbar_right.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/hbar_right.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/images/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/images/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/images/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/images/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/images/left_both.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/images/left_both.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/images/modadminbg.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/images/modadminbg.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/images/right_both.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/images/right_both.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/inputbg.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/inputbg.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/js/admin.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/js/admin.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/js/admin.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,90 @@
+function xoops_toggleMenu(id)
+{
+ var element=document.getElementById("adminmenu_"+id);
+ if(element.style.display=="none")
+ {
+ //Practical patch for I.E.
+ try
+ {
+ element.style.display="table-row";
+ }
+ catch(error)
+ {
+ element.style.display="block";
+ }
+ }
+ else
+ {
+ element.style.display="none";
+ }
+
+ xoops_buildCookie();
+ return(false);
+}
+
+function xoops_buildCookie()
+{
+ var i;
+ var cookie="";
+ for(i=0; i < adminmenusize; i++)
+ {
+ var element=document.getElementById("adminmenu_"+i);
+ if(element.style.display=="none")
+ cookie+="0";
+ else
+ cookie+="1";
+
+ if(i<(adminmenusize-1))
+ cookie+=",";
+
+ }
+ xoops_setCookie("adminmenustate",cookie,1);
+
+}
+
+function xoops_applyCookie()
+{
+ var cookie=xoops_getCookie("adminmenustate");
+ if(typeof(cookie)=="string")
+ {
+ var temp=cookie.split(",");
+
+ for(i=0; i < adminmenusize; i++)
+ {
+ if(temp[i]==1)
+ {
+ xoops_toggleMenu(i);
+ }
+ }
+ }
+}
+
+function xoops_getCookie(cookiename){
+ var begin=-1;
+ var stringend=-1;
+
+ if (document.cookie.length > 0) {
+ var cookies=document.cookie.split("; ");
+
+ for(i=0;i<cookies.length;i++)
+ {
+ if(cookies[i].indexOf(cookiename)==0)
+ {
+ var temp=cookies[i].split("=");
+ return(unescape(temp[1]));
+ }
+ }
+ return false;
+ }
+
+ return false;
+}
+
+function xoops_setCookie(cookiename, value, expiredays)
+{
+ var ExpireDate = new Date ();
+ ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 6000 * 100 * 100));
+ document.cookie = cookiename + "=" + escape(value) +
+ ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString())+"; path=/";
+
+}
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/js/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/js/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/js/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/js/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/klipper.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/klipper.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/logo.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/logo.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/logout.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/logout.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/lostpass.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/lostpass.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/mainmenu_admin.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/mainmenu_admin.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/mainmenu_close.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/mainmenu_close.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/mainmenu_home.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/mainmenu_home.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/menu_arrow_norm.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/menu_arrow_norm.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/online_guests.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/online_guests.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/online_members.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/online_members.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/page.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/page.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/pm.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/pm.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/searchButton.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/searchButton.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/style.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/style.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/style.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,278 @@
+/* General definitions */
+body {background-color: #fcfcfc; color: #000000; font-weight: normal; font-size: 12px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif; margin: 0px; padding: 0px;}
+
+/* Specific definitions of general Tags */
+h1 {font-size: 20px;}
+h2 {font-size: 18px;}
+h3 {font-size: 16px;}
+h4 {font-size: 14px;}
+form {margin: 0px; padding: 0px;}
+ul {margin: 2px; padding: 2px; list-style: decimal inside; text-align: left;}
+li {margin-left: 2px; list-style: square inside; color: #000000; background-color: transparent;}
+b {font-weight: bold;}
+img {border: 0px;}
+a:link {color: #003399; text-decoration: none; font-weight: bold; background-color: transparent;}
+a:visited {color: #003399; text-decoration: none; font-weight: bold; background-color: transparent;}
+a:hover {color: #D68000; text-decoration: underline; background-color: transparent;}
+
+/* Only IE that not affect the other Browsers */
+* {scrollbar-face-color: #E9E9E9; scrollbar-highlight-color: #ffffff; scrollbar-shadow-color: #E0E0E0; scrollbar-3dlight-color: #000000; scrollbar-arrow-color: #000000; scrollbar-track-color: #ffffff; scrollbar-darkshadow-color: #000000;}
+hr {height: 3px; border: 3px #D68000 solid; filter: Alpha(Opacity=100,FinishOpacity=10,Style=2); width: 95%;}
+
+/*Blocks side Definitions*/
+div.rightcolumn {font-size:11px; width: 170px;}
+td.rightcolumn {background-color: #f0f0f0; color: #000000;}
+div.rightcolumn div.blockContent {background-color: transparent; color: #000000; padding-top:5px; padding-left:5px; text-align:left;}
+div.rightcolumn div.blockTitle {background-color: transparent; color: #666666; padding-top: 3px; padding-right: 15px; font-size:12px; width: 170px; height: 20px; font-weight: bold; background: url('bg_right_blocktitle.gif'); text-align:center;}
+div.rightcolumn a:link {text-decoration: none; color: #000000; background-color: transparent;}
+div.rightcolumn a:visited {text-decoration: none; color: #000000; background-color: transparent;}
+div.rightcolumn a:hover {text-decoration: underline; color: #D68000; background-color: transparent;}
+
+div.leftcolumn {font-size:11px; width: 170px;}
+td.leftcolumn {border-right: #cccccc solid 1px; background-color: #f0f0f0; color: #000000;}
+div.leftcolumn div.blockTitle {background-color: transparent; color: #666666; padding-top: 3px; padding-left: 5px; font-size:12px; width: 170px; height: 20px; font-weight: bold; background: url('bg_left_blocktitle.gif'); text-align:center;}
+div.leftcolumn div.blockContent {background-color: transparent; color: #000000; padding-top: 5px; padding-left: 15px; text-align: left;}
+div.leftcolumn a:link {text-decoration: none; color: #000000; background-color: transparent;}
+div.leftcolumn a:visited {text-decoration: none; color :#000000; background-color: transparent;}
+div.leftcolumn a:hover {text-decoration: underline; color: #1778cb; background-color: transparent;}
+
+td.centercolumn {font-size: 12px; width: 100%;}
+div.centercolumn div.blockTitle {background-color: #f0f0f0; color: #000000; text-align: left; border: 1px solid #CCCCCC; font-weight: bold; padding: 1px; text-decoration: none; vertical-align: middle; }
+div.centercolumn div.blockContent {background-color: #ffffff; color: #000000; padding: 2px; text-align: left; border: 1px solid #CCCCCC; border-top: 0px ;}
+
+td.centerLcolumn {width: 50%; font-size: 12px;}
+div.centerLcolumn div.blockTitle {background-color: #f0f0f0; color: #000000; text-align: left; border: 1px solid #CCCCCC; font-weight: bold; padding: 1px; text-decoration: none; vertical-align: middle;}
+div.centerLcolumn div.blockContent {background-color: #ffffff; color: #000000; padding: 2px; text-align: left; border: 1px solid #CCCCCC; border-top: 0px ;}
+
+td.centerRcolumn {width: 50%; font-size: 12px;}
+div.centerRcolumn div.blockTitle {background-color: #f0f0f0; color: #000000; text-align: left; border: 1px solid #CCCCCC; font-weight: bold; padding: 1px; text-decoration: none; vertical-align: middle;}
+div.centerRcolumn div.blockContent {background-color: #ffffff; color: #000000; padding: 2px; text-align: left; border: 1px solid #CCCCCC; border-top: 0px ;}
+
+/* Dynamic menu */
+td#mainmenu a {background-color: #E0E0E0; margin: 0; border-top: 1px solid #F2F1F2; border-bottom: 1px solid #ADACAD; padding: 0;}
+td#mainmenu a:hover {background-color: #D1D0D1;text-decoration: none;}
+td#mainmenu a.menuTop {padding-left: 2px; border-top: 1px solid silver; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+td#mainmenu a.menuMain {padding-left: 2px; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+td#mainmenu a.menuSub {padding-left: 25px; background-color: #E7EAED; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+td#mainmenu a.menuSubadmin {padding-left: 25px; background-color: #eae3e7; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+
+td#usermenu a {background-color: #E0E0E0; margin: 0; border-top: 1px solid #F2F1F2; border-bottom: 1px solid #ADACAD; padding: 0;}
+td#usermenu a:hover {background-color: #D1D0D1;text-decoration: none;}
+td#usermenu a.menuTopTop {padding-left: 5px; border-top: 1px solid silver; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+td#usermenu a.menuTop {padding-left: 5px; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+td#usermenu a.menuTopadmin {padding-left: 5px; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none; background-color: #eae3e7;}
+td#usermenu a.highlight {padding-left: 5px;background-color: #fcc; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+
+/* Misc. Definitions */
+.navtext {font-size:10px; vertical-align: middle;}
+.navinput {width: 7em; height: 1.3em; font-size: 80%; border:1px solid #000000; background-color: #E9E9E9; padding:0px 2px 0px 0px; vertical-align: middle;}
+.navinputImage {vertical-align: middle;}
+.bcenterbg {background: url('center_bg.gif'); font-size: 12px; font-weight: bold; height: 37px; letter-spacing: 1px; line-height:37px; vertical-align: bottom;}
+.bcenterleft {background: url('center_left.gif'); height: 37px; width: 11px;}
+.bcenterright {background: url('center_right.gif'); height: 37px; width: 175px;}
+.contentbox {background-color: #fcfcfc; color: #000000;}
+.centerContent {border-bottom: #cccccc 1px solid; background-color: #dee3e7; color: #000000;}
+.tabOn {padding: 2px; text-align:left; border-top: 1px solid #CCCCCC; border-left: 1px solid #CCCCCC; cursor: pointer; color: #000000; background-color: #FFFFFF; width: 120px;}
+.tabOff {padding: 2px; text-align:left; background-color: #F6F6F6; color: #666666; border-top: 1px solid #CCCCCC; border-left: 1px solid #CCCCCC; cursor: pointer; width: 120px;}
+.outer {border: 1px solid silver;}
+.head {background-color: #c2cdd6; padding: 5px; font-weight: bold;}
+.even {background-color: #dee3e7; padding: 5px;}
+.odd {background-color: #E9E9E9; padding: 5px;}
+tr.even td {background-color: #dee3e7; padding: 5px;}
+tr.odd td {background-color: #E9E9E9; padding: 5px;}
+.foot {background-color: #c2cdd6; padding: 5px; font-weight: bold;}
+.copyright {font-size: 10px; background-color: transparent;}
+a.copyright {color: #003399; background-color:transparent;}
+a.copyright:hover {color: #C23030; text-decoration: underline; background-color:transparent;}
+th {background-color: #2F5376; color: #FFFFFF; padding: 2px; vertical-align: middle; font-family: Verdana, Arial, Helvetica, sans-serif;}
+#notifform {display: none;}
+
+/* Redirect messages */
+div.errorMsg { background-color: #FF3737; color: White; text-align: center; border-top: 1px solid #E9E9E9; border-left: 1px solid #E9E9E9; border-right: 1px solid #999999; border-bottom: 1px solid #999999; font-weight: bold; padding: 10px;}
+div.confirmMsg { background-color: #DDFFDF; color: #003399; text-align: center; border-top: 1px solid #E9E9E9; border-left: 1px solid #E9E9E9; border-right: 1px solid #999999; border-bottom: 1px solid #999999; font-weight: bold; padding: 10px;}
+div.resultMsg { background-color : #CCCCCC; color: Black; text-align: center; border-top: 1px solid silver; border-left: 1px solid silver; font-weight: bold; border-right: 1px solid #666666; border-bottom: 1px solid #666666; padding: 10px;}
+
+/* Comments Definitions */
+.comTitle {font-weight: bold; margin-bottom: 2px;}
+.comText {padding: 2px;}
+.comUserStat {font-size: 10px; color: #2F5376; font-weight:bold; border: 1px solid silver; background-color: #ffffff; margin: 2px; padding: 2px;}
+.comUserStatCaption {font-weight: normal;}
+.comUserStatus {margin-left: 2px; margin-top: 10px; color: #2F5376; font-weight:bold; font-size: 10px;}
+.comUserRank {margin: 2px;}
+.comUserRankText {font-size: 10px;font-weight:bold;}
+.comUserRankImg {border: 0;}
+.comUserName {border: 0;}
+.comUserImg {margin: 2px;}
+.comDate {font-weight: normal; font-style: italic; font-size: smaller}
+.comDateCaption {font-weight: bold; font-style: normal;}
+
+/*forms elements*/
+input.formButton {border: 1px solid #5E5D63; color: #000000; font-family: verdana, tahoma, arial, helvetica, sans-serif; font-size: 9px; text-align:center; background: url('inputbg.gif'); }
+textarea.formBox {border: #000000 1px solid; background: #ffffff; font: 11px verdana, arial, helvetica, sans-serif; }
+input.formTextBox {border: #000000 1px solid;background: #ffffff; font: 11px verdana, arial, helvetica, sans-serif; }
+select {border: #000000 1px solid;background: #ffffff; font: 10px verdana, arial, helvetica,sans-serif; }
+
+/* Content template definition */
+div.content {text-align: left; padding: 0px 10px 0px 10px;}
+
+/* Code and Quote Definition */
+div.xoopsCode {padding: 3px; font-size: 12px; color: #003399; background-color: #F6FAFD; border-right: #c2cdd6 1px dashed; border-top: #c2cdd6 1px dashed; border-left: #c2cdd6 1px dashed; border-bottom: #c2cdd6 1px dashed;}
+div.xoopsQuote {padding: 3px; font-size: 12px; color: #003399; line-height: 125%; text-align: justify; background-color: #F6FAFD; border-right: #c2cdd6 1px dashed; border-top: #c2cdd6 1px dashed; border-left: #c2cdd6 1px dashed; border-bottom: #c2cdd6 1px dashed;}
+
+/* Links for Quotes */
+div.xoopsQuote a:link, div.xoopsQuote a:visited { color: Black; font-weight: bold; background-color: transparent; }
+div.xoopsQuote a:hover, div.xoopsQuote a:active { color: #1778cb; font-weight: bold; background-color: transparent; }
+
+/* News module definitions */
+td.newsTitle {border-right: #cccccc 1px; border-top: #cccccc 1px; border-left: #cccccc 1px; border-bottom: #cccccc 1px dashed; background-color: transparent; font-size: 18px; text-align: left; font-weight: bold; color: #2F5376; letter-spacing: -1.5px; margin: 0; line-height: 18px;}
+td.newsSubtitle {padding: 5px; border-right: #d0d0d0 1px solid; border-top: #d0d0d0 1px solid; border-left: #d0d0d0 1px solid; color: #666666; border-bottom: #d0d0d0 1px solid; background-color: #dfdfdf; font-size: 15px; text-align: left; font-weight: bold; letter-spacing: -1.5px; margin: 0; line-height: 15px;}
+td.newsSubSubtitle {padding: 3px; border-right: #d0d0d0 1px solid; border-top: #d0d0d0 1px solid; border-left: #d0d0d0 1px solid; color: #666666; border-bottom: #d0d0d0 1px solid; background-color: #eaeaea;}
+td.newsPoster {padding: 3px; border-right: #e0e0e0 1px solid; border-top: #e0e0e0 1px solid; border-left: #e0e0e0 1px solid; color: #666666; border-bottom: #e0e0e0 1px solid; background-color: #f6f6f6;}
+td.newsPoster a:link {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+td.newsPoster a:visited {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+td.newsPoster a:hover {color: #999999; text-decoration: underline; font-weight: bold; background-color: transparent;}
+td.commentsNav {padding: 3px; border-right: #e0e0e0 1px solid; border-top: #e0e0e0 1px solid; border-left: #e0e0e0 1px solid; color: #666666; border-bottom: #e0e0e0 1px solid; background-color: #f6f6f6;}
+span.textPoster {color: #999999; background-color: transparent;}
+td.newsMisc {background-color: #f6f6f6; border: 1px #e0e0e0 dashed; padding: 10px; text-align: center;}
+td.newsContent {padding-right: 5px; padding-left: 5px; padding-bottom: 5px; border-bottom: #cccccc 1px dashed; padding-top: 5px; border-top: #cccccc 1px dashed; font-size: 11px; background-color: #F9F9F9; color: #000000;}
+table.comments {background-color: #ffffff; color: #000000; border: 2px #2F5376 solid;}
+td.commentsHead {padding: 2px; color: #ffffff; background-color: #2F5376;}
+td.sCommentFoot {padding: 3px; border-bottom: #2F5376 1px solid; background-color: #c2cdd6;}
+.sCommentHead {border-right: #e0e0e0 1px solid; border-left: #e0e0e0 1px solid; color: #666666; border-bottom: #e0e0e0 1px solid; background-color: #f6f6f6;}
+td.sCommentThread {color: #000000; border-bottom: #2F5376 1px solid; text-align: left; background-color: #dee3e7;}
+td.sCommentRank {border-top: #2F5376 1px solid; border-right: 1px #CCCCCC solid; border-bottom: #2F5376 1px solid; padding: 10px; text-align: left; background-color: #dee3e7; color: #000000;}
+td.sCommentText {padding-right: 5px; padding-left: 5px; padding-bottom: 5px; padding-top: 0px; font-size: 11px; background-color: #F5F5F5; border-top: #2F5376 1px solid; border-bottom: #2F5376 1px solid; color: #000000;}
+
+/* system module definition */
+table.userinfo {border: 1px solid #2F5376;}
+td.uinfoHead {color: #ffffff; background-color: #2F5376; padding: 3px;}
+td.uinfoBody {color: #666666; background-color: #f6f6f6;}
+td.uinfoMain {padding: 3px; color: #666666; background-color: #c2cdd6;}
+tr.uinfoData {padding: 3px; background-color: #dee3e7; color: #000000;}
+tr.uinfoData a:link {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+tr.uinfoData a:visited {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+tr.uinfoData a:hover {color: #999999; text-decoration: underline; font-weight: bold; background-color: transparent;}
+
+/*Downloads class*/
+.info {padding: 3px;border: #e0e0e0 1px solid; color: #666666; background-color: #f6f6f6;}
+.info a:link {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+.info a:visited {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+.info a:hover {color: #999999; text-decoration: underline; font-weight: bold; background-color: transparent;}
+span.category { font-size: 16px;}
+span.subcategories { font-size: 11px;}
+span.bigtext { font-size: 25px;}
+
+/* Forum class */
+.toprow {background: url('_toprow_bg.gif'); font-size: 12px; font-weight: bold; height: 23px; letter-spacing: 1px; line-height: 23px; text-align: center;}
+.toprowleft {background: url('_toprow_left.gif'); height: 23px; width: 14px;}
+.toprowright {background: url('_toprow_right.gif'); height: 23px; width: 14px;}
+.catrow {background: url('_cellpic_cat.gif'); color: #F6F6F6; font-weight: bold; height: 24px; letter-spacing: 1px; line-height: 24px; padding-left: 5px; padding-right: 5px; text-align: center; background-color: transparent;}
+.catrow a:link {color: #F6F6F6; text-decoration: none; font-weight: bold; background-color: transparent;}
+.catrow a:visited {color: #F6F6F6; text-decoration: none; font-weight: bold; background-color: transparent;}
+.catrow a:hover {color: #F6F6F6; text-decoration: underline; font-weight: bold; background-color: transparent;}
+.row1 {background-color: #F0F0F0; padding: 5px;}
+.row2 {background-color: #F9F9F9; padding: 5px;}
+.row3 {background-color: #f6f6f6; padding: 5px;}
+.small {font-size: 10px;}
+.spacer {background-color: #D1D0D1; height: 1px; width: 1px;}
+.footrow {background: url('_foot_bg.gif'); color: #FFFFFF; height: 7px; background-color: transparent;}
+.footrowleft {background: url('_foot_left.gif'); height: 7px; width: 6px;}
+.footrowright {background: url('_foot_right.gif'); height: 7px; width: 6px;}
+.row1top {background-color: #c2cdd6; padding: 5px;}
+.row2top {background-color: #dee3e7; padding: 5px;}
+.row1bot {background-color: #c2cdd6; padding: 5px;}
+.row2bot {background-color: #dee3e7; padding: 5px;}
+.dots {background: url('dots.gif'); height: 5px;}
+.moderate {padding: 3px; border: #e0e0e0 1px solid; background-color: #f6f6f6; text-align: left; width:98%;}
+.moderate a:link {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+.moderate a:visited {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+.moderate a:hover {color: #999999; text-decoration: underline; font-weight: bold; background-color: transparent;}
+
+/* for test only */
+table.subType {color: #000000; background-color: #FFFFFF; border-right: #AEBDC4 1px solid; border-top:#AEBDC4 1px solid; border-left:#AEBDC4 1px solid; border-bottom:#AEBDC4 1px solid;}
+td.lightRow {background-color: #F0F0F0; color: #000000;}
+
+/* texto para el td lightRow */
+.lightRow {font-size: 12px; text-decoration: none; color: #000000; background-color: transparent;}
+td.lightRow a:link {text-decoration: underline; color: #003399; background-color: transparent;}
+td.lightRow a:visited {text-decoration: underline; color: #003399; background-color: transparent;}
+td.lightRow a:hover {text-decoration: underline; color: #D68000; background-color: transparent;}
+
+td.mediumRow {background-color: #dee3e7; color: #000000;}
+
+/* texto para el td mediumRow */
+.mediumRow {font-size: 12px; text-decoration: none; color: #000000; background-color: transparent;}
+td.mediumRow a:link {text-decoration: underline; color: #003399; background-color: transparent;}
+td.mediumRow a:visited {text-decoration: underline; color: #003399; background-color: transparent;}
+td.mediumRow a:hover {text-decoration: underline; color: #D68000; background-color: transparent;}
+
+td.darkRow {background-color: #c2cdd6; color: #000000; }
+
+/* text for td darkRow */
+.darkRow {font-size: 12px; text-decoration: none; color: #000000; background-color: transparent;}
+td.darkRow a:link {text-decoration: underline; color: #003399; background-color: transparent;}
+td.darkRow a:visited {text-decoration: underline; color: #003399; background-color: transparent;}
+td.darkRow a:hover {text-decoration: underline; color: #D68000; background-color: transparent;}
+
+/* blocks colors */
+.bdownloadr { background-color: #EDF4FB;padding: 2px;}
+.bdownloadt { background-color: #E6F0FA;padding: 2px;}
+.blinkr { background-color: #FFFAF9;padding: 2px;}
+.blinkt { background-color: #FFF3F0;padding: 2px;}
+.bnewsr { background-color: #F9FFF9;padding: 2px;}
+.bnewst { background-color: #F0FFF0;padding: 2px;}
+.bcust { background-color: #FFFFF4;padding: 2px;}
+.bfaqsr { background-color: #FFFBF4;padding: 2px;}
+.bfaqsrq { background-color: #FFF3DF;padding: 2px;}
+
+/* weBlog module */
+div.blogDate {background-color: #f6f6f6; border: 1px #e0e0e0 dashed; padding: 2px; text-align: right;margin-bottom: 12px;margin-top: 12px; font-style: italic;}
+div.blogTitle { color: #666666; border-bottom: #cccccc 1px dashed; background-color: transparent;margin-left: 20px; font-size: 150%;font-weight: bold;}
+div.blogContents {margin-left: 35px;padding: 5px;}
+div.blogFooter {padding: 3px; border: #e0e0e0 1px solid; color: #666666; background-color: #f6f6f6;font-size: 80%;}
+
+/* smartfaq module */
+.bfaqr { background-color: #F5F5FF;padding: 2px;}
+.xinfotitle {margin-top: 8px; color: #335380; margin-bottom: 8px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;}
+.xinfotext {color: #456; margin-bottom: 8px; line-height: 130%; display: block;}#335380
+.itemFoot {text-align: right; padding:3px; border:1px solid #808080; background-color: #fff; color: #000;}
+
+/* soapbox module */
+#mod_header { width: 100%; padding: 0; margin: 0; border-bottom: 1px solid #2F5376;}
+.col_header { width: 100%; padding: 0; margin: 0; border-top: 2px solid #2F5376;}
+.clean { width: 100%; padding: 0; margin: 0;}
+.clean99 { width: 99%; padding: 0; margin: 0 0 4px 0;}
+.h18px { font-size: 10px; line-height: 18px;}
+.h18right { font-size: 18px; text-align: right; font-weight: bold; color: #2F5376; letter-spacing: -1.5px; margin: 0; line-height: 18px;}
+.h3a { margin: 6px 0;}
+.h3b { margin: 8px 0 4px 0;}
+.h3c { margin: 0 0 6px 0; color: #2F5376;}
+.intro { color: #456; margin-top: 4px; margin-bottom: 12px;line-height: 130%; display: block;}
+.intro2 { font-size: 12px; color: #456; margin: 4px 0 0 0; line-height: 150%;}
+.intro8 { color: #456; margin: 0px 8px 8px 8px; line-height: 130%; display: block; }
+.nocontent { background-color: #efefef; border: 1px solid silver; padding: 18px; margin-top: 12px; font-size: 12px;}
+.padded { padding: 24px;}
+.th6bot { margin-bottom: 6px;}
+.columnlink { font-size: 16px;}
+.rightfloater { width: 150px; border: 1px solid #456; padding: 4px; margin: 0 0 8px 8px;float:right; }
+.clear { height: 0px;}
+.picleft { float:left; width: 80px; margin: 8px 10px 10px 0;}
+.pic { border: 1px solid black; width: 80px;}
+.left { background-color: #e7e7e7; width: 70%;padding-left: 4px; line-height: 24px;}
+.right { text-align: right; background-color: #e7e7e7;font-weight: bold; width: 30%; padding-right: 8px; line-height: 24px;}
+.subdate { font-size: 9px; color: #2F5376; margin-bottom: 8px;}
+.teaser { color: #456; line-height: 130%; margin: 0;}
+.coldesc { color: #456; margin: 6px 0; font-size: 11px; font-style: italic;}
+.coldesc8 { color: #456; margin: 6px 0; padding: 0 8px;font-size: 10px;}
+.nine { font-size: 9px; margin-bottom: 12px;}
+.nine2 { font-size: 9px; margin-bottom: 4px;}
+.art { border: 1px solid #ccc; margin-bottom: 8px;}
+.arttitle { margin-bottom: 4px; padding: 8px 8px 4px 8px;}
+li.box { list-style-position: outside; margin-left: 16px;}
+.smallpub { font-size: 9px; font-weight: normal; margin-bottom: 4px;}
+.pad18 { padding-left: 18px;}
+div.texto, div.texto p { color: #456; margin: 6px 0; line-height: 130%;}
+.storypic { display: block; margin-bottom: 12px;}
+.storynav { text-align: left; margin: 10px;}
+.colteaser {background-color: #efefef;padding: 12px; border: #e7e7e7; clear: right;}
+.iconlinks { padding: 5px; text-align: right; margin-right:3px;}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/style.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/styleAdmin.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/styleAdmin.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/styleAdmin.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,15 @@
+ at import url(style.css);
+#buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0; }
+#buttonbar { float:left; width:100%; background: #e7e7e7 url('images/modadminbg.gif') repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; }
+#buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; }
+#buttonbar li { display:inline; margin:0; padding:0; }
+#buttonbar a { float:left; background:url('images/left_both.gif') no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; }
+#buttonbar a span { float:left; display:block; background:url('images/right_both.gif') no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; }
+/* Commented Backslash Hack hides rule from IE5-Mac \*/
+#buttonbar a span {float:none;}
+/* End IE5-Mac hack */
+#buttonbar a:hover span { color:#333; }
+#buttonbar .current a { background-position:0 -150px; border-width:0; }
+#buttonbar .current a span { background-position:100% -150px; padding-bottom:5px; color:#333; }
+#buttonbar a:hover { background-position:0% -150px; }
+#buttonbar a:hover span { background-position:100% -150px; }
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/styleAdmin.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/styleMAC.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/styleMAC.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/styleMAC.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,275 @@
+/* General definitions */
+body {background-color: #fcfcfc; color: #000000; font-weight: normal; font-size: 12px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif; margin: 0px; padding: 0px;}
+
+/* Specific definitions of general Tags */
+h1 {font-size: 20px;}
+h2 {font-size: 18px;}
+h3 {font-size: 16px;}
+h4 {font-size: 14px;}
+form {margin: 0px; padding: 0px;}
+ul {margin: 2px; padding: 2px; list-style: decimal inside; text-align: left;}
+li {margin-left: 2px; list-style: square inside; color: #000000; background-color: transparent;}
+b {font-weight:bold;}
+img {border: 0px;}
+a:link {color: #003399; text-decoration: none; font-weight: bold; background-color: transparent;}
+a:visited {color: #003399; text-decoration: none; font-weight: bold; background-color: transparent;}
+a:hover {color: #D68000; text-decoration: underline; background-color: transparent;}
+hr {height: 3px; border: 3px #D68000 solid; width: 95%;}
+
+/*Blocks side Definitions*/
+div.rightcolumn {font-size:11px; width: 170px;}
+td.rightcolumn {background-color: #f0f0f0; color: #000000;}
+div.rightcolumn div.blockContent {background-color: transparent; color: #000000; padding-top:5px; padding-left:5px; text-align:left;}
+div.rightcolumn div.blockTitle {background-color: transparent; color: #666666; padding-top: 3px; padding-right: 15px; font-size:12px; width: 170px; height: 20px; font-weight: bold; background: url('bg_right_blocktitle.gif'); text-align:center;}
+div.rightcolumn a:link {text-decoration: none; color: #000000; background-color: transparent;}
+div.rightcolumn a:visited {text-decoration: none; color: #000000; background-color: transparent;}
+div.rightcolumn a:hover {text-decoration: underline; color: #D68000; background-color: transparent;}
+
+div.leftcolumn {font-size:11px; width: 170px;}
+td.leftcolumn {border-right: #cccccc solid 1px; background-color: #f0f0f0; color: #000000;}
+div.leftcolumn div.blockTitle {background-color: transparent; color: #666666; padding-top: 3px; padding-left: 5px; font-size:12px; width: 170px; height: 20px; font-weight: bold; background: url('bg_left_blocktitle.gif'); text-align:center;}
+div.leftcolumn div.blockContent {background-color: transparent; color: #000000; padding-top: 5px; padding-left: 15px; text-align: left;}
+div.leftcolumn a:link {text-decoration: none; color: #000000; background-color: transparent;}
+div.leftcolumn a:visited {text-decoration: none; color :#000000; background-color: transparent;}
+div.leftcolumn a:hover {text-decoration: underline; color: #1778cb; background-color: transparent;}
+
+td.centercolumn {font-size: 12px; width: 100%;}
+div.centercolumn div.blockTitle {background-color: #f0f0f0; color: #000000; text-align: left; border: 1px solid #CCCCCC; font-weight: bold; padding: 1px; text-decoration: none; vertical-align: middle; }
+div.centercolumn div.blockContent {background-color: #ffffff; color: #000000; padding: 2px; text-align: left; border: 1px solid #CCCCCC; border-top: 0px ;}
+
+td.centerLcolumn {width: 50%; font-size: 12px;}
+div.centerLcolumn div.blockTitle {background-color: #f0f0f0; color: #000000; text-align: left; border: 1px solid #CCCCCC; font-weight: bold; padding: 1px; text-decoration: none; vertical-align: middle;}
+div.centerLcolumn div.blockContent {background-color: #ffffff; color: #000000; padding: 2px; text-align: left; border: 1px solid #CCCCCC; border-top: 0px ;}
+
+td.centerRcolumn {width: 50%; font-size: 12px;}
+div.centerRcolumn div.blockTitle {background-color: #f0f0f0; color: #000000; text-align: left; border: 1px solid #CCCCCC; font-weight: bold; padding: 1px; text-decoration: none; vertical-align: middle;}
+div.centerRcolumn div.blockContent {background-color: #ffffff; color: #000000; padding: 2px; text-align: left; border: 1px solid #CCCCCC; border-top: 0px ;}
+
+/* Dynamic menu */
+td#mainmenu a {background-color: #E0E0E0; margin: 0; border-top: 1px solid #F2F1F2; border-bottom: 1px solid #ADACAD; padding: 0;}
+td#mainmenu a:hover {background-color: #D1D0D1;text-decoration: none;}
+td#mainmenu a.menuTop {padding-left: 2px; border-top: 1px solid silver; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+td#mainmenu a.menuMain {padding-left: 2px; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+td#mainmenu a.menuSub {padding-left: 25px; background-color: #E7EAED; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+td#mainmenu a.menuSubadmin {padding-left: 25px; background-color: #eae3e7; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+
+td#usermenu a {background-color: #E0E0E0; margin: 0; border-top: 1px solid #F2F1F2; border-bottom: 1px solid #ADACAD; padding: 0;}
+td#usermenu a:hover {background-color: #D1D0D1;text-decoration: none;}
+td#usermenu a.menuTopTop {padding-left: 5px; border-top: 1px solid silver; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+td#usermenu a.menuTop {padding-left: 5px; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+td#usermenu a.menuTopadmin {padding-left: 5px; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none; background-color: #eae3e7;}
+td#usermenu a.highlight {padding-left: 5px;background-color: #fcc; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+
+/* Misc. Definitions */
+.navtext {font-size:10px; vertical-align: middle;}
+.navinput {width: 7em; height: 1.3em; font-size: 80%; border:1px solid #000000; background-color: #E9E9E9; padding:0px 2px 0px 0px; vertical-align: middle;}
+.navinputImage {vertical-align: middle;}
+.bcenterbg {background: url('center_bg.gif'); font-size: 12px; font-weight: bold; height: 37px; letter-spacing: 1px; line-height:37px; vertical-align: bottom;}
+.bcenterleft {background: url('center_left.gif'); height: 37px; width: 11px;}
+.bcenterright {background: url('center_right.gif'); height: 37px; width: 175px;}
+.contentbox {background-color: #fcfcfc; color: #000000;}
+.centerContent {border-bottom: #cccccc 1px solid; background-color: #dee3e7; color: #000000;}
+.tabOn {padding: 2px; text-align:left; border-top: 1px solid #CCCCCC; border-left: 1px solid #CCCCCC; cursor: pointer; color: #000000; background-color: #FFFFFF; width: 120px;}
+.tabOff {padding: 2px; text-align:left; background-color: #F6F6F6; color: #666666; border-top: 1px solid #CCCCCC; border-left: 1px solid #CCCCCC; cursor: pointer; width: 120px;}
+.outer {border: 1px solid silver;}
+.head {background-color: #c2cdd6; padding: 5px; font-weight: bold;}
+.even {background-color: #dee3e7; padding: 5px;}
+.odd {background-color: #E9E9E9; padding: 5px;}
+tr.even td {background-color: #dee3e7; padding: 5px;}
+tr.odd td {background-color: #E9E9E9; padding: 5px;}
+.foot {background-color: #c2cdd6; padding: 5px; font-weight: bold;}
+.copyright {font-size:10px; background-color: transparent;}
+a.copyright {color: #003399; background-color:transparent;}
+a.copyright:hover {color: #C23030; text-decoration: underline; background-color:transparent;}
+th {background-color: #2F5376; color: #FFFFFF; padding:2px; vertical-align:middle; font-family: Verdana, Arial, Helvetica, sans-serif;}
+#notifform {display: none;}
+
+/* Redirect messages */
+div.errorMsg { background-color: #FF3737; color: White; text-align: center; border-top: 1px solid #E9E9E9; border-left: 1px solid #E9E9E9; border-right: 1px solid #999999; border-bottom: 1px solid #999999; font-weight: bold; padding: 10px;}
+div.confirmMsg { background-color: #DDFFDF; color: #003399; text-align: center; border-top: 1px solid #E9E9E9; border-left: 1px solid #E9E9E9; border-right: 1px solid #999999; border-bottom: 1px solid #999999; font-weight: bold; padding: 10px;}
+div.resultMsg { background-color : #CCCCCC; color: Black; text-align: center; border-top: 1px solid silver; border-left: 1px solid silver; font-weight: bold; border-right: 1px solid #666666; border-bottom: 1px solid #666666; padding: 10px;}
+
+/* Comments Definitions */
+.comTitle {font-weight: bold; margin-bottom: 2px;}
+.comText {padding: 2px;}
+.comUserStat {font-size: 10px; color: #2F5376; font-weight:bold; border: 1px solid silver; background-color: #ffffff; margin: 2px; padding: 2px;}
+.comUserStatCaption {font-weight: normal;}
+.comUserStatus {margin-left: 2px; margin-top: 10px; color: #2F5376; font-weight:bold; font-size: 10px;}
+.comUserRank {margin: 2px;}
+.comUserRankText {font-size: 10px;font-weight:bold;}
+.comUserRankImg {border: 0;}
+.comUserName {border: 0;}
+.comUserImg {margin: 2px;}
+.comDate {font-weight: normal; font-style: italic; font-size: smaller}
+.comDateCaption {font-weight: bold; font-style: normal;}
+
+/*forms elements*/
+input.formButton {border: 1px solid #5E5D63; color: #000000; font-family: verdana, tahoma, arial, helvetica, sans-serif; font-size: 9px; text-align:center; background: url('inputbg.gif'); }
+textarea.formBox {border: #000000 1px solid; background: #ffffff; font: 11px verdana, arial, helvetica, sans-serif; }
+input.formTextBox {border: #000000 1px solid;background: #ffffff; font: 11px verdana, arial, helvetica, sans-serif; }
+select {border: #000000 1px solid;background: #ffffff; font: 10px verdana, arial, helvetica,sans-serif; }
+
+/* Content template definition */
+div.content {text-align: left; padding: 0px 10px 0px 10px;}
+
+/* Code and Quote Definition */
+div.xoopsCode {padding: 3px; font-size: 12px; color: #003399; background-color: #F6FAFD; border-right: #c2cdd6 1px dashed; border-top: #c2cdd6 1px dashed; border-left: #c2cdd6 1px dashed; border-bottom: #c2cdd6 1px dashed;}
+div.xoopsQuote {padding: 3px; font-size: 12px; color: #003399; line-height: 125%; text-align: justify; background-color: #F6FAFD; border-right: #c2cdd6 1px dashed; border-top: #c2cdd6 1px dashed; border-left: #c2cdd6 1px dashed; border-bottom: #c2cdd6 1px dashed;}
+
+/* Links for Quotes */
+div.xoopsQuote a:link, div.xoopsQuote a:visited { color: Black; font-weight: bold; background-color: transparent; }
+div.xoopsQuote a:hover, div.xoopsQuote a:active { color: #1778cb; font-weight: bold; background-color: transparent; }
+
+/* News module definitions */
+td.newsTitle {border-right: #cccccc 1px; border-top: #cccccc 1px; border-left: #cccccc 1px; border-bottom: #cccccc 1px dashed; background-color: transparent; font-size: 18px; text-align: left; font-weight: bold; color: #2F5376; letter-spacing: -1.5px; margin: 0; line-height: 18px;}
+td.newsSubtitle {padding: 5px; border-right: #d0d0d0 1px solid; border-top: #d0d0d0 1px solid; border-left: #d0d0d0 1px solid; color: #666666; border-bottom: #d0d0d0 1px solid; background-color: #dfdfdf; font-size: 15px; text-align: left; font-weight: bold; letter-spacing: -1.5px; margin: 0; line-height: 15px;}
+td.newsSubSubtitle {padding: 3px; border-right: #d0d0d0 1px solid; border-top: #d0d0d0 1px solid; border-left: #d0d0d0 1px solid; color: #666666; border-bottom: #d0d0d0 1px solid; background-color: #eaeaea;}
+td.newsPoster {padding: 3px; border-right: #e0e0e0 1px solid; border-top: #e0e0e0 1px solid; border-left: #e0e0e0 1px solid; color: #666666; border-bottom: #e0e0e0 1px solid; background-color: #f6f6f6;}
+td.newsPoster a:link {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+td.newsPoster a:visited {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+td.newsPoster a:hover {color: #999999; text-decoration: underline; font-weight: bold; background-color: transparent;}
+td.commentsNav {padding: 3px; border-right: #e0e0e0 1px solid; border-top: #e0e0e0 1px solid; border-left: #e0e0e0 1px solid; color: #666666; border-bottom: #e0e0e0 1px solid; background-color: #f6f6f6;}
+span.textPoster {color: #999999; background-color: transparent;}
+td.newsMisc {background-color: #f6f6f6; border: 1px #e0e0e0 dashed; padding: 10px; text-align: center;}
+td.newsContent {padding-right: 5px; padding-left: 5px; padding-bottom: 5px; border-bottom: #cccccc 1px dashed; padding-top: 5px; border-top: #cccccc 1px dashed; font-size: 11px; background-color: #F9F9F9; color: #000000;}
+table.comments {background-color: #ffffff; color: #000000; border: 2px #2F5376 solid;}
+td.commentsHead {padding: 2px; color: #ffffff; background-color: #2F5376;}
+td.sCommentFoot {padding: 3px; border-bottom: #2F5376 1px solid; background-color: #c2cdd6;}
+.sCommentHead {border-right: #e0e0e0 1px solid; border-left: #e0e0e0 1px solid; color: #666666; border-bottom: #e0e0e0 1px solid; background-color: #f6f6f6;}
+td.sCommentThread {color: #000000; border-bottom: #2F5376 1px solid; text-align: left; background-color: #dee3e7;}
+td.sCommentRank {border-top: #2F5376 1px solid; border-right: 1px #CCCCCC solid; border-bottom: #2F5376 1px solid; padding: 10px; text-align: left; background-color: #dee3e7; color: #000000;}
+td.sCommentText {padding-right: 5px; padding-left: 5px; padding-bottom: 5px; padding-top: 0px; font-size: 11px; background-color: #F5F5F5; border-top: #2F5376 1px solid; border-bottom: #2F5376 1px solid; color: #000000;}
+
+/* system module definition */
+table.userinfo {border: 1px solid #2F5376;}
+td.uinfoHead {color: #ffffff; background-color: #2F5376; padding: 3px;}
+td.uinfoBody {color: #666666; background-color: #f6f6f6;}
+td.uinfoMain {padding: 3px; color: #666666; background-color: #c2cdd6;}
+tr.uinfoData {padding: 3px; background-color: #dee3e7; color: #000000;}
+tr.uinfoData a:link {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+tr.uinfoData a:visited {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+tr.uinfoData a:hover {color: #999999; text-decoration: underline; font-weight: bold; background-color: transparent;}
+
+/*Downloads class*/
+.info {padding: 3px;border: #e0e0e0 1px solid; color: #666666; background-color: #f6f6f6;}
+.info a:link {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+.info a:visited {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+.info a:hover {color: #999999; text-decoration: underline; font-weight: bold; background-color: transparent;}
+span.category { font-size: 16px;}
+span.subcategories { font-size: 11px;}
+span.bigtext { font-size: 25px;}
+
+/* Forum class */
+.toprow {background: url('_toprow_bg.gif'); font-size: 12px; font-weight: bold; height: 23px; letter-spacing: 1px; line-height: 23px; text-align: center;}
+.toprowleft {background: url('_toprow_left.gif'); height: 23px; width: 14px;}
+.toprowright {background: url('_toprow_right.gif'); height: 23px; width: 14px;}
+.catrow {background: url('_cellpic_cat.gif'); color: #F6F6F6; font-weight: bold; height: 24px; letter-spacing: 1px; line-height: 24px; padding-left: 5px; padding-right: 5px; text-align: center; background-color: transparent;}
+.catrow a:link {color: #F6F6F6; text-decoration: none; font-weight: bold; background-color: transparent;}
+.catrow a:visited {color: #F6F6F6; text-decoration: none; font-weight: bold; background-color: transparent;}
+.catrow a:hover {color: #F6F6F6; text-decoration: underline; font-weight: bold; background-color: transparent;}
+.row1 {background-color: #F0F0F0; padding: 5px;}
+.row2 {background-color: #F9F9F9; padding: 5px;}
+.row3 {background-color: #f6f6f6; padding: 5px;}
+.small {font-size: 10px;}
+.spacer {background-color: #D1D0D1; height: 1px; width: 1px;}
+.footrow {background: url('_foot_bg.gif'); color: #FFFFFF; height: 7px; background-color: transparent;}
+.footrowleft {background: url('_foot_left.gif'); height: 7px; width: 6px;}
+.footrowright {background: url('_foot_right.gif'); height: 7px; width: 6px;}
+.row1top {background-color: #c2cdd6; padding: 5px;}
+.row2top {background-color: #dee3e7; padding: 5px;}
+.row1bot {background-color: #c2cdd6; padding: 5px;}
+.row2bot {background-color: #dee3e7; padding: 5px;}
+.dots {background: url('dots.gif'); height: 5px;}
+.moderate {padding: 3px; border: #e0e0e0 1px solid; background-color: #f6f6f6; text-align: left; width:98%;}
+.moderate a:link {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+.moderate a:visited {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+.moderate a:hover {color: #999999; text-decoration: underline; font-weight: bold; background-color: transparent;}
+
+/* for test only */
+table.subType {color: #000000; background-color: #FFFFFF; border-right: #AEBDC4 1px solid; border-top:#AEBDC4 1px solid; border-left:#AEBDC4 1px solid; border-bottom:#AEBDC4 1px solid;}
+td.lightRow {background-color: #F0F0F0; color: #000000;}
+
+ /* texto para el td lightRow */
+.lightRow {font-size:12px; text-decoration:none; color:#000000; background-color: transparent;}
+td.lightRow a:link {text-decoration: underline; color:#003399; background-color: transparent;}
+td.lightRow a:visited {text-decoration: underline; color:#003399; background-color: transparent;}
+td.lightRow a:hover {text-decoration: underline; color:#D68000; background-color: transparent;}
+
+td.mediumRow {background-color: #dee3e7; color: #000000;}
+
+/* texto para el td mediumRow */
+.mediumRow {font-size:12px; text-decoration:none; color:#000000; background-color: transparent;}
+td.mediumRow a:link {text-decoration: underline; color:#003399; background-color: transparent;}
+td.mediumRow a:visited {text-decoration: underline; color:#003399; background-color: transparent;}
+td.mediumRow a:hover {text-decoration: underline; color:#D68000; background-color: transparent;}
+
+td.darkRow {background-color: #c2cdd6; color: #000000;}
+
+/* text for td darkRow */
+.darkRow {font-size:12px; text-decoration:none; color:#000000; background-color: transparent;}
+td.darkRow a:link {text-decoration: underline; color:#003399; background-color: transparent;}
+td.darkRow a:visited {text-decoration: underline; color:#003399; background-color: transparent;}
+td.darkRow a:hover {text-decoration: underline; color:#D68000; background-color: transparent;}
+
+/* blocks colors */
+.bdownloadr { background-color: #EDF4FB;padding: 2px;}
+.bdownloadt { background-color: #E6F0FA;padding: 2px;}
+.blinkr { background-color: #FFFAF9;padding: 2px;}
+.blinkt { background-color: #FFF3F0;padding: 2px;}
+.bnewsr { background-color: #F9FFF9;padding: 2px;}
+.bnewst { background-color: #F0FFF0;padding: 2px;}
+.bcust { background-color: #FFFFF4;padding: 2px;}
+.bfaqsr { background-color: #FFFBF4;padding: 2px;}
+.bfaqsrq { background-color: #FFF3DF;padding: 2px;}
+
+/* weBlog module */
+div.blogDate {background-color: #f6f6f6; border: 1px #e0e0e0 dashed; padding: 2px; text-align: right;margin-bottom: 12px;margin-top: 12px; font-style: italic;}
+div.blogTitle { color: #666666; border-bottom: #cccccc 1px dashed; background-color: transparent;margin-left: 20px; font-size: 150%;font-weight: bold;}
+div.blogContents {margin-left: 35px;padding: 5px;}
+div.blogFooter {padding: 3px; border: #e0e0e0 1px solid; color: #666666; background-color: #f6f6f6;font-size: 80%;}
+
+/* smartfaq module */
+.bfaqr { background-color: #F5F5FF;padding: 2px;}
+.xinfotitle {margin-top: 8px; color: #335380; margin-bottom: 8px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;}
+.xinfotext {color: #456; margin-bottom: 8px; line-height: 130%; display: block;}#335380
+.itemFoot {text-align: right; padding:3px; border:1px solid #808080; background-color: #fff; color: #000;}
+
+/* soapbox module */
+#mod_header { width: 100%; padding: 0; margin: 0; border-bottom: 1px solid #2F5376;}
+.col_header { width: 100%; padding: 0; margin: 0; border-top: 2px solid #2F5376;}
+.clean { width: 100%; padding: 0; margin: 0;}
+.clean99 { width: 99%; padding: 0; margin: 0 0 4px 0;}
+.h18px { font-size: 10px; line-height: 18px;}
+.h18right { font-size: 18px; text-align: right; font-weight: bold; color: #2F5376; letter-spacing: -1.5px; margin: 0; line-height: 18px;}
+.h3a { margin: 6px 0;}
+.h3b { margin: 8px 0 4px 0;}
+.h3c { margin: 0 0 6px 0; color: #2F5376;}
+.intro { color: #456; margin-top: 4px; margin-bottom: 12px;line-height: 130%; display: block;}
+.intro2 { font-size: 12px; color: #456; margin: 4px 0 0 0; line-height: 150%;}
+.intro8 { color: #456; margin: 0px 8px 8px 8px; line-height: 130%; display: block; }
+.nocontent { background-color: #efefef; border: 1px solid silver; padding: 18px; margin-top: 12px; font-size: 12px;}
+.padded { padding: 24px;}
+.th6bot { margin-bottom: 6px;}
+.columnlink { font-size: 16px;}
+.rightfloater { width: 150px; border: 1px solid #456; padding: 4px; margin: 0 0 8px 8px;float:right; }
+.clear { height: 0px;}
+.picleft { float:left; width: 80px; margin: 8px 10px 10px 0;}
+.pic { border: 1px solid black; width: 80px;}
+.left { background-color: #e7e7e7; width: 70%;padding-left: 4px; line-height: 24px;}
+.right { text-align: right; background-color: #e7e7e7;font-weight: bold; width: 30%; padding-right: 8px; line-height: 24px;}
+.subdate { font-size: 9px; color: #2F5376; margin-bottom: 8px;}
+.teaser { color: #456; line-height: 130%; margin: 0;}
+.coldesc { color: #456; margin: 6px 0; font-size: 11px; font-style: italic;}
+.coldesc8 { color: #456; margin: 6px 0; padding: 0 8px;font-size: 10px;}
+.nine { font-size: 9px; margin-bottom: 12px;}
+.nine2 { font-size: 9px; margin-bottom: 4px;}
+.art { border: 1px solid #ccc; margin-bottom: 8px;}
+.arttitle { margin-bottom: 4px; padding: 8px 8px 4px 8px;}
+li.box { list-style-position: outside; margin-left: 16px;}
+.smallpub { font-size: 9px; font-weight: normal; margin-bottom: 4px;}
+.pad18 { padding-left: 18px;}
+div.texto, div.texto p { color: #456; margin: 6px 0; line-height: 130%;}
+.storypic { display: block; margin-bottom: 12px;}
+.storynav { text-align: left; margin: 10px;}
+.colteaser {background-color: #efefef;padding: 12px; border: #e7e7e7; clear: right;}
+.iconlinks { padding: 5px; text-align: right; margin-right:3px;}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/styleMAC.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/styleNN.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/styleNN.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/styleNN.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,275 @@
+/* General definitions */
+body {background-color: #fcfcfc; color: #000000; font-weight: normal; font-size: 12px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif; margin: 0px; padding: 0px;}
+
+/* Specific definitions of general Tags */
+h1 {font-size: 20px;}
+h2 {font-size: 18px;}
+h3 {font-size: 16px;}
+h4 {font-size: 14px;}
+form {margin: 0px; padding: 0px;}
+ul {margin: 2px; padding: 2px; list-style: decimal inside; text-align: left;}
+li {margin-left: 2px; list-style: square inside; color: #000000; background-color: transparent;}
+b {font-weight : bold;}
+img {border: 0px;}
+a:link {color: #003399; text-decoration: none; font-weight: bold; background-color: transparent;}
+a:visited {color: #003399; text-decoration: none; font-weight: bold; background-color: transparent;}
+a:hover {color: #D68000; text-decoration: underline; background-color: transparent;}
+hr {height: 1px; #D68000 solid; width: 95%;}
+
+/*Blocks side Definitions*/
+div.rightcolumn {font-size:11px; width: 185px;}
+td.rightcolumn {border-left: #cccccc solid 1px;background-color: #f0f0f0; color: #000000;}
+div.rightcolumn div.blockContent {background-color: transparent; color: #000000; padding-top:5px; padding-left:5px; padding-right: 15px;text-align:left;}
+div.rightcolumn div.blockTitle {background-color: transparent; color: #666666; padding-top: 3px; padding-right: 15px; font-size:12px; width: 170px; height: 20px; font-weight: bold; background: url('bg_right_blocktitle.gif'); text-align:center;}
+div.rightcolumn a:link {text-decoration: none; color: #000000; background-color: transparent;}
+div.rightcolumn a:visited {text-decoration: none; color: #000000; background-color: transparent;}
+div.rightcolumn a:hover {text-decoration: underline; color: #D68000; background-color: transparent;}
+
+div.leftcolumn {font-size:11px; width: 185px;}
+td.leftcolumn {border-right: #cccccc solid 1px; background-color: #f0f0f0; color: #000000;}
+div.leftcolumn div.blockTitle {background-color: transparent; color: #666666; padding-top: 3px; padding-left: 3px; font-size:12px; width: 185px; height: 20px; font-weight: bold; background: url('bg_left_blocktitle.gif'); text-align:center;}
+div.leftcolumn div.blockContent {background-color: transparent; color: #000000; padding-top: 5px; padding-left: 15px;padding-right: 2px; text-align: left;}
+div.leftcolumn a:link {text-decoration: none; color: #000000; background-color: transparent;}
+div.leftcolumn a:visited {text-decoration: none; color :#000000; background-color: transparent;}
+div.leftcolumn a:hover {text-decoration: underline; color: #1778cb; background-color: transparent;}
+
+td.centercolumn {font-size: 12px; width: 100%;}
+div.centercolumn div.blockTitle {background-color: #f0f0f0; color: #000000; text-align: left; border: 1px solid #CCCCCC; font-weight: bold; padding: 1px; text-decoration: none; vertical-align: middle; }
+div.centercolumn div.blockContent {background-color: #ffffff; color: #000000; padding: 2px; text-align: left; border: 1px solid #CCCCCC; border-top: 0px ;}
+
+td.centerLcolumn {width: 50%; font-size: 12px;}
+div.centerLcolumn div.blockTitle {background-color: #f0f0f0; color: #000000; text-align: left; border: 1px solid #CCCCCC; font-weight: bold; padding: 1px; text-decoration: none; vertical-align: middle;}
+div.centerLcolumn div.blockContent {background-color: #ffffff; color: #000000; padding: 2px; text-align: left; border: 1px solid #CCCCCC; border-top: 0px ;}
+
+td.centerRcolumn {width: 50%; font-size: 12px;}
+div.centerRcolumn div.blockTitle {background-color: #f0f0f0; color: #000000; text-align: left; border: 1px solid #CCCCCC; font-weight: bold; padding: 1px; text-decoration: none; vertical-align: middle;}
+div.centerRcolumn div.blockContent {background-color: #ffffff; color: #000000; padding: 2px; text-align: left; border: 1px solid #CCCCCC; border-top: 0px ;}
+
+/* Dynamic menu */
+td#mainmenu a {background-color: #E0E0E0; margin: 0; border-top: 1px solid #F2F1F2; border-bottom: 1px solid #ADACAD; padding: 0;}
+td#mainmenu a:hover {background-color: #D1D0D1;text-decoration: none;}
+td#mainmenu a.menuTop {padding-left: 2px; border-top: 1px solid silver; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+td#mainmenu a.menuMain {padding-left: 2px; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+td#mainmenu a.menuSub {padding-left: 25px; background-color: #E7EAED; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+td#mainmenu a.menuSubadmin {padding-left: 25px; background-color: #eae3e7; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+
+td#usermenu a {background-color: #E0E0E0; margin: 0; border-top: 1px solid #F2F1F2; border-bottom: 1px solid #ADACAD; padding: 0;}
+td#usermenu a:hover {background-color: #D1D0D1;text-decoration: none;}
+td#usermenu a.menuTopTop {padding-left: 5px; border-top: 1px solid silver; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+td#usermenu a.menuTop {padding-left: 5px; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+td#usermenu a.menuTopadmin {padding-left: 5px; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none; background-color: #eae3e7;}
+td#usermenu a.highlight {padding-left: 5px;background-color: #fcc; border-right: 1px solid #666666; border-bottom: 1px solid #ADACAD; border-left: 1px solid silver;text-decoration: none;}
+
+/* Misc. Definitions */
+.navtext {font-size:10px; font-family:Arial, Sans-serif;}
+.navinput {width: 7em; height: 1.3em; font-size: 80%; border:1px solid #000000; background-color: #E9E9E9; padding:0px 2px 0px 0px; vertical-align: middle;}
+.navinputImage {vertical-align: middle; }
+.bcenterbg {background: url('center_bg.gif'); font-size: 12px; font-weight: bold; height: 37px; letter-spacing: 1px; line-height:37px; vertical-align: bottom;}
+.bcenterleft {background: url('center_left.gif'); height: 37px; width: 11px;}
+.bcenterright {background: url('center_right.gif'); height: 37px; width: 175px;}
+.contentbox {background-color: #fcfcfc; color: #000000; }
+.centerContent {border-bottom: #cccccc 1px solid; background-color: #dee3e7; color: #000000;}
+.tabOn {padding: 2px; text-align:left; border-top: 1px solid #CCCCCC; border-left: 1px solid #CCCCCC; cursor: pointer; color: #000000; background-color: #FFFFFF; width: 120px;}
+.tabOff {padding: 2px; text-align:left; background-color: #F6F6F6; color: #666666; border-top: 1px solid #CCCCCC; border-left: 1px solid #CCCCCC; cursor: pointer; width: 120px;}
+.outer {border: 1px solid silver;}
+.head {background-color: #c2cdd6; padding: 5px; font-weight: bold;}
+.even {background-color: #dee3e7; padding: 5px;}
+.odd {background-color: #E9E9E9; padding: 5px;}
+tr.even td {background-color: #dee3e7; padding: 5px;}
+tr.odd td {background-color: #E9E9E9; padding: 5px;}
+.foot {background-color: #c2cdd6; padding: 5px; font-weight: bold;}
+.copyright {font-size : 10px; background-color: transparent;}
+a.copyright {color: #003399; background-color:transparent;}
+a.copyright:hover {color: #C23030; text-decoration: underline; background-color:transparent;}
+th {background-color: #2F5376; color: #FFFFFF; padding : 2px; vertical-align : middle; font-family: Verdana, Arial, Helvetica, sans-serif;}
+#notifform {display: none;}
+
+/* Redirect messages */
+div.errorMsg { background-color: #FF3737; color: White; text-align: center; border-top: 1px solid #E9E9E9; border-left: 1px solid #E9E9E9; border-right: 1px solid #999999; border-bottom: 1px solid #999999; font-weight: bold; padding: 10px;}
+div.confirmMsg { background-color: #DDFFDF; color: #003399; text-align: center; border-top: 1px solid #E9E9E9; border-left: 1px solid #E9E9E9; border-right: 1px solid #999999; border-bottom: 1px solid #999999; font-weight: bold; padding: 10px;}
+div.resultMsg { background-color : #CCCCCC; color: Black; text-align: center; border-top: 1px solid silver; border-left: 1px solid silver; font-weight: bold; border-right: 1px solid #666666; border-bottom: 1px solid #666666; padding: 10px;}
+
+/* Comments Definitions */
+.comTitle {font-weight: bold; margin-bottom: 2px;}
+.comText {padding: 2px;}
+.comUserStat {font-size: 10px; color: #2F5376; font-weight:bold; border: 1px solid silver; background-color: #ffffff; margin: 2px; padding: 2px;}
+.comUserStatCaption {font-weight: normal;}
+.comUserStatus {margin-left: 2px; margin-top: 10px; color: #2F5376; font-weight:bold; font-size: 10px;}
+.comUserRank {margin: 2px;}
+.comUserRankText {font-size: 10px;font-weight:bold;}
+.comUserRankImg {border: 0;}
+.comUserName {border: 0;}
+.comUserImg {margin: 2px;}
+.comDate {font-weight: normal; font-style: italic; font-size: smaller}
+.comDateCaption {font-weight: bold; font-style: normal;}
+
+/*forms elements*/
+input.formButton {border: 1px solid #5E5D63; color: #000000; font-family: verdana, tahoma, arial, helvetica, sans-serif; font-size: 9px; text-align:center;background: url('inputbg.gif');}
+textarea.formBox {border: #000000 1px solid; background: #ffffff; font: 11px verdana, arial, helvetica, sans-serif; }
+input.formTextBox {border: #000000 1px solid;background: #ffffff; font: 11px verdana, arial, helvetica, sans-serif; }
+select {border: #000000 1px solid;background: #ffffff; font: 10px verdana, arial, helvetica,sans-serif; }
+
+/* Content template definition */
+div.content {text-align: left; padding: 0px 10px 0px 10px;}
+
+/* Code and Quote Definition */
+div.xoopsCode {padding: 3px; font-size: 12px; color: #003399; background-color: #F6FAFD; border-right: #c2cdd6 1px dashed; border-top: #c2cdd6 1px dashed; border-left: #c2cdd6 1px dashed; border-bottom: #c2cdd6 1px dashed;}
+div.xoopsQuote {padding: 3px; font-size: 12px; color: #003399; line-height: 125%; text-align: justify; background-color: #F6FAFD; border-right: #c2cdd6 1px dashed; border-top: #c2cdd6 1px dashed; border-left: #c2cdd6 1px dashed; border-bottom: #c2cdd6 1px dashed;}
+
+/* Links for Quotes */
+div.xoopsQuote a:link, div.xoopsQuote a:visited { color: Black; font-weight: bold; background-color: transparent; }
+div.xoopsQuote a:hover, div.xoopsQuote a:active { color: #1778cb; font-weight: bold; background-color: transparent; }
+
+/* News module definitions */
+td.newsTitle {border-right: #cccccc 1px; border-top: #cccccc 1px; border-left: #cccccc 1px; border-bottom: #cccccc 1px dashed; background-color: transparent; font-size: 18px; text-align: left; font-weight: bold; color: #2F5376; letter-spacing: -1.5px; margin: 0; line-height: 18px;}
+td.newsSubtitle {padding: 5px; border-right: #d0d0d0 1px solid; border-top: #d0d0d0 1px solid; border-left: #d0d0d0 1px solid; color: #666666; border-bottom: #d0d0d0 1px solid; background-color: #dfdfdf; font-size: 15px; text-align: left; font-weight: bold; letter-spacing: -1.5px; margin: 0; line-height: 15px;}
+td.newsSubSubtitle {padding: 3px; border-right: #d0d0d0 1px solid; border-top: #d0d0d0 1px solid; border-left: #d0d0d0 1px solid; color: #666666; border-bottom: #d0d0d0 1px solid; background-color: #eaeaea;}
+td.newsPoster {padding: 3px; border-right: #e0e0e0 1px solid; border-top: #e0e0e0 1px solid; border-left: #e0e0e0 1px solid; color: #666666; border-bottom: #e0e0e0 1px solid; background-color: #f6f6f6;}
+td.newsPoster a:link {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+td.newsPoster a:visited {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+td.newsPoster a:hover {color: #999999; text-decoration: underline; font-weight: bold; background-color: transparent;}
+td.commentsNav {padding: 3px; border-right: #e0e0e0 1px solid; border-top: #e0e0e0 1px solid; border-left: #e0e0e0 1px solid; color: #666666; border-bottom: #e0e0e0 1px solid; background-color: #f6f6f6;}
+span.textPoster {color: #999999; background-color: transparent;}
+td.newsMisc {background-color: #f6f6f6; border: 1px #e0e0e0 dashed; padding: 10px; text-align: center;}
+td.newsContent {padding-right: 5px; padding-left: 5px; padding-bottom: 5px; border-bottom: #cccccc 1px dashed; padding-top: 5px; border-top: #cccccc 1px dashed; font-size: 11px; background-color: #F9F9F9; color: #000000;}
+table.comments {background-color: #ffffff; color: #000000; border: 2px #2F5376 solid;}
+td.commentsHead {padding: 2px; color: #ffffff; background-color: #2F5376;}
+td.sCommentFoot {padding: 3px; border-bottom: #2F5376 1px solid; background-color: #c2cdd6;}
+.sCommentHead {border-right: #e0e0e0 1px solid; border-left: #e0e0e0 1px solid; color: #666666; border-bottom: #e0e0e0 1px solid; background-color: #f6f6f6;}
+td.sCommentThread {color: #000000; border-bottom: #2F5376 1px solid; text-align: left; background-color: #dee3e7;}
+td.sCommentRank {border-top: #2F5376 1px solid; border-right: 1px #CCCCCC solid; border-bottom: #2F5376 1px solid; padding: 10px; text-align: left; background-color: #dee3e7; color: #000000;}
+td.sCommentText {padding-right: 5px; padding-left: 5px; padding-bottom: 5px; padding-top: 0px; font-size: 11px; background-color: #F5F5F5; border-top: #2F5376 1px solid; border-bottom: #2F5376 1px solid; color: #000000;}
+
+/* system module definition */
+table.userinfo {border: 1px solid #2F5376;}
+td.uinfoHead {color: #ffffff; background-color: #2F5376; padding: 3px;}
+td.uinfoBody {color: #666666; background-color: #f6f6f6;}
+td.uinfoMain {padding: 3px; color: #666666; background-color: #c2cdd6;}
+tr.uinfoData {padding: 3px; background-color: #dee3e7; color: #000000;}
+tr.uinfoData a:link {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+tr.uinfoData a:visited {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+tr.uinfoData a:hover {color: #999999; text-decoration: underline; font-weight: bold; background-color: transparent;}
+
+/*Downloads class*/
+.info {padding: 3px;border: #e0e0e0 1px solid; color: #666666; background-color: #f6f6f6;}
+.info a:link {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+.info a:visited {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+.info a:hover {color: #999999; text-decoration: underline; font-weight: bold; background-color: transparent;}
+span.category { font-size: 16px; }
+span.subcategories { font-size: 11px; }
+span.bigtext { font-size: 25px; }
+
+/* Forum class */
+.toprow {background: url('_toprow_bg.gif'); font-size: 12px; font-weight: bold; height: 23px; letter-spacing: 1px; line-height: 23px; text-align: center;}
+.toprowleft {background: url('_toprow_left.gif'); height: 23px; width: 14px;}
+.toprowright {background: url('_toprow_right.gif'); height: 23px; width: 14px;}
+.catrow {background: url('_cellpic_cat.gif'); color: #F6F6F6; font-weight: bold; height: 24px; letter-spacing: 1px; line-height: 24px; padding-left: 5px; padding-right: 5px; text-align: center; background-color: transparent;}
+.catrow a:link {color: #F6F6F6; text-decoration: none; font-weight: bold; background-color: transparent;}
+.catrow a:visited {color: #F6F6F6; text-decoration: none; font-weight: bold; background-color: transparent;}
+.catrow a:hover {color: #F6F6F6; text-decoration: underline; font-weight: bold; background-color: transparent;}
+.row1 {background-color: #F0F0F0; padding: 5px;}
+.row2 {background-color: #F9F9F9; padding: 5px;}
+.row3 {background-color: #f6f6f6; padding: 5px;}
+.small {font-size: 10px;}
+.spacer {background-color: #D1D0D1; height: 1px; width: 1px;}
+.footrow {background: url('_foot_bg.gif'); color: #FFFFFF; height: 7px; background-color: transparent;}
+.footrowleft {background: url('_foot_left.gif'); height: 7px; width: 6px;}
+.footrowright {background: url('_foot_right.gif'); height: 7px; width: 6px;}
+.row1top {background-color: #c2cdd6; padding: 5px;}
+.row2top {background-color: #dee3e7; padding: 5px;}
+.row1bot {background-color: #c2cdd6; padding: 5px;}
+.row2bot {background-color: #dee3e7; padding: 5px;}
+.dots {background: url('dots.gif'); height: 5px;}
+.moderate {padding: 3px; border: #e0e0e0 1px solid; background-color: #f6f6f6; text-align: left; width:98%;}
+.moderate a:link {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+.moderate a:visited {color: #666666; text-decoration: none; font-weight: bold; background-color: transparent;}
+.moderate a:hover {color: #999999; text-decoration: underline; font-weight: bold; background-color: transparent;}
+
+/* for test only */
+table.subType {color: #000000; background-color: #FFFFFF; border-right: #AEBDC4 1px solid; border-top:#AEBDC4 1px solid; border-left:#AEBDC4 1px solid; border-bottom:#AEBDC4 1px solid;}
+td.lightRow {background-color: #F0F0F0; color: #000000;}
+
+ /* texto para el td lightRow */
+.lightRow {font-size : 12px; text-decoration : none; color : #000000; background-color: transparent;}
+td.lightRow a:link {text-decoration: underline; color : #003399; background-color: transparent;}
+td.lightRow a:visited {text-decoration: underline; color : #003399; background-color: transparent;}
+td.lightRow a:hover {text-decoration: underline; color : #D68000; background-color: transparent;}
+
+td.mediumRow {background-color: #dee3e7; color: #000000;}
+
+/* texto para el td mediumRow */
+.mediumRow {font-size : 12px; text-decoration : none; color : #000000; background-color: transparent;}
+td.mediumRow a:link {text-decoration: underline; color : #003399; background-color: transparent;}
+td.mediumRow a:visited {text-decoration: underline; color : #003399; background-color: transparent;}
+td.mediumRow a:hover {text-decoration: underline; color : #D68000; background-color: transparent;}
+
+td.darkRow {background-color: #c2cdd6; color: #000000; }
+
+/* text for td darkRow */
+.darkRow {font-size : 12px; text-decoration : none; color : #000000; background-color: transparent;}
+td.darkRow a:link {text-decoration: underline; color : #003399; background-color: transparent;}
+td.darkRow a:visited {text-decoration: underline; color : #003399; background-color: transparent;}
+td.darkRow a:hover {text-decoration: underline; color : #D68000; background-color: transparent;}
+
+/* blocks colors */
+.bdownloadr { background-color: #EDF4FB;padding: 2px;}
+.bdownloadt { background-color: #E6F0FA;padding: 2px;}
+.blinkr { background-color: #FFFAF9;padding: 2px;}
+.blinkt { background-color: #FFF3F0;padding: 2px;}
+.bnewsr { background-color: #F9FFF9;padding: 2px;}
+.bnewst { background-color: #F0FFF0;padding: 2px;}
+.bcust { background-color: #FFFFF4;padding: 2px;}
+.bfaqsr { background-color: #FFFBF4;padding: 2px;}
+.bfaqsrq { background-color: #FFF3DF;padding: 2px;}
+
+/* weBlog module */
+div.blogDate {background-color: #f6f6f6; border: 1px #e0e0e0 dashed; padding: 2px; text-align: right;margin-bottom: 12px;margin-top: 12px; font-style: italic;}
+div.blogTitle { color: #666666; border-bottom: #cccccc 1px dashed; background-color: transparent;margin-left: 20px; font-size: 150%;font-weight: bold;}
+div.blogContents {margin-left: 35px;padding: 5px;}
+div.blogFooter {padding: 3px; border: #e0e0e0 1px solid; color: #666666; background-color: #f6f6f6;font-size: 80%;}
+
+/* smartfaq module */
+.bfaqr { background-color: #F5F5FF;padding: 2px;}
+.xinfotitle {margin-top: 8px; color: #335380; margin-bottom: 8px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;}
+.xinfotext {color: #456; margin-bottom: 8px; line-height: 130%; display: block;}#335380
+.itemFoot {text-align: right; padding:3px; border:1px solid #808080; background-color: #fff; color: #000;}
+
+/* soapbox module */
+#mod_header { width: 100%; padding: 0; margin: 0; border-bottom: 1px solid #2F5376;}
+.col_header { width: 100%; padding: 0; margin: 0; border-top: 2px solid #2F5376;}
+.clean { width: 100%; padding: 0; margin: 0;}
+.clean99 { width: 99%; padding: 0; margin: 0 0 4px 0;}
+.h18px { font-size: 10px; line-height: 18px;}
+.h18right { font-size: 18px; text-align: right; font-weight: bold; color: #2F5376; letter-spacing: -1.5px; margin: 0; line-height: 18px;}
+.h3a { margin: 6px 0;}
+.h3b { margin: 8px 0 4px 0;}
+.h3c { margin: 0 0 6px 0; color: #2F5376;}
+.intro { color: #456; margin-top: 4px; margin-bottom: 12px;line-height: 130%; display: block;}
+.intro2 { font-size: 12px; color: #456; margin: 4px 0 0 0; line-height: 150%;}
+.intro8 { color: #456; margin: 0px 8px 8px 8px; line-height: 130%; display: block; }
+.nocontent { background-color: #efefef; border: 1px solid silver; padding: 18px; margin-top: 12px; font-size: 12px;}
+.padded { padding: 24px;}
+.th6bot { margin-bottom: 6px;}
+.columnlink { font-size: 16px;}
+.rightfloater { width: 150px; border: 1px solid #456; padding: 4px; margin: 0 0 8px 8px;float:right; }
+.clear { height: 0px;}
+.picleft { float:left; width: 80px; margin: 8px 10px 10px 0;}
+.pic { border: 1px solid black; width: 80px;}
+.left { background-color: #e7e7e7; width: 70%;padding-left: 4px; line-height: 24px;}
+.right { text-align: right; background-color: #e7e7e7;font-weight: bold; width: 30%; padding-right: 8px; line-height: 24px;}
+.subdate { font-size: 9px; color: #2F5376; margin-bottom: 8px;}
+.teaser { color: #456; line-height: 130%; margin: 0;}
+.coldesc { color: #456; margin: 6px 0; font-size: 11px; font-style: italic;}
+.coldesc8 { color: #456; margin: 6px 0; padding: 0 8px;font-size: 10px;}
+.nine { font-size: 9px; margin-bottom: 12px;}
+.nine2 { font-size: 9px; margin-bottom: 4px;}
+.art { border: 1px solid #ccc; margin-bottom: 8px;}
+.arttitle { margin-bottom: 4px; padding: 8px 8px 4px 8px;}
+li.box { list-style-position: outside; margin-left: 16px;}
+.smallpub { font-size: 9px; font-weight: normal; margin-bottom: 4px;}
+.pad18 { padding-left: 18px;}
+div.texto, div.texto p { color: #456; margin: 6px 0; line-height: 130%;}
+.storypic { display: block; margin-bottom: 12px;}
+.storynav { text-align: left; margin: 10px;}
+.colteaser {background-color: #efefef;padding: 12px; border: #e7e7e7; clear: right;}
+.iconlinks { padding: 5px; text-align: right; margin-right:3px;}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/styleNN.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/submenu_box_norm.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/submenu_box_norm.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,154 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
+<meta http-equiv="content-language" content="<{$xoops_langcode}>" />
+<meta name="robots" content="<{$xoops_meta_robots}>" />
+<meta name="keywords" content="<{$xoops_meta_keywords}>" />
+<meta name="description" content="<{$xoops_meta_description}>" />
+<meta name="rating" content="<{$xoops_meta_rating}>" />
+<meta name="author" content="<{$xoops_meta_author}>" />
+<meta name="copyright" content="<{$xoops_meta_copyright}>" />
+<meta name="generator" content="XOOPS" />
+<title><{$xoops_sitename}> - <{$xoops_pagetitle}></title>
+<link href="<{$xoops_url}>/favicon.ico" rel="SHORTCUT ICON" />
+<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_url}>/xoops.css" />
+<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_themecss}>" />
+<!-- RMV: added module header -->
+<{$xoops_module_header}>
+<script type="text/javascript">
+<!--
+<{$xoops_js}>
+//-->
+</script>
+</head>
+<body>
+<!-- Start Header -->
+<table cellspacing="0" cellpadding="0" width="100%" border="0" style="background-color : #2F5376; color: #ffffff">
+ <tr>
+ <td height="70" width="150" valign="middle" align="left" rowspan="2">
+ <a href="<{$xoops_url}>"><img src="<{$xoops_imageurl}>logo.gif" alt="" /></a></td>
+<td valign="middle" align="center" width="100%">
+<{$xoops_banner}>
+</td></tr><tr>
+ <td width="100%" valign="bottom" align="right" class="navbar" >
+ <table border="0" cellpadding="1" cellspacing="0">
+ <tr>
+ <td class="tabOff" onmouseover="this.className='tabOn';" onmouseout="this.className='tabOff';"><a href="<{$xoops_url}>">Home</a></td>
+ <td class="tabOff" onmouseover="this.className='tabOn';" onmouseout="this.className='tabOff';"><a href="http://www.xoops.org/modules/newbb/">XOOPS Support</a></td>
+ <td class="tabOff" onmouseover="this.className='tabOn';" onmouseout="this.className='tabOff';"><a href="http://www.xoops.org/modules/xoopsfaq/">XOOPS FAQ</a></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<!-- End Header -->
+<!-- Start Headerbar -->
+<table border="0" width="100%" cellspacing="0" cellpadding="0">
+ <tr>
+ <td width="10"><img src="<{$xoops_imageurl}>hbar_left.gif" width="10" height="23" alt="" /></td>
+ <td style="background-image: url(<{$xoops_imageurl}>hbar_middle.gif);" align="left"> </td>
+<td width="15%" style="background-image: url(<{$xoops_imageurl}>hbar_middle.gif);" align="right">
+<form action="<{$xoops_url}>/search.php" method="post">
+ <input type="text" name="query" class="navinput" /><input type="hidden" name="action" value="results" /> <input class="navinputImage" type="image" src="<{$xoops_imageurl}>searchButton.gif" name="searchSubmit" />
+ </form></td>
+ <td width="10"><img src="<{$xoops_imageurl}>hbar_right.gif" width="10" height="23" alt="" /></td>
+ </tr>
+</table>
+<!-- End Headerbar -->
+
+ <table width="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td class="leftcolumn" valign="top" style="background-image: url(<{$xoops_imageurl}>bg_left.gif);"><div class="leftcolumn">
+ <!-- Start left blocks loop -->
+ <{foreach item=block from=$xoops_lblocks}>
+ <{include file="x2t/theme_blockleft.html"}>
+ <{/foreach}>
+ <!-- End left blocks loop -->
+ </div></td>
+ <td width="100%" valign="top" class="contentbox">
+
+ <!-- Display center blocks if any -->
+ <{if $xoops_showcblock == 1}>
+<br />
+<table width="98%" border="0" cellpadding="0" cellspacing="0" align="center">
+<tr>
+<td class="bcenterleft"> </td>
+<td class="bcenterbg"> </td>
+<td class="bcenterright"> </td>
+</tr>
+</table>
+
+ <table width="98%" cellpadding="3" cellspacing="0" align="center" style="border-left: #cccccc 1px solid;border-right: #cccccc 1px solid;border-bottom: #cccccc 1px solid;">
+
+ <tr>
+ <td class="centerLcolumn" valign="top">
+ <div class="centerLcolumn">
+ <!-- Start center-left blocks loop -->
+ <{foreach item=block from=$xoops_clblocks}>
+ <{include file="x2t/theme_blockcenter_l.html"}>
+ <br />
+ <{/foreach}>
+ <!-- End center-left blocks loop -->
+ </div>
+ </td>
+ <td class="centerRcolumn" valign="top">
+ <div class="centerRcolumn">
+ <!-- Start center-right blocks loop -->
+ <{foreach item=block from=$xoops_crblocks}>
+ <{include file="x2t/theme_blockcenter_r.html"}>
+ <br />
+ <{/foreach}>
+ <!-- End center-right blocks loop -->
+ </div>
+ </td>
+ </tr>
+ </table>
+ <{/if}>
+ <!-- End display center blocks -->
+
+
+ <br />
+ <div class="content">
+ <{$xoops_contents}>
+ </div>
+ <br />
+ <table width="98%" cellpadding="3" cellspacing="0" align="center">
+ <tr>
+ <td class="centercolumn" valign="top" colspan="2">
+ <div class="centercolumn">
+ <!-- Start center-center blocks loop -->
+ <{foreach item=block from=$xoops_ccblocks}>
+ <{include file="x2t/theme_blockcenter_c.html"}>
+ <br />
+ <{/foreach}>
+ <!-- End center-center blocks loop -->
+ </div>
+ </td></tr>
+ </table>
+ </td>
+ <{if $xoops_showrblock == 1}>
+ <td class="rightcolumn" valign="top" align="right" style="background-image: url(<{$xoops_imageurl}>bg_right.gif);"><div class="rightcolumn">
+ <!-- Start right blocks loop -->
+ <{foreach item=block from=$xoops_rblocks}>
+ <{include file="x2t/theme_blockright.html"}>
+ <{/foreach}>
+ <!-- End right blocks loop -->
+ </div>
+ </td>
+<{else}>
+<td width="10" style="background-image: url(<{$xoops_imageurl}>bg_right2.gif);"><img src="<{$xoops_imageurl}>dummy.gif" width="10" height="10" alt="" /></td>
+<{/if}>
+ </tr>
+ <tr>
+ <td colspan="3" width="100%">
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0">
+ <tr>
+ <td width="10"><img src="<{$xoops_imageurl}>hbar_left.gif" width="10" height="23" alt="" /></td>
+ <td style="background-image: url(<{$xoops_imageurl}>hbar_middle.gif);" align="center"> <span class="copyright"><{$xoops_footer}></span></td>
+ <td width="10"><img src="<{$xoops_imageurl}>hbar_right.gif" width="10" height="23" alt="" /></td></tr>
+</table>
+</td></tr></table>
+</body>
+</html>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_adminnav.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_adminnav.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_adminnav.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,36 @@
+<div>
+ <{foreach item=module from=$adminmenu key=counter}>
+ <table width="95%" >
+ <tr>
+ <th class="adminNavHeader" onclick="xoops_toggleMenu(<{$counter}>);" style="cursor: pointer;">
+ <{$module.name}>
+ </th>
+ </tr>
+ <tr id="adminmenu_<{$counter}>" style="display: none;">
+ <td style="padding: 2px;">
+ <{foreach item=menuitem from=$module.links}>
+ <a class="adminNavItem" href="<{$menuitem.link}>"><{$menuitem.title}></a><br />
+ <{/foreach}>
+ </td>
+ </tr>
+ </table>
+ <{/foreach}>
+ <{if $systemmenu.name}>
+ <{assign var=system_no value=$adminmenucount-1}>
+ <table width="95%" >
+ <tr>
+ <th class="adminNavHeader" onclick="xoops_toggleMenu(<{$system_no}>);" style="cursor: pointer;">
+ <{$systemmenu.name}>
+ </th>
+ </tr>
+ <tr id="adminmenu_<{$system_no}>" style="display: none;">
+ <td style="padding: 2px;">
+ <{foreach item=menuitem from=$systemmenu.links}>
+ <a class="adminNavItem" href="<{$menuitem.link}>"><{$menuitem.title}></a><br />
+ <{/foreach}>
+ </td>
+ </tr>
+ </table>
+ <{/if}>
+ <script type="text/javascript">xoops_applyCookie();</script>
+</div>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_adminnav.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockcenter_c.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockcenter_c.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockcenter_c.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,8 @@
+<table width="100%" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="toprowleft"></td>
+ <td class="toprow"><{$block.title}></td>
+ <td class="toprowright"></td>
+ </tr>
+</table>
+<div class="blockContent"><{$block.content}></div>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockcenter_c.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockcenter_l.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockcenter_l.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockcenter_l.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,2 @@
+<div class="blockTitle"><{$block.title}></div>
+<div class="blockContent"><{$block.content}></div>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockcenter_l.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockcenter_r.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockcenter_r.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockcenter_r.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,2 @@
+<div class="blockTitle"><{$block.title}></div>
+<div class="blockContent"><{$block.content}></div>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockcenter_r.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockleft.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockleft.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockleft.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,2 @@
+<div class="blockTitle"><{$block.title}></div>
+<div class="blockContent"><{$block.content}></div>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockleft.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockright.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockright.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockright.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,2 @@
+<div class="blockTitle"><{$block.title}></div>
+<div class="blockContent"><{$block.content}></div>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_blockright.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_moduleadmin.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_moduleadmin.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_moduleadmin.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,26 @@
+<div id='buttontop'>
+ <table style="width: 100%; padding: 0; " cellspacing="0">
+ <tr>
+ <td style="width: 70%; font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;">
+ <a href="../index.php"><{$smarty.const._AD_NAV_MODHOME}></a>
+ </td>
+ <td style="width: 30%; font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;">
+ <b><{$modulemenu.name}> <{$smarty.const._AD_NAV_MODADMIN}></b> <{$modulemenu.breadcrumb}>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div id='buttonbar'>
+ <ul>
+ <{foreach item=link from=$modulemenu.links key=id}>
+ <{if $id == $modulemenu.current}>
+ <li class='current'>
+ <{else}>
+ <li>
+ <{/if}>
+ <a href='<{$link.link}>'><span><{$link.title}></span></a>
+ </li>
+ <{/foreach}>
+ </ul>
+ </div>
+ <br style="clear:both;" />
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/theme_moduleadmin.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/themeadmin.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/themeadmin.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/themeadmin.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,163 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
+<meta http-equiv="content-language" content="<{$xoops_langcode}>" />
+<meta name="robots" content="<{$xoops_meta_robots}>" />
+<meta name="keywords" content="<{$xoops_meta_keywords}>" />
+<meta name="description" content="<{$xoops_meta_description}>" />
+<meta name="rating" content="<{$xoops_meta_rating}>" />
+<meta name="author" content="<{$xoops_meta_author}>" />
+<meta name="copyright" content="<{$xoops_meta_copyright}>" />
+<meta name="generator" content="XOOPS" />
+<title><{$xoops_sitename}> - <{$xoops_pagetitle}></title>
+<link href="<{$xoops_url}>/favicon.ico" rel="SHORTCUT ICON" />
+<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_url}>/xoops.css" />
+<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_themecss}>" />
+
+<!-- RMV: added module header -->
+<{$xoops_module_header}>
+<script type="text/javascript">
+<!--
+<{$xoops_js}>
+//-->
+</script>
+<script type="text/javascript">
+var adminmenusize=<{$adminmenucount}>;
+</script>
+<script type="text/javascript" src="<{$xoops_imageurl}>js/admin.js"></script>
+</head>
+<body>
+<!-- Start Header -->
+<table cellspacing="0" cellpadding="0" width="100%" border="0" style="background-color : #2F5376; color: #ffffff">
+ <tr>
+ <td height="70" width="150" valign="middle" align="left" rowspan="2">
+ <a href="<{$xoops_url}>"><img src="<{$xoops_imageurl}>logo.gif" alt="" /></a></td>
+<td valign="middle" align="center" width="100%">
+<{$xoops_banner}>
+</td></tr><tr>
+ <td width="100%" valign="bottom" align="right" class="navbar" >
+ <table border="0" cellpadding="1" cellspacing="0">
+ <tr>
+ <td class="tabOff" onmouseover="this.className='tabOn';" onmouseout="this.className='tabOff';"><a href="<{$xoops_url}>">Home</a></td>
+ <td class="tabOff" onmouseover="this.className='tabOn';" onmouseout="this.className='tabOff';"><a href="http://www.xoops.org/modules/newbb/">XOOPS Support</a></td>
+ <td class="tabOff" onmouseover="this.className='tabOn';" onmouseout="this.className='tabOff';"><a href="http://www.xoops.org/modules/xoopsfaq/">XOOPS FAQ</a></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<!-- End Header -->
+<!-- Start Headerbar -->
+<table border="0" width="100%" cellspacing="0" cellpadding="0">
+ <tr>
+ <td width="10"><img src="<{$xoops_imageurl}>hbar_left.gif" width="10" height="23" alt="" /></td>
+ <td style="background-image: url(<{$xoops_imageurl}>hbar_middle.gif);" align="left"> </td>
+<td width="15%" style="background-image: url(<{$xoops_imageurl}>hbar_middle.gif);" align="right">
+<form action="<{$xoops_url}>/search.php" method="post">
+ <input type="text" name="query" class="navinput" /><input type="hidden" name="action" value="results" /> <input class="navinputImage" type="image" src="<{$xoops_imageurl}>searchButton.gif" name="searchSubmit" />
+ </form></td>
+ <td width="10"><img src="<{$xoops_imageurl}>hbar_right.gif" width="10" height="23" alt="" /></td>
+ </tr>
+</table>
+<!-- End Headerbar -->
+
+ <table width="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td class="leftcolumn" valign="top" style="background-image: url(<{$xoops_imageurl}>bg_left.gif);"><div class="leftcolumn">
+ <!-- Start left blocks loop -->
+ <{include file="x2t/theme_adminnav.html"}>
+ <{foreach item=block from=$xoops_lblocks}>
+ <{include file="x2t/theme_blockleft.html"}>
+ <{/foreach}>
+ <!-- End left blocks loop -->
+ </div></td>
+ <td width="100%" valign="top" class="contentbox">
+
+ <!-- Display center blocks if any -->
+ <{if $xoops_showcblock == 1}>
+<br />
+<table width="98%" border="0" cellpadding="0" cellspacing="0" align="center">
+<tr>
+<td class="bcenterleft"> </td>
+<td class="bcenterbg"> </td>
+<td class="bcenterright"> </td>
+</tr>
+</table>
+
+ <table width="98%" cellpadding="3" cellspacing="0" align="center" style="border-left: #cccccc 1px solid;border-right: #cccccc 1px solid;border-bottom: #cccccc 1px solid;">
+
+ <tr>
+ <td class="centerLcolumn" valign="top">
+ <div class="centerLcolumn">
+ <!-- Start center-left blocks loop -->
+ <{foreach item=block from=$xoops_clblocks}>
+ <{include file="x2t/theme_blockcenter_l.html"}>
+ <br />
+ <{/foreach}>
+ <!-- End center-left blocks loop -->
+ </div>
+ </td>
+ <td class="centerRcolumn" valign="top">
+ <div class="centerRcolumn">
+ <!-- Start center-right blocks loop -->
+ <{foreach item=block from=$xoops_crblocks}>
+ <{include file="x2t/theme_blockcenter_r.html"}>
+ <br />
+ <{/foreach}>
+ <!-- End center-right blocks loop -->
+ </div>
+ </td>
+ </tr>
+ </table>
+ <{/if}>
+ <!-- End display center blocks -->
+
+
+ <br />
+ <div class="content">
+ <{if isset($modulemenu)}>
+ <{include file="x2t/theme_moduleadmin.html"}>
+ <{/if}>
+ <{$xoops_contents}>
+ </div>
+ <br />
+ <table width="98%" cellpadding="3" cellspacing="0" align="center">
+ <tr>
+ <td class="centercolumn" valign="top" colspan="2">
+ <div class="centercolumn">
+ <!-- Start center-center blocks loop -->
+ <{foreach item=block from=$xoops_ccblocks}>
+ <{include file="x2t/theme_blockcenter_c.html"}>
+ <br />
+ <{/foreach}>
+ <!-- End center-center blocks loop -->
+ </div>
+ </td></tr>
+ </table>
+ </td>
+ <{if $xoops_showrblock == 1}>
+ <td class="rightcolumn" valign="top" align="right" style="background-image: url(<{$xoops_imageurl}>bg_right.gif);"><div class="rightcolumn">
+ <!-- Start right blocks loop -->
+ <{foreach item=block from=$xoops_rblocks}>
+ <{include file="x2t/theme_blockright.html"}>
+ <{/foreach}>
+ <!-- End right blocks loop -->
+ </div>
+ </td>
+<{else}>
+<td width="10" style="background-image: url(<{$xoops_imageurl}>bg_right2.gif);"><img src="<{$xoops_imageurl}>dummy.gif" width="10" height="10" alt="" /></td>
+<{/if}>
+ </tr>
+ <tr>
+ <td colspan="3" width="100%">
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0">
+ <tr>
+ <td width="10"><img src="<{$xoops_imageurl}>hbar_left.gif" width="10" height="23" alt="" /></td>
+ <td style="background-image: url(<{$xoops_imageurl}>hbar_middle.gif);" align="center"> <span class="copyright"><{$xoops_footer}></span></td>
+ <td width="10"><img src="<{$xoops_imageurl}>hbar_right.gif" width="10" height="23" alt="" /></td></tr>
+</table>
+</td></tr></table>
+</body>
+</html>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/themeadmin.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/up.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/up.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/user_admin.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/user_admin.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/user_editaccount.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/user_editaccount.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/user_inbox.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/user_inbox.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/user_logout.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/user_logout.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/user_notifications.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/x2t/user_notifications.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/README.txt
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/README.txt 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/README.txt 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,20 @@
+#######################################################
+XMT - Xoops Modern Theme
+A theme to celebrate Xoops 2.1 release
+Version: 0.1
+Author: ralf57 , the whole xoops community
+Based on kavaXtreme's Kubrick flexible
+#######################################################
+
+The upcoming release of version 2.1 will make our preferred
+CMS a big step forward.
+The default theme which is bundled with every release
+starting form 2.0 has not ever really changed/improved instead.
+So i thought 2.1 version would deserve a great theme.
+I started designing a new theme and named it XMT which
+stands for Xoops Modern Theme.
+With the help of you all we can give Xoops a new,great,
+well tested default theme to build our sites on.
+Thank you in advance for your contribution.
+
+*** ralf57 ***
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockcenter_c.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockcenter_c.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockcenter_c.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,6 @@
+<div style="padding: 5px;">
+ <fieldset>
+ <legend class="blockTitle"><{$block.title}></legend>
+ <div class="blockContent"><{$block.content}></div>
+ </fieldset>
+</div>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockcenter_c.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockcenter_l.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockcenter_l.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockcenter_l.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,6 @@
+<div style="padding: 0px 0px 0px 8px;">
+ <fieldset>
+ <legend class="blockTitle"><{$block.title}></legend>
+ <div class="blockContent"><{$block.content}></div>
+ </fieldset>
+</div>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockcenter_l.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockcenter_r.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockcenter_r.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockcenter_r.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,6 @@
+<div style="padding: 0px 5px 0px 0px;">
+ <fieldset>
+ <legend class="blockTitle"><{$block.title}></legend>
+ <div class="blockContent"><{$block.content}></div>
+ </fieldset>
+</div>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockcenter_r.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockleft.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockleft.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockleft.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,3 @@
+<div class="blockTitle"><{$block.title}></div>
+<div class="blockContent"><{$block.content}></div>
+
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockleft.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockright.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockright.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockright.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,2 @@
+<div class="blockTitle"><{$block.title}></div>
+<div class="blockContent"><{$block.content}></div>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/blocks/theme_blockright.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/calendar.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/calendar.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/calendar.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,252 @@
+/* The main calendar widget. DIV containing a table. */
+
+.calendar {
+ position: relative;
+ display: none;
+ border: 1px solid;
+ border-color: #fff #000 #000 #fff;
+ font-size: 11px;
+ cursor: default;
+ background: Window;
+ color: WindowText;
+ font-family: tahoma,verdana,sans-serif;
+ width: 1%;
+}
+
+.calendar table {
+ border: 1px solid;
+ border-color: #fff #000 #000 #fff;
+ font-size: 11px;
+ cursor: default;
+ background: Window;
+ color: WindowText;
+ font-family: tahoma,verdana,sans-serif;
+}
+
+/* Header part -- contains navigation buttons and day names. */
+
+.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
+ text-align: center;
+ padding: 1px;
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+ background: ButtonFace;
+}
+
+.calendar .nav {
+ background: ButtonFace url(menuarrow.gif) no-repeat 100% 100%;
+}
+
+.calendar thead .title { /* This holds the current "month, year" */
+ font-weight: bold;
+ padding: 1px;
+ border: 1px solid #000;
+ background: ActiveCaption;
+ color: CaptionText;
+ text-align: center;
+}
+
+.calendar thead .headrow { /* Row <TR> containing navigation buttons */
+}
+
+.calendar thead .daynames { /* Row <TR> containing the day names */
+}
+
+.calendar thead .name { /* Cells <TD> containing the day names */
+ border-bottom: 1px solid ButtonShadow;
+ padding: 2px;
+ text-align: center;
+ background: ButtonFace;
+ color: ButtonText;
+}
+
+.calendar thead .weekend { /* How a weekend day name shows in header */
+ color: #f00;
+}
+
+.calendar thead .hilite { /* How do the buttons in header appear when hover */
+ border: 2px solid;
+ padding: 0px;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+}
+
+.calendar thead .active { /* Active (pressed) buttons in header */
+ border-width: 1px;
+ padding: 2px 0px 0px 2px;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+
+/* The body part -- contains all the days in month. */
+
+.calendar tbody .day { /* Cells <TD> containing month days dates */
+ width: 2em;
+ text-align: right;
+ padding: 2px 4px 2px 2px;
+}
+.calendar tbody .day.othermonth {
+ font-size: 80%;
+ color: #aaa;
+}
+.calendar tbody .day.othermonth.oweekend {
+ color: #faa;
+}
+
+.calendar table .wn {
+ padding: 2px 3px 2px 2px;
+ border-right: 1px solid ButtonShadow;
+ background: ButtonFace;
+ color: ButtonText;
+}
+
+.calendar tbody .rowhilite td {
+ background: Highlight;
+ color: HighlightText;
+}
+
+.calendar tbody td.hilite { /* Hovered cells <TD> */
+ padding: 1px 3px 1px 1px;
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+}
+
+.calendar tbody td.active { /* Active (pressed) cells <TD> */
+ padding: 2px 2px 0px 2px;
+ border: 1px solid;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+
+.calendar tbody td.selected { /* Cell showing selected date */
+ font-weight: bold;
+ border: 1px solid;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+ padding: 2px 2px 0px 2px;
+ background: ButtonFace;
+ color: ButtonText;
+}
+
+.calendar tbody td.weekend { /* Cells showing weekend days */
+ color: #f00;
+}
+
+.calendar tbody td.today { /* Cell showing today date */
+ font-weight: bold;
+ color: #00f;
+}
+
+.calendar tbody td.disabled { color: GrayText; }
+
+.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
+ visibility: hidden;
+}
+
+.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
+ display: none;
+}
+
+/* The footer part -- status bar and "Close" button */
+
+.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
+}
+
+.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
+ background: ButtonFace;
+ padding: 1px;
+ border: 1px solid;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+ color: ButtonText;
+ text-align: center;
+}
+
+.calendar tfoot .hilite { /* Hover style for buttons in footer */
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+ padding: 1px;
+ background: #e4e0d8;
+}
+
+.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
+ padding: 2px 0px 0px 2px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+}
+
+/* Combo boxes (menus that display months/years for direct selection) */
+
+.calendar .combo {
+ position: absolute;
+ display: none;
+ width: 4em;
+ top: 0px;
+ left: 0px;
+ cursor: default;
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+ background: Menu;
+ color: MenuText;
+ font-size: 90%;
+ padding: 1px;
+ z-index: 100;
+}
+
+.calendar .combo .label,
+.calendar .combo .label-IEfix {
+ text-align: center;
+ padding: 1px;
+}
+
+.calendar .combo .label-IEfix {
+ width: 4em;
+}
+
+.calendar .combo .active {
+ padding: 0px;
+ border: 1px solid #000;
+}
+
+.calendar .combo .hilite {
+ background: Highlight;
+ color: HighlightText;
+}
+
+.calendar td.time {
+ border-top: 1px solid ButtonShadow;
+ padding: 1px 0px;
+ text-align: center;
+ background-color: ButtonFace;
+}
+
+.calendar td.time .hour,
+.calendar td.time .minute,
+.calendar td.time .ampm {
+ padding: 0px 3px 0px 4px;
+ border: 1px solid #889;
+ font-weight: bold;
+ background-color: Menu;
+}
+
+.calendar td.time .ampm {
+ text-align: center;
+}
+
+.calendar td.time .colon {
+ padding: 0px 2px 0px 3px;
+ font-weight: bold;
+}
+
+.calendar td.time span.hilite {
+ border-color: #000;
+ background-color: Highlight;
+ color: HighlightText;
+}
+
+.calendar td.time span.active {
+ border-color: #f00;
+ background-color: #000;
+ color: #0f0;
+}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/calendar.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/style.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/style.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/style.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,169 @@
+/*Structure */
+body {margin: 0;padding: 0;background: /*#e7e7e7*/#bcc8d2;color: #333;font-size: 62.5%; /* <-- Resets 1em to 10px */font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif; text-align: left;}
+
+#header-l {margin: 0;padding: 0;background: #48b url("../images/tl.png") no-repeat left;height: 194px;}
+#header-r {margin: 0;padding: 0;background: url("../images/tr.png") no-repeat right;height: 194px;}
+#page-ml {margin: 20px 80px 20px 80px;padding: 0;background: #fff url("../images/ml.png") repeat-y left;}
+#page-mr {margin: 0;padding: 0;background: url("../images/mr.png") repeat-y right;}
+#content {min-height: 300px;margin: 0 1px 0 1px;padding: 0;}
+#footer-l {margin: 0;padding: 0;background: #eee url("../images/bl.png") no-repeat left;height: 62px;}
+#footer-r {margin: 0;padding: 0;background: url("../images/br.png") no-repeat right;height: 62px;}
+#footer-r p { margin: 0; padding: 20px 0 0 0; text-align: center; }
+
+/*Left Column */
+td#leftcolumn { padding: 10px 15px 0 15px; width: 190px; background: #f9f9f9; }
+td#leftcolumn th { }
+td#leftcolumn div.blockTitle {margin: 10px 0 5px 0;padding: 0;font: bold 1.2em 'Lucida Grande', Verdana, Sans-Serif;}
+td#leftcolumn div.blockContent { margin: 0 0 0 10px; }
+
+/*Center Column */
+td#centercolumn { padding: 20px 10px 10px 10px; font-size: 1.2em; line-height: 1.4em; }
+td#centercolumn th { color: #fff; background: #48b; vertical-align: middle; }
+
+td#centerCcolumn { padding: 0 3px 1px 3px; }
+td#centerCcolumn div.blockTitle {margin: 0 0 10px 0;font: bold 1.6em 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;}
+td#centerCcolumn div.blockContent { margin: 0 0 20px 0; }
+
+td#centerLcolumn { width: 50%; padding: 0 3px 0 0; }
+td#centerLcolumn div.blockTitle {margin: 0 0 10px 0;font: bold 1.6em 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;}
+td#centerLcolumn div.blockContent { margin: 0 0 20px 0; }
+
+td#centerRcolumn { width: 50%; padding: 0px 3px 0px 0px; }
+td#centerRcolumn div.blockTitle {margin: 0 0 10px 0;font: bold 1.6em 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;}
+td#centerRcolumn div.blockContent { margin: 0 0 20px 0; }
+
+/* Right Column */
+td#rightcolumn { padding: 10px 15px 0 15px; width: 190px; background: #f9f9f9; }
+td#rightcolumn th { }
+td#rightcolumn div.blockTitle {margin: 10px 0 5px 0;padding: 0;font: bold 1.2em 'Lucida Grande', Verdana, Sans-Serif;}
+td#rightcolumn div.blockContent { margin: 0 0 0 10px; }
+
+/* Begin Menus */
+td#mainmenu { margin: 0; }
+td#mainmenu a:before { content: url(images/menubullet.png); }
+td#mainmenu a:hover { }
+td#mainmenu a.menuTop { padding-left: 3px; }
+td#mainmenu a.menuMain { padding-left: 3px; }
+td#mainmenu a.menuSub { padding-left: 9px; }
+
+td#usermenu { margin: 0; }
+td#usermenu a:before { content: url(images/menubullet.png); }
+td#usermenu a:hover { }
+td#usermenu a.menuTop { padding-left: 3px; }
+td#usermenu a.highlight { background: #fcc; }
+
+/*Headers */
+h1, h2, h3, h4 {font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;font-weight: bold;}
+h1 {}
+h2 { margin: 30px 0 10px 0; font-size: 1.6em; }
+h2.pagetitle { text-align: center; }
+td#leftcolumn h2, td#rightcolumn h2 {margin: 5px 0 0 0;padding: 0;font: 1.2em 'Lucida Grande', Verdana, Sans-Serif;}
+h3 { padding: 0; margin: 30px 0 0; font-size: 1.3em; }
+h1, h1 a, h1 a:hover, h1 a:visited, .description { color: #ffb95f; text-decoration: none; }
+h2, h2 a, h2 a:visited, h3, h3 a, h3 a:visited { color: #333; }
+h2, h2 a, h2 a:hover, h2 a:visited, h3, h3 a, h3 a:hover, h3 a:visited, td#leftcolumn h2, td#rightcolumn h2, cite { text-decoration: none; }
+a, h2 a:hover, h3 a:hover { color: #06c; text-decoration: none; }
+a:hover { color: #147; text-decoration: underline; }
+.description { font-size: 1.2em; text-align: center;padding-top: 1.6em; } /*remove,only for header*/
+#admindesc { padding: 30px 0px 0px 0px;margin: 0;font-size: 4em; font-weight: bold;text-align: center;color: #ffb95f;}
+#admindesc_small { padding: 0px 0px 20px 0px;font-size: 1.2em;text-align: center; }
+acronym, abbr, span.caps { font-size: 0.9em; letter-spacing: .07em; }
+
+/*Lists */
+html>body ul {list-style: none;text-indent: -12px;}
+ul li:before {content: "\00BB \0020";}
+ul {margin-top: 0;margin-left: 0;padding-left: 12px;}
+li {margin: 7px 0 8px 10px;}
+
+/* System Messages */
+div.errorMsg {border-top: 1px solid #ddf;border-left: 10px solid #48b;border-right: 1px solid #aaa;border-bottom: 1px solid #aaa;padding: 10px;width: 75%;background: #fcc;font-weight: bold;text-align: center;}
+
+div.confirmMsg {border-top: 1px solid #ddf;border-left: 10px solid #48b;border-right: 1px solid #aaa;border-bottom: 1px solid #aaa;padding: 10px;width: 75%;color: #136C99;background: #ddffdf;font-weight: bold;text-align: center;}
+
+div.resultMsg {border-top: 1px solid silver;border-left: 10px solid #48b;border-right: 1px solid #666;border-bottom: 1px solid #666;padding: 10px;width: 75%;color: #333;background: #f9f9f9;font-weight: bold;text-align: center;}
+
+/* Posts */
+div.xoopsCode {border: 1px inset #000;padding: 6px;background: #e7e7e7;font-family: "Courier New",Courier,monospace; overflow: auto;}
+div.xoopsQuote { font-style: italic; overflow: auto;}
+
+/* Various */
+table { width: 100%; }
+table td { margin: 0; padding: 0; border-width: 0; vertical-align: top; }
+th {padding: 2px;color: #fff;background: #48b;font-family: Verdana, Arial, Helvetica, sans-serif;vertical-align: middle;}
+
+.outer {border: 1px solid #CCCCCC;}
+.head {background-color: #e7e7e7; padding: 3px; font-weight: normal;}
+.even {background-color: #e7e7e7; padding: 3px;}
+.odd {background-color: #f7f7f7; padding: 3px;}
+.foot {background-color: #436792; padding: 3px; font-weight: bold;text-align: center;}
+tr.head td {background-color: #B6CDE4; padding: 3px; font-weight: bold;}
+tr.even td {background-color: #efefef; padding: 3px;}
+tr.odd td {background-color: #f7f7f7; padding: 3px;}
+tr.foot td {background-color: #f7f7f7; padding: 3px; font-weight: bold;}
+
+.item { }
+.itemHead { padding: 3px; }
+.itemInfo { padding: 3px; text-align: right; }
+.itemTitle a {margin: 30px 0 10px 0;color: #000;font: bold 1.6em 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;}
+.itemPoster { font-size: 90%; font-style: italic; }
+.itemPostDate { font-size: 90%; font-style: italic; }
+.itemStats { font-size: 90%; font-style: italic; }
+.itemBody { padding-left: 5px; }
+.itemText {margin-top: 5px;margin-bottom: 5px;line-height: 1.5em;}
+.itemText:first-letter { }
+.itemFoot { padding: 3px; text-align: right; }
+.itemAdminLink { font-size: 90%; }
+.itemPermaLink { font-size: 90%; }
+
+/* forms elements */
+input { border: 1px solid #CCCCCC;font-size: 11px; font-family: verdana, arial, helvetica, sans-serif; color: #333333; background-color: #ffffff;padding-left:3px;background-color: #f7f7f7;}
+textarea {background-color: #f7f7f7;color: #333333; border: #CCCCCC 1px solid; width: 430px; font-size: 11px; font-family: verdana, arial, helvetica, sans-serif;}
+select {border: 1px solid #CCCCCC; font-size: 11px; font-family: verdana, arial, helvetica, sans-serif;}
+.formButton {background-color: #ece9e3;color: #676767;font-weight: bold;text-align:center;}
+input:focus, textarea:focus{background-color: #ffffff;border: 1px solid #9f9f9f;}
+
+td#date {width: 95%;color: #2f98ff;text-align: right;vertical-align: middle;padding-right: 20px;font-weight: bold;font-size: 95%;}
+.search_block {margin-top: 0px;}
+#notifs_form {display: none;}
+
+/* Nav bar */
+#navigbar {margin: .2em 0 0 1em}
+
+#navbar {background:/*#ece9d8;*/transparent;border-bottom: 0px solid #aca899;padding: 4px 0px 2px 0px;cursor: default;}
+
+.NavMenu {font-family: Verdana,Tahoma,Georgia,sans-serif;font-size: 11px;/*-moz-user-select: none;*/}
+
+.NavMenu .button,
+.NavMenu .button:hover,
+.NavMenu .button-active,
+.NavMenu .button-active:hover {line-height: normal;padding: 2px 8px 2px 8px;/*border: 0px solid transparent;background-color: #cccccc;*/color: #676767;text-decoration: none;font-family: Tahoma,Georgia,sans-serif;font-size: 11px;font-weight: bold;cursor: hand;white-space: nowrap;display: block;position: relative;border-right: 1px solid #d7d7d7;}
+
+.NavMenu .button:hover {/*border-color: #ffffff #ACA899 #ACA899 #ffffff;border: 0px solid #69ade5;*/border-right: 1px solid #d7d7d7;color: #272727;text-decoration: none;background-color: #ffdcaf;}
+
+.NavMenu .button-active,
+.NavMenu .button-active:hover {border-color: #ACA899 #e7e7e7 #ffffff #ACA899;color: #272727;background-color: #ffdcaf;}
+
+.NavMenu .item,
+.NavMenu .item:hover,
+.NavMenu .item-active,
+.NavMenu .item-active:hover {background-color: #ffffff;font-family: Tahoma,Georgia,sans-serif;font-size: 11px;line-height: normal;padding: 3px 16px 4px 10px;color: #676767;border: 0px solid transparent;text-decoration: none;font-weight: bold;cursor: default;white-space: nowrap;display: block;position: relative;}
+
+.NavMenu .item:hover,
+.NavMenu .item-active,
+.NavMenu .item-active:hover {background-color: #efefef;color: #272727;border: 0px solid #316AC5;}
+
+.NavMenu .section {background-color: #ffffff;border: 1px solid #b8b4ae;position: absolute;visibility: hidden;z-index: -1;}
+
+.NavMenu .arrow {position: absolute;top: 7px;right: 8px;border: 0;}
+
+.NavMenu hr{height: 1px;width: 90%;border: 0px none;color: #24237f;background-color: #24237f;}
+
+* html .NavMenu td { position: relative;} /* ie 5.0 fix */
+
+/*NewBB */
+ul.newbb_level1, ul.newbb_level2, ul.newbb_level3 {width: 140px; /* Width of the Dropdownmenu Title and Menu themself */background: #e7e7e7; /* Main Background of the Menu Folder */text-indent: 0;}
+
+li.newbb_folder {border: 1px solid #48b; /* Should be the same color as above */color: #fff; /* Textcolor of the Dropdownmenu Title */background: #48b;}
+
+li.newbb_folder:before {content: "";}
+.newbb_link:hover {color: #fff !important; /* Hover Color of the Links */}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/style.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleAdmin.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleAdmin.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleAdmin.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ at import url(style.css);
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleAdmin.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleAdminMAC.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleAdminMAC.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleAdminMAC.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ at import url(styleAdmin.css);
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleAdminMAC.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleAdminNN.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleAdminNN.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleAdminNN.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+ at import url(styleAdmin.css);
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleAdminNN.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleMAC.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleMAC.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleMAC.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,3 @@
+ at import url(style.css);
+/* Very short Mac-specific additions/changes here (if
+any) */
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleMAC.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleNN.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleNN.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleNN.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,3 @@
+ at import url(style.css);
+/* Very short Gecko-specific additions/changes here (if
+any) */
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/css/styleNN.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/bl.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/bl.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/br.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/br.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/header_logo.jpg
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/header_logo.jpg
___________________________________________________________________
Name: svn:mime-type
+ image/jpeg
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/menubullet.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/menubullet.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/ml.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/ml.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/mr.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/mr.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/tl.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/tl.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/tr.png
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/images/tr.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/js/adminmenu.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/js/adminmenu.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/js/adminmenu.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,88 @@
+/*
+ * DO NOT REMOVE THIS NOTICE
+ *
+ * PROJECT: mygosuMenu
+ * VERSION: 1.4.2
+ * COPYRIGHT: (c) 2003,2004 Cezary Tomczak
+ * LINK: http://gosu.pl/dhtml/mygosumenu.html
+ * LICENSE: BSD (revised)
+ */
+function AdMenu(id) { this.type = "horizontal"; this.position = { "level1": { "top": 0, "left": 0}, "levelX": { "top": 0, "left": 0}
+}
+this.zIndex = { "visible": 1, "hidden": -1
+}
+this.arrow1 = null; this.arrow2 = null; this.browser = { "ie": Boolean(document.body.currentStyle), "ie5": (navigator.appVersion.indexOf("MSIE 5.5") != -1 || navigator.appVersion.indexOf("MSIE 5.0") != -1)
+}; if (!this.browser.ie) { this.browser.ie5 = false;}
+this.init = function() { if (!document.getElementById(this.id)) alert("Element '"+ this.id +"' does not exist in this document. AdMenu cannot be initialized."); if (this.type != "horizontal" && this.type != "vertical") { return alert("AdMenu.init() failed. Unknown menu type: '"+this.type+"'");}
+document.onmousedown = click; if (this.browser.ie && this.browser.ie5) { this.fixWrap();}
+this.fixSections(); this.parse(document.getElementById(this.id).childNodes, this.tree, this.id);}
+this.fixSections = function() { var arr = document.getElementById(this.id).getElementsByTagName("div"); var sections = new Array(); var widths = new Array(); for (var i = 0; i < arr.length; i++) { if (arr[i].className == "section") { sections.push(arr[i]);}
+}
+for (var i = 0; i < sections.length; i++) { widths.push(this.getMaxWidth(sections[i].childNodes));}
+for (var i = 0; i < sections.length; i++) { sections[i].style.width = (widths[i]) + "px";}
+if (self.browser.ie) { for (var i = 0; i < sections.length; i++) { this.setMaxWidth(sections[i].childNodes, widths[i]);}
+}
+}
+this.fixWrap = function() { var elements = document.getElementById(this.id).getElementsByTagName("a"); for (var i = 0; i < elements.length; i++) { if (/item/.test(elements[i].className)) { elements[i].innerHTML = '<div nowrap="nowrap">'+elements[i].innerHTML+'</div>';}
+}
+}
+this.getMaxWidth = function(nodes) { var maxWidth = 0; for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType != 1 || nodes[i].className == "section") { continue;}
+if (nodes[i].offsetWidth > maxWidth) maxWidth = nodes[i].offsetWidth;}
+return maxWidth;}
+this.setMaxWidth = function(nodes, maxWidth) { for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType == 1 && /item/.test(nodes[i].className) && nodes[i].currentStyle) { if (this.browser.ie5) { nodes[i].style.width = (maxWidth) + "px";} else { nodes[i].style.width = (maxWidth - parseInt(nodes[i].currentStyle.paddingLeft) - parseInt(nodes[i].currentStyle.paddingRight)) + "px";}
+}
+}
+}
+this.parse = function(nodes, tree, id) { for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType != 1) { continue }; switch (nodes[i].className) { case "button":
+nodes[i].id = id + "-" + tree.length; tree.push(new Array()); nodes[i].onmouseover = buttonOver; nodes[i].onclick = buttonClick; break; case "item":
+nodes[i].id = id + "-" + tree.length; tree.push(new Array()); nodes[i].onmouseover = itemOver; nodes[i].onmouseout = itemOut; nodes[i].onclick = itemClick; break; case "section":
+nodes[i].id = id + "-" + (tree.length - 1) + "-section"; var box1 = document.getElementById(id + "-" + (tree.length - 1)); var box2 = document.getElementById(nodes[i].id); var el = new Element(box1.id); if (el.level == 1) { if (this.type == "horizontal") { box2.style.top = (box1.offsetTop + box1.offsetHeight + this.position.level1.top) + "px"; if (this.browser.ie5) { box2.style.left = (this.position.level1.left) + "px";} else { box2.style.left = (box1.offsetLeft + this.position.level1.left) + "px";}
+} else if (this.type == "vertical") { box2.style.top = (box1.offsetTop + this.position.level1.top) + "px"; if (this.browser.ie5) { box2.style.left = (box1.offsetWidth + this.position.level1.left) + "px";} else { box2.style.left = (box1.offsetLeft + box1.offsetWidth + this.position.level1.left) + "px";}
+}
+} else { box2.style.top = (box1.offsetTop + this.position.levelX.top) + "px"; box2.style.left = (box1.offsetLeft + box1.offsetWidth + this.position.levelX.left) + "px";}
+break; case "arrow":
+nodes[i].id = id + "-" + (tree.length - 1) + "-arrow"; break;}
+if (nodes[i].childNodes) { if (nodes[i].className == "section") { this.parse(nodes[i].childNodes, tree[tree.length - 1], id + "-" + (tree.length - 1));} else { this.parse(nodes[i].childNodes, tree, id);}
+}
+}
+}
+this.hideAll = function() { for (var i = this.visible.length - 1; i >= 0; i--) { this.hide(this.visible[i]);}
+}
+this.hideHigherOrEqualLevels = function(n) { for (var i = this.visible.length - 1; i >= 0; i--) { var el = new Element(this.visible[i]); if (el.level >= n) { this.hide(el.id);} else { return;}
+}
+}
+this.hide = function(id) { var el = new Element(id); document.getElementById(id).className = (el.level == 1 ? "button" : "item"); if (el.level > 1 && this.arrow2) { document.getElementById(id + "-arrow").src = this.arrow1;}
+document.getElementById(id + "-section").style.visibility = "hidden"; document.getElementById(id + "-section").style.zIndex = this.zIndex.hidden; if (this.visible.contains(id)) { if (this.visible.getLast() == id) { this.visible.pop();} else { throw "AdMenu.hide("+id+") failed, trying to hide element that is not deepest visible element";}
+} else { throw "AdMenu.hide("+id+") failed, cannot hide element that is not visible";}
+}
+this.show = function(id) { var el = new Element(id); document.getElementById(id).className = (el.level == 1 ? "button-active" : "item-active"); if (el.level > 1 && this.arrow2) { document.getElementById(id + "-arrow").src = this.arrow2;}
+document.getElementById(id + "-section").style.visibility = "visible"; document.getElementById(id + "-section").style.zIndex = this.zIndex.visible; this.visible.push(id);}
+function click(e) { var el; if (e) { el = e.target.tagName ? e.target : e.target.parentNode;} else { el = window.event.srcElement; if (el.parentNode && /item/.test(el.parentNode.className)) { el = el.parentNode;}
+}
+if (!self.visible.length) { return }; if (!el.onclick) { self.hideAll();}
+}
+function buttonOver() { if (!self.visible.length) { return;}
+if (self.visible.contains(this.id)) { return }; self.hideAll(); var el = new Element(this.id); if (el.hasChilds()) { self.show(this.id);}
+}
+function buttonClick() { this.blur(); if (self.visible.length) { self.hideAll();} else { var el = new Element(this.id); if (el.hasChilds()) { self.show(this.id);}
+}
+}
+function itemOver() { var el = new Element(this.id); self.hideHigherOrEqualLevels(el.level); if (el.hasChilds()) { self.show(this.id);}
+}
+function itemOut() { var el = new Element(this.id); if (!el.hasChilds()) { document.getElementById(this.id).className = "item";}
+}
+function itemClick() { this.blur(); var el = new Element(this.id); self.hideHigherOrEqualLevels(el.level); if (el.hasChilds()) { self.show(this.id);}
+}
+function Element(id) { this.getLevel = function() { var s = this.id.substr(this.menu.id.length); return s.substrCount("-");}
+this.hasChilds = function() { return Boolean(document.getElementById(this.id + "-section"));}
+if (!id) { throw "AdMenu.Element(id) failed, id cannot be empty";}
+this.menu = self; this.id = id; this.level = this.getLevel();}
+this.id = id; var self = this; this.tree = new Array(); this.visible = new Array();}
+if (typeof Array.prototype.contains == "undefined") { Array.prototype.contains = function(s) { for (var i = 0; i < this.length; i++) { if (this[i] === s) { return true;}
+}
+return false;}
+}
+if (typeof Array.prototype.getLast == "undefined") { Array.prototype.getLast = function() { return this[this.length-1];}
+}
+if (typeof String.prototype.substrCount == "undefined") { String.prototype.substrCount = function(s) { return this.split(s).length - 1;}
+}
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/js/adminmenu_src.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/js/adminmenu_src.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/js/adminmenu_src.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,322 @@
+/*
+ * DO NOT REMOVE THIS NOTICE
+ *
+ * PROJECT: mygosuMenu
+ * VERSION: 1.4.2
+ * COPYRIGHT: (c) 2003,2004 Cezary Tomczak
+ * LINK: http://gosu.pl/dhtml/mygosumenu.html
+ * LICENSE: BSD (revised)
+ */
+
+function AdMenu(id) {
+
+ this.type = "horizontal";
+ this.position = {
+ "level1": { "top": 0, "left": 0},
+ "levelX": { "top": 0, "left": 0}
+ }
+ this.zIndex = {
+ "visible": 1,
+ "hidden": -1
+ }
+ this.arrow1 = null;
+ this.arrow2 = null;
+
+ // Browser detection
+ this.browser = {
+ "ie": Boolean(document.body.currentStyle),
+ "ie5": (navigator.appVersion.indexOf("MSIE 5.5") != -1 || navigator.appVersion.indexOf("MSIE 5.0") != -1)
+ };
+ if (!this.browser.ie) { this.browser.ie5 = false; }
+
+ /* Initialize the menu */
+ this.init = function() {
+ if (!document.getElementById(this.id)) alert("Element '"+ this.id +"' does not exist in this document. AdMenu cannot be initialized.");
+ if (this.type != "horizontal" && this.type != "vertical") { return alert("AdMenu.init() failed. Unknown menu type: '"+this.type+"'"); }
+ document.onmousedown = click;
+ if (this.browser.ie && this.browser.ie5) { this.fixWrap(); }
+ this.fixSections();
+ this.parse(document.getElementById(this.id).childNodes, this.tree, this.id);
+ }
+
+ /* Search for .section elements and set width for them */
+ this.fixSections = function() {
+ var arr = document.getElementById(this.id).getElementsByTagName("div");
+ var sections = new Array();
+ var widths = new Array();
+
+ for (var i = 0; i < arr.length; i++) {
+ if (arr[i].className == "section") {
+ sections.push(arr[i]);
+ }
+ }
+ for (var i = 0; i < sections.length; i++) {
+ widths.push(this.getMaxWidth(sections[i].childNodes));
+ }
+ for (var i = 0; i < sections.length; i++) {
+ sections[i].style.width = (widths[i]) + "px";
+ }
+ if (self.browser.ie) {
+ for (var i = 0; i < sections.length; i++) {
+ this.setMaxWidth(sections[i].childNodes, widths[i]);
+ }
+ }
+ }
+
+ this.fixWrap = function() {
+ var elements = document.getElementById(this.id).getElementsByTagName("a");
+ for (var i = 0; i < elements.length; i++) {
+ if (/item/.test(elements[i].className)) {
+ elements[i].innerHTML = '<div nowrap="nowrap">'+elements[i].innerHTML+'</div>';
+ }
+ }
+ }
+
+ /* Search for an element with highest width, return that width */
+ this.getMaxWidth = function(nodes) {
+ var maxWidth = 0;
+ for (var i = 0; i < nodes.length; i++) {
+ if (nodes[i].nodeType != 1 || nodes[i].className == "section") { continue; }
+ if (nodes[i].offsetWidth > maxWidth) maxWidth = nodes[i].offsetWidth;
+ }
+ return maxWidth;
+ }
+
+ /* Set width for item elements */
+ this.setMaxWidth = function(nodes, maxWidth) {
+ for (var i = 0; i < nodes.length; i++) {
+ if (nodes[i].nodeType == 1 && /item/.test(nodes[i].className) && nodes[i].currentStyle) {
+ if (this.browser.ie5) {
+ nodes[i].style.width = (maxWidth) + "px";
+ } else {
+ nodes[i].style.width = (maxWidth - parseInt(nodes[i].currentStyle.paddingLeft) - parseInt(nodes[i].currentStyle.paddingRight)) + "px";
+ }
+ }
+ }
+ }
+
+ /* Parse menu structure, create events, position elements */
+ this.parse = function(nodes, tree, id) {
+ for (var i = 0; i < nodes.length; i++) {
+ if (nodes[i].nodeType != 1) { continue };
+ switch (nodes[i].className) {
+ case "button":
+ nodes[i].id = id + "-" + tree.length;
+ tree.push(new Array());
+ nodes[i].onmouseover = buttonOver;
+ nodes[i].onclick = buttonClick;
+ break;
+ case "item":
+ nodes[i].id = id + "-" + tree.length;
+ tree.push(new Array());
+ nodes[i].onmouseover = itemOver;
+ nodes[i].onmouseout = itemOut;
+ nodes[i].onclick = itemClick;
+ break;
+ case "section":
+ nodes[i].id = id + "-" + (tree.length - 1) + "-section";
+ var box1 = document.getElementById(id + "-" + (tree.length - 1));
+ var box2 = document.getElementById(nodes[i].id);
+ var el = new Element(box1.id);
+ if (el.level == 1) {
+ if (this.type == "horizontal") {
+ box2.style.top = (box1.offsetTop + box1.offsetHeight + this.position.level1.top) + "px";
+ if (this.browser.ie5) {
+ box2.style.left = (this.position.level1.left) + "px";
+ } else {
+ box2.style.left = (box1.offsetLeft + this.position.level1.left) + "px";
+ }
+ } else if (this.type == "vertical") {
+ box2.style.top = (box1.offsetTop + this.position.level1.top) + "px";
+ if (this.browser.ie5) {
+ box2.style.left = (box1.offsetWidth + this.position.level1.left) + "px";
+ } else {
+ box2.style.left = (box1.offsetLeft + box1.offsetWidth + this.position.level1.left) + "px";
+ }
+ }
+ } else {
+ box2.style.top = (box1.offsetTop + this.position.levelX.top) + "px";
+ box2.style.left = (box1.offsetLeft + box1.offsetWidth + this.position.levelX.left) + "px";
+ }
+ break;
+ case "arrow":
+ nodes[i].id = id + "-" + (tree.length - 1) + "-arrow";
+ break;
+ }
+ if (nodes[i].childNodes) {
+ if (nodes[i].className == "section") {
+ this.parse(nodes[i].childNodes, tree[tree.length - 1], id + "-" + (tree.length - 1));
+ } else {
+ this.parse(nodes[i].childNodes, tree, id);
+ }
+ }
+ }
+ }
+
+ /* Hide all sections */
+ this.hideAll = function() {
+ for (var i = this.visible.length - 1; i >= 0; i--) {
+ this.hide(this.visible[i]);
+ }
+ }
+
+ /* Hide higher or equal levels */
+ this.hideHigherOrEqualLevels = function(n) {
+ for (var i = this.visible.length - 1; i >= 0; i--) {
+ var el = new Element(this.visible[i]);
+ if (el.level >= n) {
+ this.hide(el.id);
+ } else {
+ return;
+ }
+ }
+ }
+
+ /* Hide a section */
+ this.hide = function(id) {
+ var el = new Element(id);
+ document.getElementById(id).className = (el.level == 1 ? "button" : "item");
+ if (el.level > 1 && this.arrow2) {
+ document.getElementById(id + "-arrow").src = this.arrow1;
+ }
+ document.getElementById(id + "-section").style.visibility = "hidden";
+ document.getElementById(id + "-section").style.zIndex = this.zIndex.hidden;
+ if (this.visible.contains(id)) {
+ if (this.visible.getLast() == id) {
+ this.visible.pop();
+ } else {
+ throw "AdMenu.hide("+id+") failed, trying to hide element that is not deepest visible element";
+ }
+ } else {
+ throw "AdMenu.hide("+id+") failed, cannot hide element that is not visible";
+ }
+ }
+
+ /* Show a section */
+ this.show = function(id) {
+ var el = new Element(id);
+ document.getElementById(id).className = (el.level == 1 ? "button-active" : "item-active");
+ if (el.level > 1 && this.arrow2) {
+ document.getElementById(id + "-arrow").src = this.arrow2;
+ }
+ document.getElementById(id + "-section").style.visibility = "visible";
+ document.getElementById(id + "-section").style.zIndex = this.zIndex.visible;
+ this.visible.push(id);
+ }
+
+ /* event, document.onmousedown */
+ function click(e) {
+ var el;
+ if (e) {
+ el = e.target.tagName ? e.target : e.target.parentNode;
+ } else {
+ el = window.event.srcElement;
+ if (el.parentNode && /item/.test(el.parentNode.className)) {
+ el = el.parentNode;
+ }
+ }
+ if (!self.visible.length) { return };
+ if (!el.onclick) { self.hideAll(); }
+ }
+
+ /* event, button.onmouseover */
+ function buttonOver() {
+ if (!self.visible.length) { return; }
+ if (self.visible.contains(this.id)) { return };
+ self.hideAll();
+ var el = new Element(this.id);
+ if (el.hasChilds()) {
+ self.show(this.id);
+ }
+ }
+
+ /* event, button.onclick */
+ function buttonClick() {
+ this.blur();
+ if (self.visible.length) {
+ self.hideAll();
+ } else {
+ var el = new Element(this.id);
+ if (el.hasChilds()) {
+ self.show(this.id);
+ }
+ }
+ }
+
+ /* event, item.onmouseover */
+ function itemOver() {
+ var el = new Element(this.id);
+ self.hideHigherOrEqualLevels(el.level);
+ if (el.hasChilds()) {
+ self.show(this.id);
+ }
+ }
+
+ /* event, item.onmouseout */
+ function itemOut() {
+ var el = new Element(this.id);
+ if (!el.hasChilds()) {
+ document.getElementById(this.id).className = "item";
+ }
+ }
+
+ /* event, item.onclick */
+ function itemClick() {
+ this.blur();
+ var el = new Element(this.id);
+ self.hideHigherOrEqualLevels(el.level);
+ if (el.hasChilds()) {
+ self.show(this.id);
+ }
+ }
+
+ function Element(id) {
+
+ /* Get Level of given id
+ * Examples: menu-1 (1 level), menu-1-4 (2 level) */
+ this.getLevel = function() {
+ var s = this.id.substr(this.menu.id.length);
+ return s.substrCount("-");
+ }
+
+ /* Check whether an element has a sub-section */
+ this.hasChilds = function() {
+ return Boolean(document.getElementById(this.id + "-section"));
+ }
+
+ if (!id) { throw "AdMenu.Element(id) failed, id cannot be empty"; }
+ this.menu = self;
+ this.id = id;
+ this.level = this.getLevel();
+ }
+
+ this.id = id;
+ var self = this;
+
+ this.tree = new Array(); /* Multidimensional array, structure of the menu */
+ this.visible = new Array(); /* Example: Array("menu-0", "menu-0-4", ...), succession is important ! */
+}
+
+/* Check whether array contains given string */
+if (typeof Array.prototype.contains == "undefined") {
+ Array.prototype.contains = function(s) {
+ for (var i = 0; i < this.length; i++) {
+ if (this[i] === s) { return true; }
+ }
+ return false;
+ }
+}
+
+/* Get the last element from the array */
+if (typeof Array.prototype.getLast == "undefined") {
+ Array.prototype.getLast = function() {
+ return this[this.length-1];
+ }
+}
+
+/* Counts the number of substring occurrences */
+if (typeof String.prototype.substrCount == "undefined") {
+ String.prototype.substrCount = function(s) {
+ return this.split(s).length - 1;
+ }
+}
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/js/ie5.js
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/js/ie5.js 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/js/ie5.js 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,82 @@
+// +----------------------------------------------------------------+
+// | Array functions that are missing in IE 5.0 |
+// | Author: Cezary Tomczak [www.gosu.pl] |
+// | Free for any use as long as all copyright messages are intact. |
+// +----------------------------------------------------------------+
+
+// Removes the last element from an array and returns that element.
+if (!Array.prototype.pop) {
+ Array.prototype.pop = function() {
+ var last;
+ if (this.length) {
+ last = this[this.length - 1];
+ this.length -= 1;
+ }
+ return last;
+ };
+}
+
+// Adds one or more elements to the end of an array and returns the new length of the array.
+if (!Array.prototype.push) {
+ Array.prototype.push = function() {
+ for (var i = 0; i < arguments.length; ++i) {
+ this[this.length] = arguments[i];
+ }
+ return this.length;
+ };
+}
+
+// Removes the first element from an array and returns that element.
+if (!Array.prototype.shift) {
+ Array.prototype.shift = function() {
+ var first;
+ if (this.length) {
+ first = this[0];
+ for (var i = 0; i < this.length - 1; ++i) {
+ this[i] = this[i + 1];
+ }
+ this.length -= 1;
+ }
+ return first;
+ };
+}
+
+// Adds one or more elements to the front of an array and returns the new length of the array.
+if (!Array.prototype.unshift) {
+ Array.prototype.unshift = function() {
+ if (arguments.length) {
+ var i, len = arguments.length;
+ for (i = this.length + len - 1; i >= len; --i) {
+ this[i] = this[i - len];
+ }
+ for (i = 0; i < len; ++i) {
+ this[i] = arguments[i];
+ }
+ }
+ return this.length;
+ };
+}
+
+// Adds and/or removes elements from an array.
+if (!Array.prototype.splice) {
+ Array.prototype.splice = function(index, howMany) {
+ var elements = [], removed = [], i;
+ for (i = 2; i < arguments.length; ++i) {
+ elements.push(arguments[i]);
+ }
+ for (i = index; (i < index + howMany) && (i < this.length); ++i) {
+ removed.push(this[i]);
+ }
+ for (i = index + howMany; i < this.length; ++i) {
+ this[i - howMany] = this[i];
+ }
+ this.length -= removed.length;
+ for (i = this.length + elements.length - 1; i >= index + elements.length; --i) {
+ this[i] = this[i - elements.length];
+ }
+ for (i = 0; i < elements.length; ++i) {
+ this[index + i] = elements[i];
+ }
+ return removed;
+ };
+}
\ No newline at end of file
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/language/english/admin.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/language/english/admin.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/language/english/admin.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,25 @@
+<?php
+define('_AD_NAV_ACTIONS', "Actions");
+define('_AD_NAV_CPHOME', "Admin index");
+define('_AD_NAV_SITEHOME', "Go to homepage");
+define('_AD_NAV_XOOPSORG', "Xoops.org news");
+define('_AD_NAV_LOGOUT', "Logout");
+define('_AD_NAV_PREFS', "Preferences");
+define('_AD_NAV_GENERAL', "General Settings");
+define('_AD_NAV_USERSETTINGS', "User Info Settings");
+define('_AD_NAV_METAFOOTER', "Meta Tags and Footer");
+define('_AD_NAV_CENSOR', "Word Censoring Options");
+define('_AD_NAV_SEARCH', "Search Options");
+define('_AD_NAV_MAILER', "Mail Setup");
+define('_AD_NAV_MODULES', "Modules");
+define('_AD_NAV_MODADMIN', "Administration");
+define('_AD_NAV_BLOCKS', "Blocks");
+define('_AD_NAV_BLVIS', "List visible blocks");
+define('_AD_NAV_BLHID', "List hidden blocks");
+define('_AD_NAV_BLALL', "List all blocks");
+define('_AD_NAV_BLNEW', "Add new block");
+define('_AD_NAV_USERS', "Users");
+define('_AD_NAV_MISC', "Misc.Tools");
+
+define('_AD_NAV_MODHOME', "Go to Module");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/language/english/admin.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/language/english/main.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/language/english/main.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/language/english/main.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,9 @@
+<?php
+define("_MA_NAV_ACTIONS", "User Actions");
+define("_MA_NAV_VIEWACCOUNT", "View Account");
+define("_MA_NAV_EDITACCOUNT", "Edit Account");
+define("_MA_NAV_NOTIFICATIONS", "Notifications");
+define("_MA_NAV_LOGOUT", "Logout");
+define("_MA_NAV_ADMINISTRATION", "Administration");
+define("_MA_NAV_WELCOME", "Welcome ");
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/language/english/main.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/navigation/theme_adminnav.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/navigation/theme_adminnav.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/navigation/theme_adminnav.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,100 @@
+ <!-- ADMIN NAVIGATION BAR START -->
+ <div id="navbar">
+ <table cellspacing="0" cellpadding="0" id="menu1" class="NavMenu">
+ <tr>
+ <td>
+ <a class="button" href="javascript:void(0)"><{$smarty.const._AD_NAV_ACTIONS}></a>
+ <div class="section">
+ <a class="item" href="<{$xoops_url}>/admin.php"><{$smarty.const._AD_NAV_CPHOME}></a>
+ <a class="item" href="<{$xoops_url}>/admin.php?xoopsorgnews=1"><{$smarty.const._AD_NAV_XOOPSORG}></a>
+ <a class="item" href="<{$xoops_url}>/"><{$smarty.const._AD_NAV_SITEHOME}></a>
+ <a class="item" href="<{$xoops_url}>/user.php?op=logout"><{$smarty.const._AD_NAV_LOGOUT}></a>
+ </div>
+ </td>
+ <{if isset($systemmenu.links.3)}>
+ <td>
+ <a class="button" href="javascript:void(0)"><{$smarty.const._AD_NAV_PREFS}></a>
+ <div class="section">
+ <{foreach item=module from=$systemmenu.links.3.sublinks}>
+ <a class="item" href="javascript:void(0)"><{$module.name}><img class="arrow" src="<{$xoops_imageurl}>images/menuarrow1.gif" width="4" height="7" alt="" /></a>
+ <div class="section">
+ <{foreach item=cat from=$module.cats}>
+ <a class="item" href='<{$cat.link}>'><{$cat.title}></a>
+ <{/foreach}>
+ </div>
+ <{/foreach}>
+ </div>
+ </td>
+ <{/if}>
+ <{if isset($adminmenu)}>
+ <td>
+ <a class="button" href="javascript:void(0)"><{$smarty.const._AD_NAV_MODULES}></a>
+ <div class="section">
+ <{foreach item=module from=$adminmenu key=counter}>
+ <a class="item" href="javascript:void(0)"><{$module.name}><img class="arrow" src="<{$xoops_imageurl}>images/menuarrow1.gif" width="4" height="7" alt="" /></a>
+ <div class="section">
+ <{foreach item=menuitem from=$module.links}>
+ <a class="item" href="<{$menuitem.link}>"><{$menuitem.title}></a>
+ <{/foreach}>
+ </div>
+ <{/foreach}>
+ <{if isset($systemmenu.links.4)}>
+ <hr />
+ <center><a class="item" href="<{$systemmenu.links.4.link}>"><{$smarty.const._AD_NAV_MODADMIN}></a></center>
+ <{/if}>
+ </div>
+ </td>
+ <{/if}>
+ <{if isset($systemmenu.links.5)}>
+ <td>
+ <a class="button" href="javascript:void(0)"><{$smarty.const._AD_NAV_BLOCKS}></a>
+ <div class="section">
+ <a class="item" href='<{$xoops_url}>/modules/system/admin.php?fct=blocksadmin&selmod=-1&selgrp=2&selvis=2'><{$smarty.const._AD_NAV_BLALL}></a>
+ </div>
+ </td>
+ <{/if}>
+ <{if isset($systemmenu.links.8) || isset($systemmenu.links.11) || isset($systemmenu.links.1)}>
+ <td>
+ <a class="button" href="javascript:void(0)"><{$smarty.const._AD_NAV_USERS}></a>
+ <div class="section">
+ <{if isset($systemmenu.links.8)}>
+ <a class="item" href='<{$systemmenu.links.8.link}>'><{$systemmenu.links.8.title}></a>
+ <{/if}>
+ <{if isset($systemmenu.links.11)}>
+ <a class="item" href='<{$systemmenu.links.11.link}>'><{$systemmenu.links.11.title}></a>
+ <{/if}>
+ <{if isset($systemmenu.links.1)}>
+ <a class="item" href='<{$systemmenu.links.1.link}>'><{$systemmenu.links.1.title}></a>
+ <{/if}>
+ </div>
+ </td>
+ <{/if}>
+ <td>
+ <a class="button" href="javascript:void(0)"><{$smarty.const._AD_NAV_MISC}></a>
+ <div class="section">
+ <{if isset($systemmenu.links.13)}>
+ <a class="item" href='<{$systemmenu.links.13.link}>'><{$systemmenu.links.13.title}></a>
+ <{/if}>
+ <{if isset($systemmenu.links.1)}>
+ <a class="item" href='<{$systemmenu.links.9.link}>'><{$systemmenu.links.9.title}></a>
+ <{/if}>
+ <{if isset($systemmenu.links.12)}>
+ <a class="item" href='<{$systemmenu.links.12.link}>'><{$systemmenu.links.12.title}></a>
+ <{/if}>
+ <{if isset($systemmenu.links.10)}>
+ <a class="item" href='<{$systemmenu.links.10.link}>'><{$systemmenu.links.10.title}></a>
+ <{/if}>
+ <{if isset($systemmenu.links.15)}>
+ <a class="item" href='<{$systemmenu.links.15.link}>'><{$systemmenu.links.15.title}></a>
+ <{/if}>
+ <{if isset($systemmenu.links.14)}>
+ <a class="item" href='<{$systemmenu.links.14.link}>'><{$systemmenu.links.14.title}></a>
+ <{/if}>
+ </div>
+ </td>
+ <td id="date">
+ <{$xoops_uname}>@<{$xoops_sitename}>
+ </td>
+ </tr>
+ </table>
+ </div>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/navigation/theme_adminnav.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/navigation/theme_moduleadmin.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/navigation/theme_moduleadmin.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/navigation/theme_moduleadmin.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,26 @@
+<div id='buttontop'>
+ <table style="width: 100%; padding: 0; " cellspacing="0">
+ <tr>
+ <td style="width: 70%; font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;">
+ <a href="../index.php"><{$smarty.const._AD_NAV_MODHOME}></a>
+ </td>
+ <td style="width: 30%; font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;">
+ <b><{$modulemenu.name}> <{$smarty.const._AD_NAV_MODADMIN}></b> <{$modulemenu.breadcrumb}>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div id='buttonbar'>
+ <ul>
+ <{foreach item=link from=$modulemenu.links key=id}>
+ <{if $id == $modulemenu.current}>
+ <li class='current'>
+ <{else}>
+ <li>
+ <{/if}>
+ <a href='<{$link.link}>'><span><{$link.title}></span></a>
+ </li>
+ <{/foreach}>
+ </ul>
+ </div>
+ <br style="clear:both;" />
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/navigation/theme_moduleadmin.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/navigation/theme_usernav.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/navigation/theme_usernav.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/navigation/theme_usernav.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,33 @@
+ <!-- USER NAVIGATION BAR START -->
+ <div id="navbar">
+ <table cellspacing="0" cellpadding="0" id="menu1" class="NavMenu">
+ <tr>
+ <{if $xoops_isuser == 1}>
+ <td>
+ <a class="button" href="javascript:void(0)"><{$smarty.const._MA_NAV_ACTIONS}></a>
+ <div class="section">
+ <a class="item" href="<{$xoops_url}>/user.php"><{$smarty.const._MA_NAV_VIEWACCOUNT}></a>
+ <a class="item" href="<{$xoops_url}>/edituser.php"><{$smarty.const._MA_NAV_EDITACCOUNT}></a>
+ <a class="item" href="<{$xoops_url}>/notifications.php"><{$smarty.const._MA_NAV_NOTIFICATIONS}></a>
+ <a class="item" href="<{$xoops_url}>/user.php?op=logout"><{$smarty.const._MA_NAV_LOGOUT}></a>
+ <{if $xoops_isadmin}>
+ <a class="item" href="<{$xoops_url}>/admin.php"><{$smarty.const._MA_NAV_ADMINISTRATION}></a>
+ <{/if}>
+ </div>
+ </td>
+ <{/if}>
+ <td><a class="button" href="http://www.link.it">First Link</a></td>
+ <td><a class="button" href="http://www.link.it">Second Link</a></td>
+ <td><a class="button" href="http://www.link.it">Third Link</a></td>
+ <td><a class="button" href="http://www.link.it">Fourth Link</a></td>
+ <td id="date">
+ <{if $xoops_isuser == 1}>
+ <{$smarty.const._MA_NAV_WELCOME}><{$xoops_uname}>!
+ <{else}>
+ <{$smarty.now|date_format:"%A, %e %B %Y"}>
+ <{/if}>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <!-- USER NAVIGATION BAR END -->
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/navigation/theme_usernav.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/theme.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/theme.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/theme.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,153 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
+
+<head>
+ <{$xoops_module_header}>
+ <meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
+ <meta http-equiv="content-language" content="<{$xoops_langcode}>" />
+ <meta name="robots" content="<{$xoops_meta_robots}>" />
+ <meta name="keywords" content="<{$xoops_pagetitle}>, <{$xoops_meta_keywords}>" />
+ <meta name="description" content="<{$xoops_pagetitle}>, <{$xoops_meta_description}>" />
+ <meta name="rating" content="<{$xoops_meta_rating}>" />
+ <meta name="author" content="<{$xoops_meta_author}>" />
+ <meta name="copyright" content="<{$xoops_meta_copyright}>" />
+ <meta name="generator" content="XOOPS" />
+ <title><{$xoops_sitename}> - <{$xoops_slogan}> - <{$xoops_pagetitle}></title>
+ <link href="<{$xoops_url}>/favicon.ico" rel="SHORTCUT ICON" />
+ <link rel="stylesheet" type="text/css" media="all" href="<{$xoops_url}>/xoops.css" />
+ <link rel="stylesheet" type="text/css" media="all" href="<{$xoops_themecss}>" />
+ <script type="text/javascript">
+ <!--
+ <{$xoops_js}>
+ //-->
+ </script>
+ <script type="text/javascript" src="<{$xoops_imageurl}>js/adminmenu.js"></script>
+ <script type="text/javascript" src="<{$xoops_imageurl}>js/ie5.js"></script>
+ <script type="text/javascript">
+
+ function toggle(notifs_form)
+ {
+ obj=document.getElementById(notifs_form);
+ obj.style.display=!(obj.style.display=="block")? "block" : "none";
+ }
+
+ function swapimage(swap)
+ {
+ img_plus="<{$xoops_imageurl}>images/plus.gif";
+ img_minus="<{$xoops_imageurl}>images/minus.gif";
+ obj=document.getElementById(swap);
+ obj.src=!(obj.src==img_minus)? img_minus : img_plus;
+ }
+
+ </script>
+ <style type="text/css" media="screen">
+ <{if $xoops_showrblock == 1}>
+ td#centercolumn { padding: 20px 10px 10px 10px; }
+ <{else}>
+ td#centercolumn { padding: 20px 40px 10px 20px; }
+ <{/if}>
+ </style>
+</head>
+
+<body>
+<div id="page-ml">
+ <div id="page-mr">
+
+ <div id="header-l"><div id="header-r">
+ <div class="description">
+ <a href="<{$xoops_url}>"><img src="<{$xoops_imageurl}>images/header_logo.jpg" alt="" /></a>
+ </div>
+ <div id="navigbar">
+ <{include file="$xoops_theme/navigation/theme_usernav.html"}>
+ </div>
+ </div></div>
+
+ <div id="content">
+ <table>
+ <tr>
+
+ <{if $xoops_showlblock == 1}>
+ <td id="leftcolumn">
+
+ <!-- Start left blocks loop -->
+ <{foreach item=block from=$xoops_lblocks}>
+ <{include file="$xoops_theme/blocks/theme_blockleft.html"}>
+ <{/foreach}>
+ <!-- End left blocks loop -->
+
+ </td>
+ <{/if}>
+
+ <td id="centercolumn">
+
+ <!-- Display center blocks if any -->
+ <{if $xoops_showcblock == 1}>
+ <table>
+ <tr>
+ <td id="centerCcolumn" colspan="2">
+
+ <!-- Start center-center blocks loop -->
+ <{foreach item=block from=$xoops_ccblocks}>
+ <{include file="$xoops_theme/blocks/theme_blockcenter_c.html"}>
+ <{/foreach}>
+ <!-- End center-center blocks loop -->
+
+ </td>
+ </tr>
+ <tr>
+ <td id="centerLcolumn">
+
+ <!-- Start center-left blocks loop -->
+ <{foreach item=block from=$xoops_clblocks}>
+ <{include file="$xoops_theme/blocks/theme_blockcenter_l.html"}>
+ <{/foreach}>
+ <!-- End center-left blocks loop -->
+
+ </td><td id="centerRcolumn">
+
+ <!-- Start center-right blocks loop -->
+ <{foreach item=block from=$xoops_crblocks}>
+ <{include file="$xoops_theme/blocks/theme_blockcenter_r.html"}>
+ <{/foreach}>
+ <!-- End center-right blocks loop -->
+
+ </td>
+ </tr>
+ </table>
+ <{/if}>
+ <!-- End display center blocks -->
+
+ <{$xoops_contents}>
+ </td>
+
+ <{if $xoops_showrblock == 1}>
+ <td id="rightcolumn">
+
+ <!-- Start right blocks loop -->
+ <{foreach item=block from=$xoops_rblocks}>
+ <{include file="$xoops_theme/blocks/theme_blockright.html"}>
+ <{/foreach}>
+ <!-- End right blocks loop -->
+
+ </td>
+ <{/if}>
+
+ </tr>
+ </table>
+ </div>
+
+ <div id="footer-l"><div id="footer-r">
+ <p><{$xoops_footer}></p>
+ </div></div>
+
+</div></div>
+</body>
+<script type="text/javascript">
+ var menu1 = new AdMenu("menu1");
+ menu1.position.level1.top = 1;
+ menu1.position.level1.left = 0;
+ menu1.position.levelX.top = 0;
+ menu1.position.levelX.left = 0;
+ menu1.init();
+</script>
+</html>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/theme.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/themeadmin.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/themeadmin.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/themeadmin.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,154 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
+
+<head>
+ <{$xoops_module_header}>
+ <meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
+ <meta http-equiv="content-language" content="<{$xoops_langcode}>" />
+ <meta name="robots" content="<{$xoops_meta_robots}>" />
+ <meta name="keywords" content="<{$xoops_pagetitle}>, <{$xoops_meta_keywords}>" />
+ <meta name="description" content="<{$xoops_pagetitle}>, <{$xoops_meta_description}>" />
+ <meta name="rating" content="<{$xoops_meta_rating}>" />
+ <meta name="author" content="<{$xoops_meta_author}>" />
+ <meta name="copyright" content="<{$xoops_meta_copyright}>" />
+ <meta name="generator" content="XOOPS" />
+ <title><{$xoops_sitename}> - <{$xoops_slogan}> - <{$xoops_pagetitle}></title>
+ <link href="<{$xoops_url}>/favicon.ico" rel="SHORTCUT ICON" />
+ <link rel="stylesheet" type="text/css" media="all" href="<{$xoops_url}>/xoops.css" />
+ <link rel="stylesheet" type="text/css" media="all" href="<{$xoops_themecss}>" />
+ <script type="text/javascript">
+ <!--
+ <{$xoops_js}>
+ //-->
+ </script>
+ <script type="text/javascript" src="<{$xoops_imageurl}>js/adminmenu.js"></script>
+ <script type="text/javascript" src="<{$xoops_imageurl}>js/ie5.js"></script>
+ <script type="text/javascript">
+
+ function toggle(notifs_form)
+ {
+ obj=document.getElementById(notifs_form);
+ obj.style.display=!(obj.style.display=="block")? "block" : "none";
+ }
+
+ function swapimage(swap)
+ {
+ img_plus="<{$xoops_imageurl}>images/plus.gif";
+ img_minus="<{$xoops_imageurl}>images/minus.gif";
+ obj=document.getElementById(swap);
+ obj.src=!(obj.src==img_minus)? img_minus : img_plus;
+ }
+
+ </script>
+ <style type="text/css" media="screen">
+ <{if $xoops_showrblock == 1}>
+ td#centercolumn { padding: 20px 10px 10px 10px; }
+ <{else}>
+ td#centercolumn { padding: 20px 40px 10px 20px; }
+ <{/if}>
+ </style>
+</head>
+
+<body>
+<div id="page-ml">
+ <div id="page-mr">
+
+ <div id="header-l"><div id="header-r">
+ <div id="admindesc">
+ <{$xoops_sitename}>
+ </div>
+ <div id="admindesc_small"><{$smarty.const._AD_NAV_MODADMIN}></div>
+ <div id="navigbar">
+ <{include file="$xoops_theme/navigation/theme_adminnav.html"}>
+ </div>
+ </div></div>
+
+ <div id=content>
+ <table>
+ <tr>
+
+ <{if $xoops_showlblock == 1}>
+ <td id="leftcolumn">
+
+ <!-- Start left blocks loop -->
+ <{foreach item=block from=$xoops_lblocks}>
+ <{include file="$xoops_theme/blocks/theme_blockleft.html"}>
+ <{/foreach}>
+ <!-- End left blocks loop -->
+
+ </td>
+ <{/if}>
+
+ <td id="centercolumn">
+
+ <!-- Display center blocks if any -->
+ <{if $xoops_showcblock == 1}>
+ <table>
+ <tr>
+ <td id="centerCcolumn" colspan="2">
+
+ <!-- Start center-center blocks loop -->
+ <{foreach item=block from=$xoops_ccblocks}>
+ <{include file="$xoops_theme/blocks/theme_blockcenter_c.html"}>
+ <{/foreach}>
+ <!-- End center-center blocks loop -->
+
+ </td>
+ </tr>
+ <tr>
+ <td id="centerLcolumn">
+
+ <!-- Start center-left blocks loop -->
+ <{foreach item=block from=$xoops_clblocks}>
+ <{include file="$xoops_theme/blocks/theme_blockcenter_l.html"}>
+ <{/foreach}>
+ <!-- End center-left blocks loop -->
+
+ </td><td id="centerRcolumn">
+
+ <!-- Start center-right blocks loop -->
+ <{foreach item=block from=$xoops_crblocks}>
+ <{include file="$xoops_theme/blocks/theme_blockcenter_r.html"}>
+ <{/foreach}>
+ <!-- End center-right blocks loop -->
+
+ </td>
+ </tr>
+ </table>
+ <{/if}>
+ <!-- End display center blocks -->
+
+ <{$xoops_contents}>
+ </td>
+
+ <{if $xoops_showrblock == 1}>
+ <td id="rightcolumn">
+
+ <!-- Start right blocks loop -->
+ <{foreach item=block from=$xoops_rblocks}>
+ <{include file="$xoops_theme/blocks/theme_blockright.html"}>
+ <{/foreach}>
+ <!-- End right blocks loop -->
+
+ </td>
+ <{/if}>
+
+ </tr>
+ </table>
+ </div>
+
+ <div id="footer-l"><div id="footer-r">
+ <p><{$xoops_footer}></p>
+ </div></div>
+
+</div></div>
+</body>
+<script type="text/javascript">
+ var menu1 = new AdMenu("menu1");
+ menu1.position.level1.top = 1;
+ menu1.position.level1.left = 0;
+ menu1.position.levelX.top = 0;
+ menu1.position.levelX.left = 0;
+ menu1.init();
+</script>
+</html>
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/themes/xmt/themeadmin.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/blank.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/blank.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/index.html
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/uploads/index.html 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/uploads/index.html 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1 @@
+<script>history.go(-1);</script>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/index.html
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3dbf8e94a6f72.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3dbf8e94a6f72.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3dbf8e9e7d88d.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3dbf8e9e7d88d.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3dbf8ea81e642.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3dbf8ea81e642.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3dbf8eb1a72e7.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3dbf8eb1a72e7.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3dbf8edf15093.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3dbf8edf15093.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3dbf8ee8681cd.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3dbf8ee8681cd.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3e632f95e81ca.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/rank3e632f95e81ca.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4bf386b36.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4bf386b36.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4d4e4c4f2.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4d4e4c4f2.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4d6422f04.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4d6422f04.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4d75edb5e.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4d75edb5e.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4d8676346.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4d8676346.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4d99c6eaa.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4d99c6eaa.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4daabd491.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4daabd491.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4dbc14f3f.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4dbc14f3f.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4dcd7b9f4.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4dcd7b9f4.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4ddd6835f.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4ddd6835f.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4df1944ee.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4df1944ee.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e02c5440.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e02c5440.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e1748cc9.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e1748cc9.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e29bbcc7.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e29bbcc7.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e398ff7b.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e398ff7b.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e4c2e742.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e4c2e742.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e5e7563a.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e5e7563a.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e7853679.gif
===================================================================
(Binary files differ)
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/uploads/smil3dbd4e7853679.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: XoopsCore/branches/2.2.x/2.2-main/html/user.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/user.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/user.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,90 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+$xoopsOption['pagetype'] = 'user';
+include 'mainfile.php';
+
+$op = 'main';
+
+if ( isset($_POST['op']) ) {
+ $op = trim($_POST['op']);
+} elseif ( isset($_GET['op']) ) {
+ $op = trim($_GET['op']);
+}
+
+if ($op == 'main') {
+ if ( !$xoopsUser ) {
+ $xoopsOption['template_main'] = 'system_userform.html';
+ include 'header.php';
+ $xoopsTpl->assign('lang_login', _LOGIN);
+ $xoopsTpl->assign('lang_username', _USERNAME);
+ if (isset($_COOKIE[$xoopsConfig['usercookie']])) {
+ $xoopsTpl->assign('usercookie', $_COOKIE[$xoopsConfig['usercookie']]);
+ }
+ if (isset($_GET['xoops_redirect'])) {
+ $xoopsTpl->assign('redirect_page', htmlspecialchars(trim($_GET['xoops_redirect']), ENT_QUOTES));
+ }
+ $xoopsTpl->assign('lang_password', _PASSWORD);
+ $xoopsTpl->assign('lang_notregister', _US_NOTREGISTERED);
+ $xoopsTpl->assign('lang_lostpassword', _US_LOSTPASSWORD);
+ $xoopsTpl->assign('lang_noproblem', _US_NOPROBLEM);
+ $xoopsTpl->assign('lang_youremail', _US_YOUREMAIL);
+ $xoopsTpl->assign('lang_sendpassword', _US_SENDPASSWORD);
+ $xoopsTpl->assign('mailpasswd_token', $GLOBALS['xoopsSecurity']->createToken());
+ include 'footer.php';
+ } elseif ( $xoopsUser ) {
+ header('Location: '.XOOPS_URL.'/modules/profile/userinfo.php?uid='.$xoopsUser->getVar('uid'));
+ }
+ exit();
+}
+
+if ($op == 'login') {
+ include_once XOOPS_ROOT_PATH.'/include/checklogin.php';
+ exit();
+}
+
+if ($op == 'logout') {
+ $message = '';
+ $_SESSION = array();
+ session_destroy();
+ if ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
+ setcookie($xoopsConfig['session_name'], '', time()- 3600, '/', '', 0);
+ }
+ // clear entry from online users table
+ if (is_object($xoopsUser)) {
+ $online_handler =& xoops_gethandler('online');
+ $online_handler->destroy($xoopsUser->getVar('uid'));
+ }
+ $message = _US_LOGGEDOUT.'<br />'._US_THANKYOUFORVISIT;
+ redirect_header('index.php', 1, $message);
+ exit();
+}
+
+if ($op == 'delete') {
+ header('Location: '.XOOPS_URL.'/modules/profile/edituser.php?op=delete');
+}
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/user.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/userinfo.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/userinfo.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/userinfo.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,37 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+include 'mainfile.php';
+if (isset($_GET['uid'])) {
+ $url = "modules/profile/userinfo.php?uid=".intval($_GET['uid']);
+}
+else {
+ $url = "modules/profile/index.php";
+}
+header('location: '.$url);
+//this file is deprecated
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/userinfo.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/viewpmsg.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/viewpmsg.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/viewpmsg.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,31 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+header('location: modules/pm/viewpmsg.php');
+//this file is deprecated
+
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/viewpmsg.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/xmlrpc.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/xmlrpc.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/xmlrpc.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,78 @@
+<?php
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+define('XOOPS_XMLRPC', 1);
+include './mainfile.php';
+error_reporting(0);
+include_once XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpctag.php';
+include_once XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpcparser.php';
+$response = new XoopsXmlRpcResponse();
+$parser = new XoopsXmlRpcParser($GLOBALS['HTTP_RAW_POST_DATA']);
+if (!$parser->parse()) {
+ $response->add(new XoopsXmlRpcFault(102));
+} else {
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->getByDirname('news');
+ if (!is_object($module)) {
+ $response->add(new XoopsXmlRpcFault(110));
+ } else {
+ $methods = explode('.', $parser->getMethodName());
+ switch ($methods[0]) {
+ case 'blogger':
+ include_once XOOPS_ROOT_PATH.'/class/xml/rpc/bloggerapi.php';
+ $rpc_api = new BloggerApi($parser->getParam(), $response, $module);
+ break;
+ case 'metaWeblog':
+ include_once XOOPS_ROOT_PATH.'/class/xml/rpc/metaweblogapi.php';
+ $rpc_api = new MetaWeblogApi($parser->getParam(), $response, $module);
+ break;
+ case 'mt':
+ include_once XOOPS_ROOT_PATH.'/class/xml/rpc/movabletypeapi.php';
+ $rpc_api = new MovableTypeApi($parser->getParam(), $response, $module);
+ break;
+ case 'xoops':
+ default:
+ include_once XOOPS_ROOT_PATH.'/class/xml/rpc/xoopsapi.php';
+ $rpc_api = new XoopsApi($parser->getParam(), $response, $module);
+ break;
+ }
+ $method = $methods[1];
+ if (!method_exists($rpc_api, $method)) {
+ $response->add(new XoopsXmlRpcFault(107));
+ } else {
+ $rpc_api->$method();
+ }
+ }
+}
+$payload =& $response->render();
+//$fp = fopen(XOOPS_CACHE_PATH.'/xmllog.txt', 'w');
+//fwrite($fp, $payload);
+//fclose($fp);
+header('Server: XOOPS XML-RPC Server');
+header('Content-type: text/xml');
+header('Content-Length: '.strlen($payload));
+echo $payload;
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/xmlrpc.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/xoops.css
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/xoops.css 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/xoops.css 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,17 @@
+img {border: 0;}
+
+#xoopsHiddenText {visibility: hidden; color: #000000; font-weight: normal; font-style: normal; text-decoration: none;}
+
+.pagneutral {font-size: 10px; width: 16px; height: 19px;text-align: center; background-image: url(./images/pagneutral.gif);}
+.pagact {font-size: 10px; width: 16px; height: 19px;text-align: center; background-image: url(./images/pagact.gif);}
+.paginact {font-size: 10px; width: 16px; height: 19px;text-align: center; background-image: url(./images/paginact.gif);}
+
+
+#mainmenu a {text-align:left; display: block; margin: 0; padding: 4px;}
+#mainmenu a.menuTop {padding-left: 3px;}
+#mainmenu a.menuMain {padding-left: 3px;}
+#mainmenu a.menuSub {padding-left: 9px;}
+
+#usermenu a {text-align:left; display: block; margin: 0; padding: 4px;}
+#usermenu a.menuTop {}
+#usermenu a.highlight {color: #0000ff; background-color: #fcc;}
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/xoops.css
___________________________________________________________________
Name: svn:keywords
+ "Author Date Id Rev URL"
Added: XoopsCore/branches/2.2.x/2.2-main/html/xoopsupdate.php
===================================================================
--- XoopsCore/branches/2.2.x/2.2-main/html/xoopsupdate.php 2006-01-21 17:43:31 UTC (rev 183)
+++ XoopsCore/branches/2.2.x/2.2-main/html/xoopsupdate.php 2006-01-22 22:34:51 UTC (rev 184)
@@ -0,0 +1,51 @@
+<?php
+include "mainfile.php";
+if (isset($_POST['submit'])) {
+ //Check for duplicate configuration items:
+ $sql = "SELECT c1.conf_id FROM ".$xoopsDB->prefix('config')." c1, ".$xoopsDB->prefix('config')." c2 WHERE
+ c1.conf_modid=c2.conf_modid AND c1.conf_name=c2.conf_name AND c1.conf_id > c2.conf_id";
+ $result = $xoopsDB->query($sql);
+ while (list($id) = $xoopsDB->fetchRow($result)) {
+ $ids[] = $id;
+ }
+ if (count($ids) > 0) {
+ $criteria = new Criteria('conf_id', "(".implode(',', $ids).")", "IN");
+ $config_handler = xoops_gethandler('config');
+ $configs = $config_handler->getConfigs($criteria);
+ foreach (array_keys($configs) as $i) {
+ $config_handler->deleteConfig($configs[$i]);
+ }
+ }
+
+ //Update system
+ include XOOPS_ROOT_PATH."/modules/system/include/update.php";
+ $module_handler = xoops_gethandler('module');
+ $module = $module_handler->getByDirname("system");
+
+ include XOOPS_ROOT_PATH."/modules/system/language/english/admin/modulesadmin.php";
+ $module->update();
+
+ $criteria = new CriteriaCompo(new Criteria("hasconfig", 1));
+ $criteria->add(new Criteria('dirname', "system", "!="));
+ $modules_with_config = $module_handler->getObjects($criteria);
+ unset($criteria);
+ if (count($modules_with_config) > 0) {
+ $msgs = array();
+ foreach (array_keys($modules_with_config) as $i) {
+ $modules_with_config[$i]->insertConfigCategories();
+ $modules_with_config[$i]->insertConfig();
+ $msgs = array_merge($msgs, $modules_with_config[$i]->getMessages());
+ }
+ echo implode('<br />', $msgs);
+ }
+
+}
+else {
+ $xoopsDB->queryF("UPDATE ".$xoopsDB->prefix('config')." SET conf_modid=1 WHERE conf_modid=0"); //Shouldn't really be run several times, but it doesn't hurt anything since there will be no configs with conf_modid=0
+ include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+ $form = new XoopsThemeForm('Update XOOPS', 'form', 'xoopsupdate.php');
+ $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
+ $form->display();
+}
+include "footer.php";
+?>
\ No newline at end of file
Property changes on: XoopsCore/branches/2.2.x/2.2-main/html/xoopsupdate.php
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Rev URL"
More information about the Xoops4-svn
mailing list